osmandapp / OsmAnd

OsmAnd
https://osmand.net
Other
4.65k stars 1.02k forks source link

Position Icon Orientation Stuck During Navigation #21067

Open Dollarius opened 4 days ago

Dollarius commented 4 days ago

Description

When in (cycling) navigation mode, the orientation of the position icon gets stuck to a random angle (blue arrow in the following screenshots taken while moving): image

This usually happens a few kilometres AFTER starting the navigation. My usual use scenario is:

  1. Set navigation
  2. Turn screen OFF and ride for a while
  3. Manually turn screen ON to check that I am following the correct route
  4. Turn screen OFF again

I noticed that for the first few kilometres (when the icon works correctly), the elevation widget restarts from 0km every time I turn the phone screen back ON. Once the icon is stuck, it stays stuck forever unless the navigation is ended, after which it re-orients correctly.

Steps to reproduce

  1. Set navigation on a gpx route
  2. The position icon correctly rotates following the direction of motion
  3. Screen OFF
  4. Ride for a while
  5. Screen back ON
  6. The position icon is frozen in a random orientation

This bug possibly started 1-2 months ago, when the following options were introduced

Actual result

The position icon is frozen to a certain orientation.

Expected result

The position icon should rotate following the direction of motion.

Your Environment (required)

Possibly important settings:

OsmAnd Version: 4.9.0#3398m, released 2024-10-09
Android/iOS version: Android 14
Device model: Samsung Galaxy S23
yuriiurshuliak commented 2 days ago

The bug could not be reproduced. For testing, I used the bicycle profile, enabled map orientation as North is Up, and turned on 3D Relief, Hillshade, Contour lines at Zoom 13, and Weather. I also added the Elevation profile widget at the bottom of the screen. Then selected a GPX track for navigation in portrait mode, enabled simulated navigation, and repeatedly turned the phone screen off and on manually during the route.

Throughout the test, the position icon continued to follow the navigation and rotated correctly in the direction of travel after turning the screen back on.

To help us better reproduce the issue, could you please share your bicycle profile settings by exporting them via Menu → Settings → Export, and attach the file here? Additionally, we need the GPX track you're using for navigation.

OsmAnd~ 4.9.0#3487m, released: 2024-10-17

https://github.com/user-attachments/assets/3ecbf5f2-3125-45e2-bd4f-c04eae4859d3

Dollarius commented 2 days ago

Thanks for looking into this. The arrow correctly follows the direction of motion for the first 10-15km, only after that it gets stuck. It happened with many different GPX files, but please find attached the one used in my example, along with my exported cycling settings. StuckPositionArrow.zip

P.S. I just noticed that someone reported a similar issue, though in my case I am manually turning the screen ON/OFF. https://github.com/osmandapp/OsmAnd/issues/20858