Skip to content

Specify direction for start and end #225

Closed

Description

@crowmagnumb

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.

Activity

  1. karussell commented on Jun 24, 2014

    @karussell
    Member

    I've not done this yet but it would be interesting to have. Here are some points how this could be solved:

    1. You could somehow force the direction of the edge returned by LocationIndexTree (closest edge in QueryResult)
    2. Or you could put a penalty on all other directions, e.g. in a custom Weighting class
    3. 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.
  2. karussell commented on Jun 24, 2014

    @karussell
    Member

    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

  3. changed the title [-]Allow for starting direction.[/-] [+]Make it possible to specify direction for start and end[/+] on Jul 23, 2014
  4. changed the title [-]Make it possible to specify direction for start and end[/-] [+]Specify direction for start and end[/+] on Jul 23, 2014
  5. added this to the 0.4 milestone on Aug 18, 2014
  6. devemux86 commented on Nov 3, 2014

    @devemux86
    Contributor

    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

  7. removed this from the 0.4 milestone on Feb 23, 2015
  8. jansoe commented on Jun 6, 2015

    @jansoe
    Contributor

    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?

  9. devemux86 commented on Jun 6, 2015

    @devemux86
    Contributor
  10. devemux86 commented on Jun 6, 2015

    @devemux86
    Contributor

    BTW how do you think the arrival heading parameter will work with the via points and end point ?

  11. karussell commented on Jun 6, 2015

    @karussell
    Member

    is the bearing north based?

  12. jansoe commented on Jun 6, 2015

    @jansoe
    Contributor

    thanx, so I'll probably change to to degree.

    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.

  13. karussell commented on Jun 6, 2015

    @karussell
    Member

    @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)

  14. jansoe commented on Jun 9, 2015

    @jansoe
    Contributor

    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.

  15. devemux86 commented on Jun 9, 2015

    @devemux86
    Contributor

    👍

    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.

  16. jansoe commented on Jun 9, 2015

    @jansoe
    Contributor

    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?

  17. devemux86 commented on Jun 9, 2015

    @devemux86
    Contributor

    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.

  18. devemux86 commented on Jun 15, 2015

    @devemux86
    Contributor

    @jansoe @karussell
    Played with the direction feature in navigation and works well. 👍
    More thorough tests are to be done (regarding the accuracy too).

  19. karussell commented on Oct 5, 2015

    @karussell
    Member

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions