ResponsePath time not equal sum instruction times?


I find some routes where the total time of the route is not equal of sum of the time of the instructions. Is that expected?

Route: 256013 Sum Instructions: 236013


Can you share your route? Did you use the GraphHopper Directions API or did you run your own instance of GraphHopper? And did you use the heading parameter? And maybe u_turn_costs? There is a known issue which leads to such a difference when the heading penalty is applied: Remove headingPenaltyMillis by easbar · Pull Request #2563 · graphhopper/graphhopper · GitHub

We use our own instance of GraphHopper. We are using u_turn_costs not the heading parameter.

The route is in Poland and goes
From: (52.2114486694336, 21.0230960845947)
To: (52.2108154296875, 21.0210456848145)

      turn_costs: true
      u_turn_costs: 20

Ok then this is it: The u_turn_costs (20s) are not accounted for in the instructions. There is also this todo in the code:

I think we can consider this a bug and I’ll open an issue on GitHub → Turn costs are not included in instruction times · Issue #2572 · graphhopper/graphhopper · GitHub

Thanks @easbar

(I fixed it here )


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.