-
Notifications
You must be signed in to change notification settings - Fork 120
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
Update lib part four - recalculation at end of track #498
Conversation
I can tell you from experience that if you continue to update the library in large and messy chunks, you are opening Pandora's box. The old rule "untested code is broken code" almost always applies. This pull request broke at least two things:
The bugs might not be related with each other, since the calculated travel time decreases even though the total ascent increases. While the total distance does not change. *) If route A is a subset of route B then the total ascent of route B must be greater than or equal to the total ascent of route A. Example:
|
The first bug is caused by now passing the deltas through the elevation filter: brouter/brouter-core/src/main/java/btools/router/RoutingEngine.java Lines 775 to 780 in 23d55aa
in reverse order. The old (correct) behavior can be restored by iterating through the for loop in reverse:
or by adjusting the elevation filter as follows:
|
The calculation for voice hints and speed profile is moved to the end of track generation.
This only effects tracks with more then two points.
And a recalculation is done for elevation data and track distances.
The output at the moment is not fully correct - the routines for voice hints will follow.
The main discussion is found in #441.