我有两个 GPS 坐标
例如(Lat1, Long1) 和 (Lat2,Long2)
谁能帮我找到这两点之间的角度。
值应为 0-360 度。
最佳答案
取自 this以前的SO帖子:
float dy = lat2 - lat1;
float dx = cosf(M_PI/180*lat1)*(long2 - long1);
float angle = atan2f(dy, dx);
关于gps - 如何计算两个地理/GPS 坐标之间的角度?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9566069/