Main Content


Azimuth is the angle a line makes with a meridian, measured clockwise from north. Thus the azimuth of due north is 0°, due east is 90°, due south is 180°, and due west is 270°. You can instruct several Mapping Toolbox™ functions to compute azimuths for any pair of point locations, either along rhumb lines or along great circles. These will have different results except along cardinal directions. For great circles, the result is the azimuth at the initial point of the pair defining a great circle path. This is because great circle azimuths other than 0°, 90°, 180°, and 270° do not remain constant. Azimuths for rhumb lines are constant along their entire path (by definition).

For rhumb lines, computing an azimuth backward (from the second point to the first) yields the complement of the forward azimuth ((Az + 180°) mod 360°). For great circles, the back azimuth is generally not the complement, and the difference depends on the distance between the two points.

In addition to forward and back azimuths, Mapping Toolbox functions can compute locations of points a given distance and azimuth from a reference point, and can calculate tracks to connect waypoints, along either great circles or rhumb lines on a sphere or ellipsoid.

For more an example that uses azimuths, see Reckoning

Calculate Azimuth

When the azimuth is calculated from one point to another using the toolbox, the result depends upon whether you want a great circle or a rhumb line azimuth. For great circles, the result is the azimuth at the starting point of the connecting great circle path. In general, the azimuth along a great circle is not constant. For rhumb lines, the resulting azimuth is constant along the entire path.

Azimuths, or bearings, are returned in the same angular units as the input latitudes and longitudes. The default path type is the shorter great circle, and the default angular units are degrees. In the example, the great circle azimuth from the first point to the second is

azgc = azimuth(-15,0,60,150)

azgc =

For the rhumb line, the constant azimuth is

azrh = azimuth('rh',-15,0,60,150)

azrh =

One feature of rhumb lines is that the inverse azimuth, from the second point to the first, is the complement of the forward azimuth and can be calculated by simply adding 180° to the forward value:

inverserh = azimuth('rh',60,150,-15,0)

inverserh =

difference = inverserh-azrh

difference =

This is not true, in general, of great circles:

inversegc = azimuth('gc',60,150,-15,0)

inversegc =

difference = inversegc-azgc

difference =

The azimuths associated with cardinal and intercardinal compass directions are the following:


0° or 360°