Variable default speed per request

Hello,

We are collecting information from our riders and have identified patterns for default speed.

We want to change the default speed for the vehicle for few requests based on the client… Ive added support to take default speed as another query parameter in the route API…

I’ve introduced a query parameter in the Route Resource / endpoint… to receive the default parameter…

In graphhopper core… RoutingUtil, I am creating instances of CarFlagEncoder with different default speeds…

And while trying to get the vehicle encoder based on the vehicle type, I look at the default speed as well and return the corresponding vehicle encoder instance…

However, when the request comes… I dont see the default speed fields getting accessed… it was being accessed when graphhopper boots up but not per request…

I vaguely understood that its trying to read speeds off the edge flags

How do I get this to work ?