Calculate initial bearing (or forward azimuth/direction) to go from point a to point b following great circle arc on a sphere.
get_azimuth(lat_a, lon_a, lat_b, lon_b)
Arguments
lat_a, lat_b: Numeric. Latitudes of a and b (in degrees).
lon_a, lon_b: Numeric. Longitudes of a and b (in degrees).
Returns
numeric. Azimuth in degrees
Details
get_azimuth() is based on the spherical law of tangents. This formula is for the initial bearing (sometimes referred to as forward azimuth) which if followed in a straight line along a great circle arc will lead from the start point a to the end point b.