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

Returns None #8

Open
macleginn opened this issue Dec 16, 2021 · 2 comments
Open

Returns None #8

macleginn opened this issue Dec 16, 2021 · 2 comments

Comments

@macleginn
Copy link

Like this:

>>> a = (-22.6559, -58.9053)
>>> b = (23.0917, 121.348)
>>> vincenty(a, b)                 # None!
>>> b = (23.0917, 122.348)  # Increase the longitude by a little bit.
>>> vincenty(a, b)
19889.79461
@muhammedsirajudeen
Copy link

Vincenty formula will fail to converge in points that are anti poidal in nature in debugging the source code i observed that.The return value is None because the points failed to converge. These points are anti poidal in nature that is they are in opposite sides of earth even vincenty was aware of this limitation.This is not a problem of implementation .Inverse implementation of vincenty formula will fail to converge for points that are anti poidal

@macleginn
Copy link
Author

macleginn commented Feb 1, 2023

Thanks! This makes me wonder, what is the tolerance threshold here? These points are not exactly antipodal, neither in terms of latitude nor in terms of longitude (the "true" antipode to point a is (22.6559, 121.0947)). If the model is likely to fail given approximately antipodal points, I would say it makes sense to check for that in advance and raise some kind of AntipodalPointsError.

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

2 participants