osmandapp / OsmAnd

OsmAnd
https://osmand.net
Other
4.64k stars 1.01k forks source link

Unusual routing recalculation resulting in wrong-way routing that retraces part of the original route #14351

Open jfburke3 opened 2 years ago

jfburke3 commented 2 years ago

Description

I've recently noticed an unusual route recalculation issue where at first OsmAnd generates a perfectly acceptable route. However, after a few minutes, it appears to recalculate the route in a manner that results in a much longer trip. The recalculated route appears to reach a certain point, then reverses back to near the starting location, before creating a straight-line route to another point along the original route but past the reversal point, then reversing itself again to a point near where the first reversal happened, before returning to a route to the destination. As part of the bad recalculation, it routes the wrong way on a one-way highway. A few minutes later, it may then recalculate the route correctly again. I've seen it flip back and forth between the good and bad routes several times if I watch it long enough.

I'll upload some screenshots taken from the current test I'm doing, as well as a few taken several days ago when I encountered it and had time to capture them.

For the current test I'm doing to create this Issue, my start point is this Starbucks location https://osm.org/go/ZQqt_mSTC?m=&node=153625408 selected by tapping on the map (I'm not at the Starbucks, I'm in a private home nearby).

My destination is Armuchee, Georgia (hamlet) https://www.openstreetmap.org/node/153625408 selected via search in OsmAnd.

And the location of the first route reversal is this highway exit https://www.openstreetmap.org/node/1864594790 and it avoids the entire next segment of highway (if you go into OSM edit mode and click on the highway just northwest of that exit, the section that is highlighted is it). The recalculated wrong route will retrace the highway going the wrong way to the node where this highway section ends before reversing itself--you'll see what I mean in the screenshots. I want to emphasize that the initial route that OsmAnd generates does correctly traverse through the highway segment. Also, there appear to be other points along the same highway where it does this--this just happens to be the one I have been able to screenshot, and appears to be in common with different start/end locations.

Also, I'm noticing that on the S20 with the Play store version, the arrival time doesn't change--not only when it recalculates the route, but at all. In the 30+ minutes I've spent putting this report together and taking screenshots, it has remained at 7:00 PM, even when it recalculates the route. On the S9 with the night build, OsmAnd continues to update the arrival time as time moves on.

Also, the S20 appears to be more willing to recalculate the route to the "wrong" one and the back to the correct route frequently, whereas the S9 isn't doing it very often.

Some settings in place on both phones are: Fuel-efficient way OFF Allow private access OFF (although I'm sitting in an area with private roads in OSM as I type this) Consider temporary limitations ON Minimal distance to recalculate route ENABLED (set to 600 feet on the S9 and 394 feet on the S20--I didn't set these, that's what the app put there) In case of reverse direction ENABLED OsmAndLive data ENABLED (on both phones, but I don't have it turned on in the Download Maps section on the S20) Use 2-phase A* routing algorithm ENABLED Smart route recalculation ENABLED and under "Avoid roads" all switches are OFF.

How to reproduce?

Not sure yet--it appears to be random. But so far when I've encountered it, it has always involved a section of I 75 in Georgia (United States). I cannot find anything wrong with the highway in OSM. I haven't yet encountered it in other locations, which doesn't mean it won't happen somewhere else, of course. There may be a correlation to GPS reception strength; I'm not certain either way. I will note that for the tests I'm doing to help write this bug report, I am inside with weak GPS reception. I have had it happen when I was sitting in the car, though.

Your Environment

I've had it happen on 2 devices with different versions of OsmAnd: Samsung Galaxy 20FE, Android version 12, OsmAnd+ 4.2.0, released 2022-05-09 (Play store beta version), OSM Live turned off. Samsung Galaxy 9+, Android version 10, OsmAnd~ night build 4.2.0#33842m, released 2022-04-10, OSM Live turned on and updated today. (I've downloaded night build version 4.2.0#34069m dated 2022-05-22 on the S9+ and will see if I can reproduce it).

Maps used (online or offline):
Your map build for US Georgia, dated April 30, 2022, on both phones. OsmLive updates downloaded in the night build version on the S9+.

I'll upload screenshots separately.

I'm reporting this as a bug rather than a routing issue, because it does initially calculate a good route. Just for some reason something causes it to recalculate, including wrong-way routing on the highway.

jfburke3 commented 2 years ago

These two were taken on the S20 just 10 seconds apart. The correct route was on the screen, then it recalculated the route after I took the screenshot.

jfburke3 commented 2 years ago

This screenshot was on the S9 using different start/end locations, but still using I 75, with the same segment being avoided.

jfburke3 commented 2 years ago

A couple of more screenshots showing strange route stuff.

Zirochkabila commented 2 years ago

Your case was checked with version 4.3.0#13555mqta, released: 2022-06-07 of the OsmAnd application - the case could not be reproduced. Also, the time widget works correctly. Try to reinstall the application and/or update the maps, but before that make a data backup: Menu -> Settings -> Backup & Restore

https://user-images.githubusercontent.com/104760013/172407298-d6fcd7ba-6de6-4442-bdd0-36349d40129e.mp4

vshcherb commented 2 years ago

Please use record GPX track or part of it and share with us, so we could simulate it close to the real environment. Unfortunately for now we're not able to reproduce.