-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
Distance calculator - add altitude in formulas #37
Comments
Hi, nice idea. I am thinking of the implementation. If it's better to create a new attribute or create a configuration flag. What do you think? Sorry for the later response, I was on holiday. |
Well I guess it will be best if there is parallel property with calculated distance with included altitude. Right now in my project I'm using both of them. Distance with altitude to have real distance and Distance without altitude to calculate average grade between two points. :) |
OK then :) Would you like to offer PR or I should do the implementation? |
I would probably refactor DistanceCalculator and use instance of it instead static method.
Better ideas for method names? |
Hmm, sounds good to me. I am just not sure about changing API (I am not proud about the library versioning :D ) |
Well, isn't that DistanceCalculator for internal use only? If so, shouldn't be a problem. |
Ahh I see, sorry. So then is not problem at all ;) |
Implemented as |
Hello, right now distance calculator does not add altitude difference between points to distance, and when it's calculating route with elevation gain or loss the results are slightly not correct.
I used pythagorean to include altitude to distance. I don't know if this is correct, but results looks more or less correct. :)
This formula is tested against 141 km path. The difference between distance with 2 formulas is almost 1km.
What do you think if we integrate this or some other formulas to include altitude in distance calculations?
The text was updated successfully, but these errors were encountered: