brouter-web icon indicating copy to clipboard operation
brouter-web copied to clipboard

Turn instructions had wrong distance when using multiple segments

Open tbsmark86 opened this issue 3 years ago • 3 comments

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).

Your "distance-from-last" comment got me confused,

Yeah it's all really confusing :)

I've added more explanation to the code maybe this clears it up - or make it worse.

So voicehints of the expected test result brouterTotal.json

Ok. I've changed the test so the brouterTotal.json remains untouched.

should match the total download from the server (for this route).

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?

tbsmark86 avatar Sep 26 '22 19:09 tbsmark86

Thanks for splitting up and the clarifying explanation.

I think the goal should be that an exported route from brouter-web always produces basically the same result as the brouter server and app.

Therefore I would want to wait for the pending PR brouter#441, that changes segment-based handling to full route.

nrenner avatar Oct 07 '22 13:10 nrenner