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

Allow user to enforce Haversine distance #233

Open
WPettersson opened this issue May 5, 2021 · 0 comments
Open

Allow user to enforce Haversine distance #233

WPettersson opened this issue May 5, 2021 · 0 comments

Comments

@WPettersson
Copy link

I've noticed some of my distance measurements have been not quite right, and after some investigation I've realised that it's down to gpxpy using the simpler distance calculations that ignore the curvature of the Earth. I realise that this is on purpose, to avoid taxing calculations (see issue #9), but I'd like to at least be able to configure when it is used. For my use-case, computational load is not a concern, so I'd actually prefer to always use the haversine distance.

I'm happy to try to code this up myself, but was wondering how you think it best to include something like this. One option I thought might work would be to add a haversine option to the parse function, but it could also be a module-wide setting like gpxpy.haversineMinDistance = 0 to disable the cheaper computation and always use the haversine distance formula.

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