%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function utmStruct = getUtmStruct
	global mission
zone = [];
if checkForValue(mission{1},'latitude') & checkForValue(mission{1},'longitude'),
	utmStruct = myutmzone(mission{1}.latitude,mission{1}.longitude);
elseif checkForValue(mission{1},'startlat') & checkForValue(mission{1},'startlon'),
	utmStruct = myutmzone(mission{1}.startlat,mission{1}.startlon);
elseif checkForValue(mission{1},'northwestlat') & checkForValue(mission{1},'northwestlon'),
	utmStruct = myutmzone(mission{1}.northwestlat,mission{1}.northwestlon);
elseif checkForValue(mission{1},'lat0') & checkForValue(mission{1},'lon0'),
	utmStruct = myutmzone(mission{1}.lat0,mission{1}.lon0);
elseif checkForValue(mission{1},'lat') & checkForValue(mission{1},'lon'),
	lat = mission{1}.lat;
	lon = mission{1}.lon;
	if isstr(lat), lat = str2num(strtok(lat,' ')); end
	if isstr(lon), lon = str2num(strtok(lon,' ')); end
	utmStruct = myutmzone(lat,lon);
elseif checkForValue(mission{1},'initiallat') & checkForValue(mission{1},'initiallon'),
	utmStruct = myutmzone(mission{1}.initiallat,mission{1}.initiallon);
elseif isfield(mission{1},'utmzone'),
	zone = mission{1}.utmzone;
	utmStruct = myutmzone(zone);
end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function bool = checkForValue(bstruct,str)
bool = 0;
if ~isfield(bstruct,str), return, end
bool = ~strcmp(getfield(bstruct,str),'*');