将地球上的位置投影到具有局部方位角和海拔的更高高度



我在地球上有一个位置(lat1,lon1,Re(,我想将一条具有已知方位角和海拔的直线投影到某个高度r。从而在投影球体上获得新的坐标,(lat2,lon2,Re+r(。

如何使用所有其他可用信息计算 lat2 和 lon2?

高度变化不会影响方位角(如路径投影到球体上(,因此您可以使用此处的Destination point given distance and bearing from start point部分从起始坐标和方位角获取最终坐标:

Formula:    
φ2 = asin( sin φ1 ⋅ cos δ + cos φ1 ⋅ sin δ ⋅ cos θ )
λ2 = λ1 + atan2( sin θ ⋅ sin δ ⋅ cos φ1, cos δ − sin φ1 ⋅ sin φ2 )
  where φ is latitude, λ is longitude, θ is the bearing (clockwise from north), 
  δ is the angular distance d/R; d being the distance travelled, R the earth’s radius
JavaScript:    (all angles     in radians)
var φ2 = Math.asin( Math.sin(φ1)*Math.cos(d/R) +
                    Math.cos(φ1)*Math.sin(d/R)*Math.cos(brng) );
var λ2 = λ1 + Math.atan2(Math.sin(brng)*Math.sin(d/R)*Math.cos(φ1),
                         Math.cos(d/R)-Math.sin(φ1)*Math.sin(φ2));
The longitude can be normalised to −180…+180 using (lon+540)%360-180

最新更新