Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VincentyGeodesy.distanceInMeters works incorrectly if one of the points is either South or North pole #66

Open
satorg opened this issue Apr 20, 2023 · 0 comments

Comments

@satorg
Copy link
Contributor

satorg commented Apr 20, 2023

Example (all results in meters are converted into kilometers for convenience):

VincentyGeodesy.distanceInMeters(new WGS84Point(90, 0), new WGS84Point(89, 0)) / 1000.0
  results to 19892.237593638412

whereas

VincentyGeodesy.distanceInMeters(new WGS84Point(-90, 0), new WGS84Point(89, 0)) / 1000.0
  results to 111.69386491426172

which is apparently incorrect.

Note that for a point that is off the pole just a fraction of a degree, the algorithm seems working correctly (or at least plausible):

VincentyGeodesy.distanceInMeters(new WGS84Point(89.9999, 0), new WGS84Point(89, 0)) / 1000.0
  results to 111.6826955163081

VincentyGeodesy.distanceInMeters(new WGS84Point(-89.9999, 0), new WGS84Point(89, 0)) / 1000.0
  results to 19892.22642424046
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant