使用WGS84椭球的距离 [英] Distance using WGS84-ellipsoid
问题描述
考虑地球
表面上的点P1(60°N,20°E,0)和P2(60°N,22°E,0)
当使用WGS-84椭球体模拟
地球的形状时,点P1和P2之间的最短距离是多少?
不幸的是,Vincenty的算法对某些输入未能收敛。
GeographicLib 提供了一个总是收敛的选择(并且
也更准确)。提供C ++,C,Fortran,Javascript,
Python,Java和Matlab的实现。例如,使用
Matlab软件包:
format long;
geoddistance(60,20,60,22)
- >
111595.753650629
Consider points P1 (60°N, 20°E, 0) and P2 (60°N, 22°E, 0) on the surface of the Earth
What is the shortest distance between the points P1 and P2, when the shape of the Earth is modeled using WGS-84 ellipsoid?
Unfortunately, Vincenty's algorithm fails to converge for some inputs. GeographicLib provides an alternative which always converges (and is also more accurate). Implementations in C++, C, Fortran, Javascript, Python, Java, and Matlab are provided. E.g., using the Matlab package:
format long;
geoddistance(60,20,60,22)
->
111595.753650629
这篇关于使用WGS84椭球的距离的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!