Main Content

Generate Vector Data for Points Along Great Circle or Rhumb Line Tracks

You can generate vector data corresponding to points along great circle or rhumb line tracks using the track1 and track2 functions. If you have a point on the track and an azimuth at that point, use track1. If you have two points on the track, use track2. For example, to get the great circle path starting at (31°S, 90°E) with an azimuth of 45° with a length of 12°, use track1:

[latgc,longc] = track1('gc',-31,90,45,12);

For the great circle from (31°S, 90°E) to (23°S, 110°E), use track2:

[latgc,longc] = track2('gc',-31,90,-23,110);

Comparison of the track1 and track2 functions. The track1 function determines output points using the initial point, the azimuth, and the range. The track2 function determines output points using the initial point and the final point.

The track1 function also allows you to specify range endpoints. For example, if you want points along a rhumb line starting 5° away from the initial point and ending 13° away, at an azimuth of 55°, simply specify the range limits:

[latrh,lonrh] = track1('rh',-31,90,55,[5 13]);

The output of the track1 function with range limits.

When no range is provided for track1, the returned points represent a complete track. For great circles, a complete track is 360°, encircling the planet and returning to the initial point. For rhumb lines, the complete track terminates at the poles, unless the azimuth is 90° or 270°, in which case the complete track is a parallel that returns to the initial point.

For calculated tracks, 100 points are returned unless otherwise specified. You can calculate several tracks at one time by providing vector inputs. For more information, see the track1 and track2 reference pages. For more information about rhumb lines, see Rhumb Lines. For more information about great circles, see Great Circles. More vector path calculations are described in Navigation.