missionlist = ['242.01'; '242.02'; '242.03'; '242.04'; '242.05'] 
startll=[NaN NaN]

[m n]=size(missionlist)

rcd=pwd; %store current dir

	for ind=1:m;
   eval(['cd ../2000.' missionlist(ind,:)])
   	if ind==1
      	missiondata;
   	   startll=bearing(shipstart,startrng);
  		end%if
   	if ind==m;	
      	missiondata;
  		   endll=bearing(shipend,endrng);
   	end%if
    end%for
  [distance phas]=sw_dist(startll,endll,'km');
