2013-03-15 25 views
0

假設我站在經度,緯度(-33,151),我想計算兩點(-32,150)和( - 34,152)。有人可以告訴我,我該怎麼做?地球上一個位置的兩個座標(經度,緯度)之間的夾角

+1

複製的[http://math.stackexchange.com/questions/330843/angle-between-two-coordinateslatitude-經度 - 從一個地方](http://math.stackexchange.com/questions/330843/angle-between-two-coordinateslatitude-longitude-from-a-position-on-earth) – eggy 2013-03-15 02:22:25

+0

怎麼可以我編程計算在android中? – 2017-04-19 08:52:12

回答

1

您可以使用代碼this page計算兩個軸承,並計算其差值。

軸承:

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

其中φ是緯度,Δλ是經度差

相關問題