Turn instructions had wrong distance when using multiple segments #646
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Split of from pull-request #641
The distance from the start for the a segment till the next turn is missing from the distance value of the last turn in the previous segment.
However it's not really that important right now because it's never visible to the user and only used when exporting to gpx in locus-style. (locus:rteDistance and locus:rteSpeed).
Yeah it's all really confusing :)
I've added more explanation to the code maybe this clears it up - or make it worse.
Ok. I've changed the test so the brouterTotal.json remains untouched.
Ah ok. I did not know that the server could handle multiple segments. So yes you're right it's also a backend bug. Consider this route without the first waypoint:
The distance for the first turn changes from 88 to 140. That's the almost the same as my calculated value of 141.
Is this important enough to also open a bug for brouter itself? Because unless someone is using the old export it should not affect a brouter-web user once this patch is merged?