[Navigation] Unnecessary SlightTurn directions in some situations #2262
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#2262
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?
For some reason I have notification 'Keep left' here, moving by main road to cross-road.
Take a note that this is Cyprus (left-side driving).
In fact a lot such kind of notifications can be heard.
Maybe this is somehow related to the fact that most of roads in Cyprus are not straight.
https://omaps.app/4yxfvno7P6/Strovolou_Avenue
om://4yxfvno7P6/Strovolou_Avenue
I think this is a duplicate of #2238
Agree. Very similar one.
Route:
https://www.openstreetmap.org/directions?engine=fossgis_osrm_car&route=35.14404%2C33.34396%3B35.14498%2C33.34465
My suggestion is to not voice if:
all roads except 1 deviate more then (90 - alpha) degrees from current direction
and 1 road deviates less then (alpha) degrees from current direction
if there is 1 main road road we increase alpha trying to follow main road.
E.g. for alpha = 10
2 equal roads angles:
5, 85 - no voice.
5, 75! - voice
15!, 85 - voice
2 roads. first primary. alpha increase to 20 trying to follow main road
15, 75 - no voice
25!, 75 - voice
15, 65! - voice
75!, 5 - voice
85, 15! - voice
Edit:
Voice = directions
The problem is not in the voice but in the underlying directions. There are some unnecessary directions inserted by the algorithm. More examples where other routers don't have unnecessary turns, but OM has them, will be helpful.
Announcing a turn on the main road with clearly visible secondary roads is completely unnecessary, right? If there are no directions, then it means "continue forward on the current road", right?
Exactly!
Is it correct that white arrows - directions points? If so it's I can easily provide a lot of examples.

From:
https://omaps.app/0yxfvyMryq/ΚΑΠΕΚΛΟΠΟΙΕΙΟΝ_ΦΥΛΑΚΤΟΥ
To:
https://omaps.app/0yxfvwODtI/Longou
Another example:

From:
https://omaps.app/0yxfvN4NFs/
To:
https://omaps.app/0yxfvllmin/
Correct, thanks!
Can you explain current algorithm of determination of directions?
Looks like it is now:
I checked the code for function GetTurnDirection.
It uses the function KeepTurnByHighwayClass
I have created function KeepTurnByAlignedAlternatives using the same design and tested it. It fixed most of issues for me.
Awesome! What cases are still not detected properly?
CC @vng
@AntonM030481 Please, make a PR with your changes.
In fact it solved all my simple cases with unnecessary SlightTurns. Compare:

BTW this helped me to identify road mapping issues.

E.g. here turn is kept, because of allowance of going back using the primary road link.
The question is only about TurnSlightLeft direction.
Maybe we need to convert it to GoStraight if all alternatives turn more then 90 degress:
This is more tricky one. Let's agree that direction is still needed here.

But TurnSlightLeft is questionable again.
Maybe we need to convert it to GoStraight if all alternatives turn more then current turn in the same direction:
Probably "go straight" is a good option.
Alternatively, using Keep Left in the first one would be safer for drivers if there is an alternative right turn/U-turn (the idea is to avoid a wrong right turn). In the second example, the current instruction is obviously a bug, the proper instruction should be Keep Right, not Left, to avoid the obviously incorrect left turn/link. Keep Straight would also be ok.
In any case, your current implementation is better than the existing one. Let's check it in reality. Can you please create a PR?
Sure. This is my 1st pull request to GitHub, so it's a bit challenging :)
#2397