0

我在地球 (1,1,) 上有一个位置,我想将一条具有已知方位角和仰角的直线投影到某个高度,. 从而获得投影球体上的新坐标,(2,2,+)。

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

4

1 回答 1

0

高度变化不会影响方位角(作为路径到球体上的投影),因此您可以使用此处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
于 2019-02-05T04:05:18.693 回答