我们如何找到由纬度或经度定义的两个位置之间的角度 [英] How can we find the angle between two locations defined by latitude or longitude

查看:115
本文介绍了我们如何找到由纬度或经度定义的两个位置之间的角度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不想要任何代码,但想要参考我们如何找到由纬度或经度定义的两个位置之间的角度...

I do not want any code but want to get reference that how can we find the angle between two locations defined by Latitude or Longitude...

如果你这样做请参考然后请帮我解决我的问题......

If you do have reference then Please help me to solve my problem...

提前完成Thanx ....

Thanx in advance....

推荐答案

计算方位的公式是:

θ= atan2(sin(Δlong).cos(lat2),cos(lat1) .sin(lat2) - sin(lat1).cos(lat2).cos(Δlong))

θ = atan2( sin(Δlong).cos(lat2), cos(lat1).sin(lat2) − sin(lat1).cos(lat2).cos(Δlong) )

轴承是从一个位置移动到另一个位置的方向(开始)从北方然后顺时针方向)。而2D中的角度从东方开始,然后逆时针方向开始。因此,如果您需要一个角度,稍后您需要将90度添加到结果中然后将其还原(添加减去)。

Bearing is a direction to move from one location to another location (starting from north and then clockwise). While angle in 2D starts from the east and then counter clockwise. So if an angle is what you need, later you'll need to add 90 degree to the result and then revert it (add minus).

参考:
http://www.movable-type.co.uk/scripts/latlong。 html

这篇关于我们如何找到由纬度或经度定义的两个位置之间的角度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆