Main Content

Display Navigational Tracks

Navigational tracks are most useful when graphically displayed. Traditionally, the navigator identifies and plots waypoints on a Mercator projection and then connects them with a straightedge, which on this projection results in rhumb line tracks. In the previous example, waypoints were chosen to approximate a great circle route, but they can be selected for a variety of other reasons.

Let's say that after arriving at Cape St. Vincent, your tanker must traverse the Straits of Gibraltar and then travel on to Port Said, the northern terminus of the Suez Canal. On the scale of the Mediterranean Sea, following great circle paths is of little concern compared to ensuring that the many straits and passages are safely transited. The navigator selects appropriate waypoints and plots them.

To accomplish this with Mapping Toolbox™ functions, you can display an axesm-based map with a Mercator projection, select appropriate map latitude and longitude limits to isolate the area of interest, plot coastline data, and interactively mouse-select the waypoints with the inputm function. The track function will generate points to connect these waypoints, which can then be displayed with plotm.

For illustration, assume that the waypoints are known (or were gathered using inputm). To learn about using inputm, see Pick Locations Interactively, or inputm in the Mapping Toolbox reference pages.

waypoints = [36 -5; 36 -2; 38 5; 38 11; 35 13; 33 30; 31.5 32]
waypoints =

	36.0000   -5.0000
	36.0000   -2.0000
	38.0000    5.0000
	38.0000   11.0000
	35.0000   13.0000
	33.0000   30.0000
	31.5000   32.0000
load coastlines
'MapLatLimit',[30 47],'MapLonLimit',[-10 37])

[lttrk,lntrk] = track(waypoints);

Although these track segments are straight lines on the Mercator projection, they are curves on others:

Track segments on a map of the Mediterranean Sea

The segments of a track like this are called legs. Each of these legs can be described in terms of course and distance. The function legs will take the waypoints in navigational track format and return the course and distance required for each leg. Remember, the order of the points in this format determines the direction of travel. Courses are therefore calculated from each waypoint to its successor, not the reverse.

[courses,distances] = legs(waypoints)
courses =


distances =


Since this is a navigation function, the courses are all in degrees and the distances are in nautical miles. From these distances, speeds required to arrive at Port Said at a given time can be calculated. Southbound traffic is allowed to enter the canal only once per day, so this information might be economically significant, since unnecessarily high speeds can lead to high fuel costs.

Related Topics