osmandapp / OsmAnd

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

Navigation: Reverse track always provides directions to starting point, rather than nearest point #20812

Open david-gpu opened 2 months ago

david-gpu commented 2 months ago

Description

The navigation directions provided when the user selects a reversed track always direct the user towards the beginning of the track, even when the user is already half way through and Point of the track to navigate is set to Nearest point.

Steps to reproduce

Select a track, preferably one you are already following and roughly half-way through. Click the navigation button. Click on the Follow track field. Enable Reverse track direction. In the Point of track to navigate select Nearest point.

Actual result

The navigation instructions direct you all the way towards the beginning (actually, the end) of the track, rather than realizing that you are already following the track and half way through.

Expected result

I expected the algorithm to realize that one is already half way through the track and provide instructions on how to continue from there, rather than asking you to reverse course towards the end of the track.

The expected result above is the behavior that is actually observed when Reverse track direction is disabled. I don't understand why enabling this option changes the behavior of the navigation algorithm.

Your Environment (required)

WARNING Crash-Logs MAY contain information you deem sensitive. Review this CAREFULLY before posting your issue!

OsmAnd Version: 4.8.6
Android/iOS version: Android
Device model: Samsung A71
Crash-Logs: ?
RZR-UA commented 1 month ago

The bug is reproduced.

In "usual" (forward) navigation by track, everything is OK.

In the reverse mode, start/finish points are swapped, but the navigation still goes to the "old finish" first and then to the "new finish" using the additional route.

When the track is reversed, the navigation should consider the reversed way (not only start/finish points).

We are working on it to fix the problem.

forward reverse
1 2