抵消 GPS 协调的公式/算法 [英] Formula/algorithm to offset GPS coordinations
问题描述
我提供了以纬度、经度为单位的 GPS 坐标,并希望将它们偏移一个距离和一个角度.
例如:如果我偏移 45.12345
,新坐标是什么,7.34567
沿方位角 104 度行驶 22 公里?
谢谢
I have GPS coordinates provided as degrees latitude, longitude and would like to offset them by a distance and an angle.
E.g.: What are the new coordinates if I offset 45.12345
, 7.34567
by 22km along bearing 104 degrees ?
Thanks
推荐答案
对于大多数应用程序,这两个公式之一就足够了:
For most applications one of these two formulas are sufficient:
第二个速度较慢,但在特殊情况下产生的问题较少(请参阅该页面上的文档).
阅读该页面上的介绍,并确保在得到结果之后将纬度/经度转换为弧度,然后再转换回度数.确保您的系统使用 atan2(y,x)(通常是这种情况)而不是 Excell 中的 atan2(x,y).
The second one is slower, but makes less problems in special situations (see docu on that page).
Read the introduction on that page, and make sure that lat/lon are converted to radians before and back to degrees after having the result.
Make sure that your system uses atan2(y,x) (which is usually the case) and not atan2(x,y) which is the case in Excell.
这篇关于抵消 GPS 协调的公式/算法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!