osmandapp / OsmAnd

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

Tunnel Navigation has jumping GPS location #20485

Open Mattsela opened 1 month ago

Mattsela commented 1 month ago

Description

I noticed following behaviours in car navigation mode in tunnels.

Now, quite often, immediately after a tunnel, position jumps to somewhere 5200km far away position (Svalbard) for a second and returns immediately to correct position (in CH, in my case). However, navigation stops as there are not maps downloaded between current position and Svalbard. It doesn't create the route from current position to the goal, but asks to download the missing maps between Svalbard and current position (that would be a lot of maps) . There is no way to recover the navigation w/o downloading. So the navigation needs to be cancelled and started a new navigation event from scratch. This is very annoying when there are many tunnels one after another. This happens with the current version (4.8.2), I didn't observe that earlier (4.7.2 or earlier, however, I reinstalled the app as there were also other issues earlier) . I've tried

For me it looks like there is some kind of default position (Svalbard) where position jumps just when it is about to recover GPS data. Just losing it doesn't cause this jump as this happens always when just coming out of a tunnel.

When position had jumped for s short moment to Svalbard, app requests maps between Svalbard and current position (or target) and this request can't be just cancelled/ignored but navigation has to be cancelled (or maps downloaded). Easy solution could be a possibility to ignore the download request and continue navigation from current position until a more robust solution is found. Anyway, that option would be handy

Steps to reproduce

See description, driving through a tunnel

Actual result

See description, navigation event needs to be restarted

Expected result

Continue navigation from current position

Your Environment (required)


OsmAnd Version: 4.7.2 - 4.8.2
Android/iOS version: 12
yuriiurshuliak commented 1 month ago

Related to https://github.com/osmandapp/OsmAnd/issues/18408 https://github.com/osmandapp/OsmAnd/issues/19728

Guylby commented 1 month ago

I had the same bug in previous versions but not as severe: When exiting the tunnel, I'd say 1 every 3 times the gps would reset in the middle of the ocean with Osmand saying "You deviated from your route 5500kms". A reroute got triggered, but after 1-2s the gps got back to the true position and canceled the reroute while normal routing resumed. It never canceled routing asking to download maps though (maybe because my default gps is in the middle of the ocean so no maps exists to be downloaded), but I'll look out for it next time to see if it also does this on my device

yuriiurshuliak commented 1 month ago

To help us check and identify this problem, we need a GPX track recorded using the trip recording feature, when the bug occurred on this route. Additionally, try our beta version and let us know if the issue persists: OsmAnd Beta Versions.

Guylby commented 1 month ago

I haven't been able to reproduce the issue with simulating a gps loss during navigation without moving (ie going to the basement so that gps is lost and going back up). I'm guessing you have to move a fair bit (a few hundred meters at least) without a gps fix for the issue to pop up.

On my end, it seemed like as I exit the tunnels (and I drifted far enough away that the previous gps position is not correct anymore) and the gps starts to get signal back from the satellites, there is a small moment when it's not yet synchronized and it indicates a widly erroneous position (for instance, a point 5500kms away in the middle of the ocean) and this gets passed to osmand that produce the "teleportation". Then gps is synchronized and everything gets back to normal.

I mainly use the gps navigation without any mobile data, so I don't have A-GPS available to get a quicker fix of the position. Maybe a quicker fix from A-GPS hides this issue for most users?

Mattsela commented 1 month ago

That is probably how it works. A-GPS likely helps. I have a car unit, which is using a WiFi connection, but in some cases the mobile network is lost in tunnels and then an erroneous position is indicated for a second. When I didn't have WiFi connection, problem occurred basically every time.

vmicho commented 2 weeks ago

I have same issues. Definitely in 4.8.x, maybe also in later 4.7 - i am for a second "you have been off the route for 5301 km". Sometimes (more often in big tunnels) after getting out of tunnels.

I have a screen recording (nothing to be seen, just a 1 second pause in map moving). Sometimes it points very breefly to a place outside of the world (not on my recording and somehow the Screen Recorder does not record audio).

I also have gpx, there I see also nothing: 2024-08-22_15-12_Thu-bug.gpx.txt

From the gpx it looks like GPS position is correct.

I can try to record few more routes next time.

Rowin63 commented 2 weeks ago

I will not continue in #18408 (closed) but here. My screen video is in this other issue and it´s still the same behaviour. Here´s the recorded track from passing this tunnel. This 2km Tunnel in Vienna has several exits and if you don´t know where to go by yourself, you´re lost. Osmand can´t tell you because it still goes nuts without gps signal.

2024-08-27_15-36_Tue.gpx.txt

This is Osmands behaviour when in the tunnel. https://github.com/user-attachments/assets/c4a3b952-5cab-4f80-9dd3-6e9e68ecfe22

Mattsela commented 2 weeks ago

Here is a gpx file. The glitch happened in the 1st tunnel (always happens there) and in the last. In many others it worked OK this time. I doubt though you see the glitch in the gpx-file (remove the .txt-extension) as it is very short 2024-08-28_08-55_Wed.gpx.Txt

yuriiurshuliak commented 1 week ago

The bug was not reproduced. I followed these steps using the provided track "2024-08-28_08-55_Wed.gpx":

As expected, the location simulation worked correctly in the tunnel despite the lack of a GPS signal.

However, the second video I attached highlights an issue where the track appears to have been recorded as a straight line, bypassing the tunnel without simulating the location.

OsmAnd~ 4.9.0#3096m, released: 2024-08-29