Select to view content in your preferred language

Setting currentBearing and currentBearingTolerance for a stop isn't effecting the route solve.

231
8
10-07-2025 10:33 AM
JacobCurrier
Emerging Contributor

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? 

0 Kudos
8 Replies
Ting
by Esri Regular Contributor
Esri Regular Contributor

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.

0 Kudos
JacobCurrier
Emerging Contributor

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? 

0 Kudos
Ting
by Esri Regular Contributor
Esri Regular Contributor

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?

0 Kudos
JacobCurrier
Emerging Contributor

Good morning, I haven't been able to get currentBearing to effect a route solve in any direction.

0 Kudos
FrankK
by
Occasional Contributor

Try setting the stop's curb approach as Ting suggest but I believe you want to use "CurbApproach.RightSide"


 

0 Kudos
FrankK
by
Occasional Contributor

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.

 

FrankK_1-1760565508800.png

 

 

 

0 Kudos
JacobCurrier
Emerging Contributor

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. 

0 Kudos
FrankK
by
Occasional Contributor

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.

0 Kudos