-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Recover route from LOST state if back on course #104
Comments
Currently the This seems preferable to continuing to snap locations and make callbacks for a route that is already considered to be |
Thanks for the answer @ecgreb. The problem is that, in our experience, sometimes the route is considered lost too quickly for a number of different reasons, for example a temporary GPS accuracy jump, a new junction ... I hope you consider the feature in the future. |
@nebular thanks for the feedback we do appreciate it. If you find the snap location algorithm is rerouting too aggressively we could make the threshold for measuring if the location is off route configurable. I'm not sure I totally understand the original use case you are describing though. In the case where the user leaves the highway for an unplanned lunch wouldn't you want to reroute them to get back to the highway? In any event perhaps there is no harm in allowing a route to attempt to recover if a new route has not been set. I'm curious if @dgearhart or @kevinkreiser have thoughts about this in their experience. Is there any downside to allowing a route that has been determined to be lost to recover if the user gets back on course that we may not be considering? |
Hey @ecgreb |
My originally described use case is maybe too specific for our project (where complex routes are planned in advance) and I understand it won't make sense for everybody. But testing the router these days (I love it !!) I've identified situations when the rerouting is triggered because of a temporary GPS accuracy jump, that is quite frequent on the cheap $200 phones, when entering a long tunnel, a newly built junction, etc. Anyways, just having a method in Route to set
In any case, when receiving So the final result is, if you pull off for gas or enter a newly-built junction, etc ... it recovers automatically. If you purposely divert from the route, you can always press the button to get a new route, or wait until the distance threshold has been surpassed to automatically get it. @dnesbitt61 said:
Yes that might be a problem, but I think the functionality should be made optional, so you can programmatically enable route re-snapping or just trigger a recalculation. |
If you go slightly off-course and the route enters the LOST state, there should be a way to recover back to normal state if we're back into the route (ie. calls to
onSnapLocation
happen again).I've tried to set
mRoute.lost
tofalse
via reflection ifonSnapLocation
is called again after the route was in LOST state, and it successfully recovers. This only happens apparently when the rider goes back to the same Instruction, but hey, it's something !It would be fantastic if the route could be recovered when the rider approaches any point of the route. Why? For example, a user can setup an elaborated route, with lots of waypoints, etc. Then suddenly decides to leave the highway and go for an unplanned lunch. At some point he/she would join the route again, maybe skipping some instructions, but is interested in keeping all the calculated route intact.
The text was updated successfully, but these errors were encountered: