[Navigation] TurnSlightLeft or TurnLeft directions for rightmost turn #2417
Labels
No labels
Accessibility
Accessibility
Address
Address
Android
Android
Android Auto
Android Auto
Android Automotive (AAOS)
Android Automotive (AAOS)
API
API
AppGallery
AppGallery
AppStore
AppStore
Battery and Performance
Battery and Performance
Blocker
Blocker
Bookmarks and Tracks
Bookmarks and Tracks
Borders
Borders
Bug
Bug
Build
Build
CarPlay
CarPlay
Classificator
Classificator
Community
Community
Core
Core
CrashReports
CrashReports
Cycling
Cycling
Desktop
Desktop
DevEx
DevEx
DevOps
DevOps
dev_sandbox
dev_sandbox
Directions
Directions
Documentation
Documentation
Downloader
Downloader
Drape
Drape
Driving
Driving
Duplicate
Duplicate
Editor
Editor
Elevation
Elevation
Enhancement
Enhancement
Epic
Epic
External Map Datasets
External Map Datasets
F-Droid
F-Droid
Fonts
Fonts
Frequently User Reported
Frequently User Reported
Fund
Fund
Generator
Generator
Good first issue
Good first issue
Google Play
Google Play
GPS
GPS
GSoC
GSoC
iCloud
iCloud
Icons
Icons
iOS
iOS
Legal
Legal
Linux Desktop
Linux Desktop
Linux packaging
Linux packaging
Linux Phone
Linux Phone
Mac OS
Mac OS
Map Data
Map Data
Metro
Metro
Navigation
Navigation
Need Feedback
Need Feedback
Night Mode
Night Mode
NLnet 2024-06-281
NLnet 2024-06-281
No Feature Parity
No Feature Parity
Opening Hours
Opening Hours
Outdoors
Outdoors
POI Info
POI Info
Privacy
Privacy
Public Transport
Public Transport
Raw Idea
Raw Idea
Refactoring
Refactoring
Regional
Regional
Regression
Regression
Releases
Releases
RoboTest
RoboTest
Route Planning
Route Planning
Routing
Routing
Ruler
Ruler
Search
Search
Security
Security
Styles
Styles
Tests
Tests
Track Recording
Track Recording
Translations
Translations
TTS
TTS
UI
UI
UX
UX
Walk Navigation
Walk Navigation
Watches
Watches
Web
Web
Wikipedia
Wikipedia
Windows
Windows
Won't fix
Won't fix
World Map
World Map
No milestone
No project
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set.
Reference: organicmaps/organicmaps-tmp#2417
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
It was mentioned in #2262

Here we have TurnSlightLeft direction.
Why? Because way is 10.2 degrees left from current direction vector.
Current angle limit for GoStraight is standard 10 degrees from left side in this situation.
Such situation (way goes though rightmost turn) is handled specifically now, so angle limit can be easily customised.
We can extend this limit to e.g. 20 degrees for such situation, so we will have GoStraight in pictured case.
The question is what to do in rare cases when both possible turns go significantly left from current direction vector.
E.g. selected (rightmost) turn is 30 degrees left and another turn is 40 degrees left.
For sure it's incorrect to give directions TurnLeft or TurnSlighLeft if we need rightmost turn.
Should we continue give GoStraight direction after proposed 20 degrees limit? The reason is that our selected rightmost turn is the most straight turn in such situation.
@vng @biodranik
I can easily fix it in proposed way (anyway it will be better then current behaviour).
Let's do it go straight. It would be better than now. And then we'll debug and find some rare cases and think about a better solution.
During modification some bugs were found.
Currently in the process of fixing and refactoring.
For a proper UX, we need to distinguish between displayed arrows and announced directions. So visually it should be left + slight left, but the announcement should say "keep right". What do you think?
So, for rightmost route:
Note 1. This is simplified logic. Directions are compared by angle to be differs enough, not by categories (straight vs slight), to correctly handle border cases.
Note 2. This turn can be discarded if route road is bigger depending on priorities and angles.
It should be considered also, that when the roads are curved, it's very arguable if it is visually left or slight_left, slight_left or go_straight, go_straight or slight_right.
In many cases to play safe it's better to apply similar logic for arrows as for announces.
E.g. it is not easy to say what arrows should be here for red car

(announce will be go_straight or discarded):
Should we draw something like this?

Currently rule for correction of go_straight to slight_turns is applied rather often.
But the rule of Leftmost/Rightmost angle when direction is changed to opposite is applied 2 times in our tests.
Germany_ShuttleTrain_TurnTest

Russia_Moscow_LeningradskiyPrptToTTK_TurnTest:

In the test from the top organicmaps/organicmaps#2417 (comment) such turn is discarded.