简体   繁体   English

在 Excel 中使用纬度和经度计算大圆轨道

[英]Calculating Great Circle track using latitude and longitude in Excel

I'm trying to calculate the initial bearing (forward azimuth) between two positions using latitude and longitude.我正在尝试使用纬度和经度计算两个位置之间的初始方位(前向方位角)。 After much googling most of what I can find either relates to calculating distance, or calculates using an equirectangular projection.经过大量谷歌搜索后,我能找到的大部分内容要么与计算距离有关,要么使用等距柱状投影进行计算。

The closest I could find is the formula:我能找到的最接近的是公式:

θ = atan2( sin Δλ ⋅ cos φ2 , cos φ1 ⋅ sin φ2 − sin φ1 ⋅ cos φ2 ⋅ cos Δλ )

which when using excel needs to be reversed:使用excel时需要颠倒:

=ATAN2(COS(lat1)*SIN(lat2)-SIN(lat1)*COS(lat2)*COS(lon2-lon1),SIN(lon2-lon1)*COS(lat2))

The output should give me the answer in radians, which I convert to degrees using:输出应该给我弧度的答案,我使用以下方法将其转换为度数:

=MOD(DEGREES(answer)+360,360)

However I'm not getting anything that makes sense.但是,我没有得到任何有意义的东西。

My test points are located in the southern hemisphere: -17.9467 122.2350 and -20.3783 118.6233我的测试点位于南半球: -17.9467 122.2350-20.3783 118.6233

I should be getting an answer of about 232 degrees (there's 1-2 degrees of magnetic variation in this answer whereas the formula is in degrees True), however I'm getting 177 degrees.我应该得到大约 232 度的答案(这个答案有 1-2 度的磁变化,而公式的度数为真),但是我得到了 177 度。

Can anyone see my (probably simple) error?任何人都可以看到我的(可能很简单)错误吗?

在使用公式之前将原始数据转换为弧度。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM