How do I calculate the Azimuth (angle to north) between two WGS84 coordinates

后端 未结 6 2158
被撕碎了的回忆
被撕碎了的回忆 2020-12-25 09:52

I have got two WGS84 coordinates, latitude and longitude in degrees. These points are rather close together, e.g. only one metre apart.

Is there an easy way to calcu

6条回答
  •  离开以前
    2020-12-25 10:06

    Has anyone tested this? It does not return the correct answers

    This function assumes that you're on a flat surface. With the small distances that you've mentioned this is all fine, but if you're going to be calculating the heading between cities all over the world you might want to look into something that takes the shape of the earth in count;

    Your flat earth has little to do with this. The error, as you call it, is because you are calculating an initial azimuth from a point. Unless you are heading straight to a pole, you relationship to the pole will change with distance. Regardless, the above program does not return correct results.

提交回复
热议问题