You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a case in which the starting direction on the street, as well as the starting point, is effectively known. If I use the route tool this starting direction is not taken into account when I try to go from this point to another point. The directions will just start off saying "Continue On ..." when in fact they would preferably say "Turn Around". However, I don't always want them to have to turn around as driving around the block to get going the other way is usually preferable (especially if it's a big truck). Is there a way to pass in the preferable starting direction.
I've not done this yet but it would be interesting to have. Here are some points how this could be solved:
You could somehow force the direction of the edge returned by LocationIndexTree (closest edge in QueryResult)
Or you could put a penalty on all other directions, e.g. in a custom Weighting class
A solution which can also work if CH is enabled could be a tweak in QueryGraph where you would somehow avoid creating the virtual edge(s) in other directions.
direction Provides an initial compass direction of travel to favor when generating the route.
If the direction < 0, then no direction is favored.
If the direction >= 0, then the calculated route will attempt to follow the given direction at the beginning of the route.
This is useful for real-time GPS guided applications in which the user is already traveling in a certain direction and would like to ensure that the returned route starts heading in a similar direction.
I created a branch (#434) that addresses this feature. Unfortunately it is limited to the non-CH case (flexibility mode). Anyhow there are some conventions to be made, where I would appreciate your feedback.
I implemented it such that one can specify the heading parameter for start/stopover/end points as north based clockwise angle measured in radian (0, 2pi). Are there preferences or reasons for different angle conventions (e.g. degree (0, 360) or (-180, 180), east-based, ...)?
Or even other suggestions?
BTW how do you think the arrival heading parameter will work with the via points and end point ?
Sorry I do not really understand the question, but I'll try to answer: in general heading=0 means that the head of the car is pointing north, as well at start or via/end points.
@devemux86 maybe if it helps: there are two options for via points (or end point). The first one tries to avoid a u-turn at via points and the second one enforces a heading e.g. to make sure that a truck arrives at a via point from a specific direction (e.g. otherwise it would be harder for the truck to enter a gate etc)
An implementation of this feature is now available by #434.
Nonetheless, it currently works only in the 'flexibility mode', i.e. without CH.
Furthermore, the heading enforcement happens after the location lookup. Therefore headings are ignored on one-way streets, but an improvement could be, already to select in the lookup only streets which comply to the favored heading.
Furthermore, the heading enforcement happens after the location lookup. Therefore headings are ignored on one-way streets, but an improvement could be, already to select in the lookup only streets which comply to the favored heading.
I imagine you're referring here to via, end points heading?
Because for start point heading, a car is supposed to be already in the needed street (e.g. oneway) and wants to proceed following the street (or lane) direction.
Actually I'm mainly referring to the start point in the case there are two separated (one-way) lanes for the forward and backward direction. Your (latitude, longitude) value might be a bit erroneous and you are located on the wrong side. In this case , the heading value could be a good indicator that your position is actually on the other road. Does this makes sense?
Ok now I see what you mean, thanks for the clarification.
Indeed the GPS accuracy can confuse the situation here and the aforementioned improvement would be valuable.
Closing here for now, although without CH support but this is rather an algorithmic limitation. Feel free to create new separate issues if you don't think so or found a problem.
Activity
karussell commentedon Jun 24, 2014
I've not done this yet but it would be interesting to have. Here are some points how this could be solved:
karussell commentedon Jun 24, 2014
There was also a guy on the mailing list who made a quick workaround ... but I couldn't find it :/
Also this is likely to be easier to fix once we have turn restrictions
[-]Allow for starting direction.[/-][+]Make it possible to specify direction for start and end[/+][-]Make it possible to specify direction for start and end[/-][+]Specify direction for start and end[/+]devemux86 commentedon Nov 3, 2014
I wrote a topic at the mailing list about the option to specify direction for the start of the route.
I copy also here the description of that feature as exists at MapQuest service:
http://open.mapquestapi.com/guidance/#advancedoptions
direction
Provides an initial compass direction of travel to favor when generating the route.
If the direction < 0, then no direction is favored.
If the direction >= 0, then the calculated route will attempt to follow the given direction at the beginning of the route.
This is useful for real-time GPS guided applications in which the user is already traveling in a certain direction and would like to ensure that the returned route starts heading in a similar direction.
Emux
Cruiser - Atlas
jansoe commentedon Jun 6, 2015
I created a branch (#434) that addresses this feature. Unfortunately it is limited to the non-CH case (flexibility mode). Anyhow there are some conventions to be made, where I would appreciate your feedback.
I implemented it such that one can specify the
headingparameter for start/stopover/end points as north based clockwise angle measured in radian (0, 2pi). Are there preferences or reasons for different angle conventions (e.g. degree (0, 360) or (-180, 180), east-based, ...)?Or even other suggestions?
devemux86 commentedon Jun 6, 2015
I would suggest to follow the common bearing guidelines, e.g. like Android describes in
Locationclass:http://developer.android.com/reference/android/location/Location.html#getBearing()
devemux86 commentedon Jun 6, 2015
BTW how do you think the arrival
headingparameter will work with the via points and end point ?karussell commentedon Jun 6, 2015
is the bearing north based?
devemux86 commentedon Jun 6, 2015
http://en.wikipedia.org/wiki/Bearing_(navigation)#Bearing_measurement
Yes, though the reference direction of 0° can be the magnetic or true north.
You can see also here:
http://en.wikipedia.org/wiki/Course_(navigation)
jansoe commentedon Jun 6, 2015
thanx, so I'll probably change to to degree.
Sorry I do not really understand the question, but I'll try to answer: in general
heading=0means that the head of the car is pointing north, as well at start or via/end points.karussell commentedon Jun 6, 2015
@devemux86 maybe if it helps: there are two options for via points (or end point). The first one tries to avoid a u-turn at via points and the second one enforces a heading e.g. to make sure that a truck arrives at a via point from a specific direction (e.g. otherwise it would be harder for the truck to enter a gate etc)
jansoe commentedon Jun 9, 2015
An implementation of this feature is now available by #434.
Nonetheless, it currently works only in the 'flexibility mode', i.e. without CH.
Furthermore, the heading enforcement happens after the location lookup. Therefore headings are ignored on one-way streets, but an improvement could be, already to select in the lookup only streets which comply to the favored heading.
devemux86 commentedon Jun 9, 2015
👍
I imagine you're referring here to via, end points heading?
Because for start point heading, a car is supposed to be already in the needed street (e.g. oneway) and wants to proceed following the street (or lane) direction.
jansoe commentedon Jun 9, 2015
Actually I'm mainly referring to the start point in the case there are two separated (one-way) lanes for the forward and backward direction. Your (latitude, longitude) value might be a bit erroneous and you are located on the wrong side. In this case , the heading value could be a good indicator that your position is actually on the other road. Does this makes sense?
devemux86 commentedon Jun 9, 2015
Ok now I see what you mean, thanks for the clarification.
Indeed the GPS accuracy can confuse the situation here and the aforementioned improvement would be valuable.
devemux86 commentedon Jun 15, 2015
@jansoe @karussell
Played with the direction feature in navigation and works well. 👍
More thorough tests are to be done (regarding the accuracy too).
karussell commentedon Oct 5, 2015
Closing here for now, although without CH support but this is rather an algorithmic limitation. Feel free to create new separate issues if you don't think so or found a problem.