Advertisement

Azimuth calculator

An azimuth is a direction measured clockwise from north: 0 degrees is north, 90 degrees is east and 270 degrees is west. This page finds the initial bearing and distance between two latitude and longitude points, or converts east and north distances into an azimuth and straight-line distance.

Calculator

Azimuth
47.13
Back azimuth
230.76
Distance
507.495

Advertisement

How this calculator works

For two points on the globe, the azimuth is the direction of the great-circle route as it leaves the first point. Because meridians converge toward the poles, that direction is not simply the direction of the straight line on a flat map, and it slowly changes along a long route. The back azimuth is the direction you would face if you turned around at the second point. A distance-only offset is simpler: an eastward change x and a northward change y form a right triangle, and the azimuth is the angle whose tangent is x divided by y.

Formula

triangle: azimuth = atan2(east, north), measured clockwise from north; distance = sqrt(east^2 + north^2). coordinates: delta longitude = lon2 - lon1; azimuth = atan2(sin(delta lon) cos(lat2), cos(lat1) sin(lat2) - sin(lat1) cos(lat2) cos(delta lon)), normalised to 0 to 360 degrees. distance uses the haversine formula with R = 6,371.0088 km. back azimuth = forward bearing from the second point to the first plus 180 degrees.

Worked example

Start at 45 degrees north, 75 degrees west and travel to 48 degrees north, 70 degrees west. The initial bearing is about 47.1 degrees, north-east, and the great-circle distance is about 507 km. The back azimuth, the direction from the second point back to the first, is about 230.8 degrees. In the offset mode, 3 m east and 4 m north give an azimuth of atan2(3, 4) = 36.87 degrees and a distance of 5 m.

Advertisement

Frequently asked questions

Is azimuth the same as a compass bearing?

An azimuth is measured from true north, while a magnetic compass points toward magnetic north. The difference, called magnetic declination, varies by place and time. Add or subtract the local declination before comparing a compass bearing with this result.

Why is the back azimuth not exactly 180 degrees more?

On a sphere the forward and return directions are not exactly opposite except along a meridian or the equator, because the route curves. The calculator takes the bearing from the second point back to the first and reports that direction.

What does atan2 do?

It returns the angle from the positive y axis while using the signs of both offsets to choose the correct quadrant. That is why 3 m east and 4 m north gives 36.87 degrees, while 3 m west and 4 m north gives 323.13 degrees.

Which distance does the calculator use?

It uses the great-circle distance on a sphere with the mean Earth radius. It does not follow roads, terrain or the ellipsoid, so travel distances are usually longer.

Sources

Advertisement