I'm currently trying to account for a moving vehicles orientation when solving a route. From the documentation it appears how to achieve this is by setting the currentBearing and currentBearingTolerance for the starting location (Stop). I've tried setting the bearing to 0 (North) and bearingTol to values between 30-120 , but I am still getting routes solved going in the opposite direction (South). I've also confirmed that the stop returned in the RouteResult has the same bearing and bearingTol set prior to the solve. Not sure if it makes a difference but I am using the world routing service api to perform the route solve. Are there additional settings I need to configure, to achieve the desired behavior?
Setting the bearing sounds correct. Another idea to try is to set the curb approach policy accordingly, such as no U-turn.
I've passed this question to our routing/network folks for more insights.
Good morning, I was finally able to test the curb approach method you mentioned and it seems to also not effect the route solves. I set curb approach for the initial stop to .rightSide and u turn policy to intersections and dead ends but when triggering a route solve from a moving vehicle it's still solving it as if the vehicle is moving in the opposite direction. Were you able to get any feedback from the routing/networking group?
Frank is the expert on this subject. I'll defer further comments to him.
I'm curious - would setting the `currentBearing` to any value result in the the right direction, or does it always results in going to south?
Good morning, I haven't been able to get currentBearing to effect a route solve in any direction.
Try setting the stop's curb approach as Ting suggest but I believe you want to use "CurbApproach.RightSide"
You mention "but when triggering a route solve from a moving vehicle", not sure if it relevant but if you just set 2 points for a route (along with the other properties) what does that produce? I'm wondering if "from a moving vehicle" matters.
Here is an example of what i set and the result i see (added arrows to show directions), this is using the world routing service also.
Good morning, I don't believe the moving vehicle is necessarily relevant here. Primarily what we are trying to solve is If a user misses a turn, we trigger another route solve and would like the route result to be in the direction the vehicle is currently moving. I tested it a bit with all of the settings combined, but I'll try again today and let you know.
Since you are using world routing service I could also try here if you could you send me the route parameters and the x,y's + properties you are setting on the stops.