Mapping Toolbox    
track

Connect navigational waypoints with track segments

Syntax

Description

[lattrk,lontrk] = track(waypts) returns points in lattrk and lontrk along a track between the waypoints provided in navigational track format in the two-column matrix waypts. The outputs are column vectors in which successive segments are delineated with NaNs.

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

[lattrk,lontrk] = track(lat,lon) allows the user to input the waypoints in two vectors, lat and lon.

[lattrk,lontrk] = track(lat,lon,geoid) specifies the elliptical definition of the Earth with a two-element geoid model vector geoid. The default geoid is a spherical Earth, which is sufficient for most applications.

[lattrk,lontrk] = track(lat,lon,geoid,units,npts) establishes how many intermediate points are to be calculated for every track segment. By default, npts is 30.

[lattrk,lontrk] = track(method,lat,...) establishes which logic is to be used to determine the intermediate points along the track between waypoints. Because this is a navigationally motivated function, the default method is 'rh', which results in the a rhumb line logic. Great circle logic can be specified with 'gc'.

trkpts = track(lat,lon...) compresses the output into one two-column matrix, trkpts, in which the first column represents latitudes and the second column, longitudes.

Examples

The track command is useful for generating data in order to display tracks. Lieutenant Sextant is the navigator of the USS Neversail. He has been charged with plotting a track to take Neversail from the Straits of Gibraltar to Port Said, Egypt, the northern end of the Suez Canal. He has picked appropriate waypoints and now would like to display the track for his captain's approval.

First, display a chart of the Mediterranean Sea:

These are the waypoints Lt. Sextant has selected:

Now display the track:

See Also
dreckon
Dead reckon points for a track
gcwaypts
Find waypoints along a great circle
legs
Courses and distances between waypoints
navfix
Mercator-based navigational fixing


  tissot track1