track1 - Geographic tracks from starting point, azimuth, and range

Syntax

[lattrk,lontrk] = track1(lat,lon,az)
[lattrk,lontrk] = track1(track,lat,lon,az)
[lattrk,lontrk] = track1(track,lat,lon,az,units)
[lattrk,lontrk] = track1(track,lat,lon,az,rng)
[lattrk,lontrk] = track1(track,lat,lon,az,rng,ellipsoid,units)
[lattrk,lontrk] = track1(track,lat,lon,az,rng,ellipsoid,units,npts)
pts = track1(lat,lon,az,...)

[lattrk,lontrk] = track1(lat,lon,az) returns, in lattrk and lontrk, points along a complete (great circle) track passing through the point specified by lat and lon with an initial azimuth at that point of az. When the inputs are column vectors, the successive tracks are stored in separate columns of lattrk and lontrk.

[lattrk,lontrk] = track1(track,lat,lon,az) allows the specification of the track logic to be employed. A string track of 'gc' is the default, resulting in a great circle track. A track of 'rh' results in a complete rhumb line track.

[lattrk,lontrk] = track1(track,lat,lon,az,units) specifies the units of the inputs and outputs, where units is any valid angle unit string. The default is 'degrees'.

[lattrk,lontrk] = track1(track,lat,lon,az,rng) specifies the range of the track. rng is a one- or two-column matrix. If rng has one column, the track extends from the point (lat,lon) at an azimuth of az for a distance rng if rng is positive, or at an azimuth az+180º (or its angular equivalent) for a distance of abs(rng) if rng is negative. If rng has two columns, the endpoints are defined as above. In this case, the segment extends from the point associated with the first column of rng to the point associated with the second column. rng is in units (unless a ellipsoid is input). When no rng is provided, or rng is empty, a complete track is returned.

[lattrk,lontrk] = track1(track,lat,lon,az,rng,ellipsoid,units) specifies the elliptical definition of the Earth with a two-element ellipsoid model vector ellipsoid. The default ellipsoid is a spherical Earth, which is sufficient for most applications. If used, the units of the semimajor axis of the ellipsoid vector define the units for the rng input, overriding units for this purpose.

[lattrk,lontrk] = track1(track,lat,lon,az,rng,ellipsoid,units,npts) specifies the number of points, npts, per output track. npts is 100 by default.

pts = track1(lat,lon,az,...) combines the outputs into a single two-column matrix, pts.

Background

A path along the surface of the Earth connecting two points is a track. Two types of track lines are of interest geographically, great circles and rhumb lines. Great circles represent the shortest possible path between two points. Rhumb lines are paths with constant angular headings. They are not, in general, the shortest path between two points.

Full great circles bisect the Earth; the ends of the track meet to form a complete circle. Rhumb lines with true east or west azimuths are parallels; the ends also meet to form a complete circle. All other rhumb lines terminate at the poles; their ends do not meet.

Examples

axesm('mercator','MapLatLimit',[-60 60],'MapLonLimit',[-60 60])
[lattrkgc,lontrkgc] = track1(0,0,45,[-55 55]);
plotm(lattrkgc,lontrkgc,'g')
[lattrkrh,lontrkrh] = track1('rh',0,0,45,[-55 55]);
plotm(lattrkrh,lontrkrh,'r')

See Also

azimuth, distance, reckon, scircle1, scircle2, track, track2, trackg

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS