%function bstruct = tracklinegeo(initiallat,initiallong,latitude,longitude, ...
%	depth,rpm)
%function bstruct = tracklinegeo(initiallat,initiallong,latitude,longitude, ...
%	vertical,speed,captureradius,circlemode,verticalmode,speedmode)
%function bstruct = tracklinegeo(initiallat,initiallong,latitude,longitude, ...
%	vertical,speed,captureradius,circlemode,verticalmode,speedmode,duration)
function bstruct = tracklinegeo(initiallat,initiallong,latitude,longitude, ...
	vertical,speed,captureradius,circlemode,verticalmode,speedmode,duration)
[bdefaults,bnames] = behaviorDefaults;	
bstruct = bdefaults{indexof(bnames,'tracklinegeo')};

if nargin <= 10,
	duration = calcDuration(initiallat,initiallong,latitude,longitude,speed);
end

if nargin == 6,	
	captureradius = 10;
	circlemode = 'False';
	verticalmode = 'pitch';
	speedmode = 'rpm';
end

bstruct = rmfield(bstruct,'verticalblock');
bstruct = rmfield(bstruct,'speedblock');
bstruct = setfield(bstruct,'initiallat',initiallat);
bstruct = setfield(bstruct,'initiallong',initiallong);
bstruct = setfield(bstruct,'latitude',latitude);
bstruct = setfield(bstruct,'longitude',longitude);
bstruct = setfield(bstruct,'captureradius',captureradius);
bstruct = setfield(bstruct,'circlemode',circlemode);
bstruct = setfield(bstruct,'verticalmode',verticalmode);
bstruct = setfield(bstruct,verticalmode,vertical);
bstruct = setfield(bstruct,'speedmode',speedmode);
bstruct = setfield(bstruct,speedmode,speed);
bstruct = setfield(bstruct,'duration',duration);