Geodesic.WGS84.Inverse通过两点经纬度计算两点间的方位角

Geodesic.WGS84.Inverse通过两点经纬度计算两点间的方位角两个经纬度查距离等叫反向 Geodesic WGS84 Inverse 41 32 120 40 96 5 50 出发地经纬度加方位角和距离 查目的地经纬度叫正向 Geodesic WGS84 Direct 30 126 25757 0 20000 一开始觉得 Geodesic WGS84

大家好,我是讯享网,很高兴认识大家。


出发地经纬度加方位角和距离,查目的地经纬度叫正向
Geodesic.WGS84.Direct(30., 126.25757, 0, 20000)

 

一开始觉得Geodesic.WGS84.Inverse得出的方位角奇怪,azi1与azi2差不多,35.7/36.3,这个方位角与我的理解不同,

 

注意43, 125.0与44, 126.0之间的连线没有问题,但125与126两条经线不是平行的,所以导致连线的方位角在两点不相同,

这里需要把连线当成矢量,azi1与azi2的大方向都是从1点出发朝2点的方向,不是我想的azi1时从1到2的方向,azi2是从2到1的方向。

后来我又颠倒了两个点的顺序,结果发现从1到2点的azi2 等于 从2到1点的azi1的180度反方向。

所以我可以用azi2+180表示反向的方位角。

 

 

Geodesic.WGS84.Inverse(43, 125.0, 44, 126.0)
{'lat1': 43, 'lon1': 125.0, 'lat2': 44, 'lon2': 126.0, 'a12': 1.02819, 's12': ., 'azi1': 35.207, 'azi2': 36.479}
Geodesic.WGS84.Inverse(44, 126.0, 43, 125.0)
{'lat1': 44, 'lon1': 126.0, 'lat2': 43, 'lon2': 125.0, 'a12': 1.02819, 's12': ., 'azi1': -143.52, 'azi2': -144.792}

 


讯享网

 

 

另一个方法是通过角度和距离计算目标的经纬度:

 

Direct(lat1, lon1, azi1, s12, outmask=1929)[source]

Solve the direct geodesic problem

Parameters:
  • lat1 – latitude of the first point in degrees
  • lon1 – longitude of the first point in degrees
  • azi1 – azimuth at the first point in degrees
  • s12 – the distance from the first point to the second inmeters
  • outmask – the output mask
Returns:

a Geodesic dictionary

Compute geodesic starting at (lat1, lon1) with azimuth azi1and length s12. The default value of outmask is STANDARD, i.e.,the lat1, lon1, azi1, lat2, lon2, azi2, s12, a12entries are returned.

Geodesic.WGS84.Direct(42.63055, 126.25757, 30, 100) {'lat1': 42.63055, 'lon1': 126.25757, 'azi1': 30.0, 's12': 100, 'a12': 0.00024253, 'lat2': 42.242, 'lon2': 126.002, 'azi2': 30.000} 

讯享网
讯享网 mrpoint = Geodesic.WGS84.Direct(42.63055, 126.25757, delta + theta, d) gcj = wgs84togcj02(mrpoint['lon2'], mrpoint['lat2'])

 

 

 

GeographicLib API

https://geographiclib.sourceforge.io/html/python/code.html#geographiclib.geodesic.Geodesic.LONG_UNROLL

小讯
上一篇 2025-03-04 22:26
下一篇 2025-01-27 11:41

相关推荐

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容,请联系我们,一经查实,本站将立刻删除。
如需转载请保留出处:https://51itzy.com/kjqy/40729.html