[GIS] Calculating azimuth from two points, both having latitude/longtiude

algorithmazimuth

How to calculate the Azimuth angle between two points on the surface of the earth if i ONLY have the lat/long of them?

Here is an example image: the azimuth angle is X which i want to calculate AND the angle to the magnetic pole.
Example image

Best Answer

As commented by @whuber:

The first question is addressed at Bearing/Course/Heading in WGS84 ellipsoid model [since deleted by its asker] and How to Calculate North?. The second question does not have a "mathematical" solution in the sense of a formula because it requires a dataset showing magnetic north at all points of the earth.

Related Question