Announce route recalculation #6576
No reviewers
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
5 participants
Due date
No due date set.
Dependencies
No dependencies set.
Reference: organicmaps/organicmaps-tmp#6576
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "recalc_and_begin_tts"
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?
Fixes #5303
Addressing #2802 is saved for a later time under https://github.com/zyphlar/organicmaps/tree/begin_and_recalc_tts
This English string (and translations) seems a bit off to me. Apple Maps starts with "Starting route". Google Maps seems to not have this first string, starts with "Head west etc"
@matheusgomesms yeah there's no perfect option and it's worth discussing. Can you add your experience to #2802 where I've documented some alternatives? This is just the simplest, easiest to implement option but probably not the best
That's what I just did, thanks!
"Rerouting" might be too short, people might not hear it. It's also somewhat technical language which we should avoid IMO
my car's satnav says "Recalculating route" which IMO would be a better option :)
This is exactly the translation I suggested to be used in Portuguese (literal translation of "Recalculating route"), because this is what I also hear on my other apps.
oh yeah! oops 😆
I used "recalculating" at first which I know is standard, but I considered that it's a bit unfriendly (are we using a calculator, or a navigator? Is there math involved? Are we bad drivers for making our GPS do so much math? The more it talks at us the worse we feel about our bad driving and this bad traffic.) A human navigator wouldn't tell their driver "recalculating," they'd say something like "okay, updating the route."
I wonder if a small chime is actually better than words for this, I can remember many times being frustrated at GPS for "recalculating" too much (like let's say if you're taking a detour to a gas station that's a bit off the highway but are too flustered to press buttons on the GPS) and the noise is more irritating than helpful. All we're looking for is a small reminder that the guidance has changed, we're not really communicating any substantial information. The only danger in the reminder being unheard is if the next turn is many miles away and so the GPS silently lets you continue on for a long time, but that can be solved in other ways (like in #2802 where intermediary "...continue for 232 miles" may be a good idea, which doesn't need to necessarily be announced immediately upon recalculation)
I haven't heard Google/etc say "recalculating" in a long time, I wonder what all the various apps do? I know some of them just give a new direction like "turn left" or "continue straight" in lieu of announcing the new route itself. (The immediate question is "recalculating to what, what are you doing???")
Considering OM's simplicity to use, and the availability of some test strings in settings, this announcement is not needed, because the user already knows what he/she just did.
Recalculating the route is a better option considering that it takes some time. Google doesn't say it because it does it (almost) instantly on fast servers.
Why are these counters needed? Are they really needed? Can you please describe the logic here and in a code comment?
@biodranik that's fine, in which case the attached issue should be closed as wontfix and I'll remove "beginning route" as an announcement. Alternately we could announce something more useful like "head north/etc on/to Some Road" as a first instruction like GMaps.
routingRebuildCount is an existing counter so I reused that logic to prevent duplicate or unneeded announcements especially for beginning a new route. Notifications are generated as a separate routine from deciding recalculation is necessary, so it would be major refactoring to try and put a notification on the stack directly from the "we need to / are currently recalculating" function. Instead the need for a recalculation announcement is detected when the counters are off (some class state needs to be persisted in between the unrelated functions.)
It doesn't look like the right solution. There should be a direct place in the code where recalculation is triggered. Counting on side counters (that can be removed/refactored at any time) is not a robust design.
Announcing the first instruction sounds useful. We can fix/merge this PR for recalculation only, and then implement the first instruction in a separate PR.
@biodranik I'm not sure if there is. Notifications are generated opportunistically when a state requiring them has been met, and GenerateNotifications can be called any number of times per actual notification message output; the function needs to know when it should actually output stuff (like the Boolean for Route IsValid so we don't announce invalid routes.) So we need to track if now is a good time to announce route beginning and route recalculation, and the answer is it's a good time (a) if we haven't yet announced the beginning, state stored separately, and (b) if we've recalculated elsewhere (state stored separately) but not yet announced it (again state somehow persisted across multiple announcements but not between routing sessions)
I'm ok with storing state differently somehow but this was the simplest way I could find
I assume that there should be two explicit places in the code, where:
These two places would be the best to announce.
Does it make sense to split this PR into two parts?
I'm ok with changing "follow the highlighted" to an initial instruction. This has already been merged into yesterday's beta so I'm not sure the overall plan but I'm happy to make future improvements too.
You're correct that there are places when routing is started and recalculation is triggered, but those are not places where notifications are triggered. Notifications are placed on the stack via a separate function which is called from a different place so I'm not sure we can directly generate notifications from the route begin or route recalculate functions.
Consider that notifications is a pointer passed into this function and modified. Generating notifications outside of this function would be rearchitecting.
@zyphlar Pease don't consider the beta branch as merged. It's a temporary branch where we cherry-pick some open PRs that need testing.
@vng did you check that code? As an architect, do you see a better way to trigger these notifications?
fr = Recalcul de l'itinéraire
Well, at first glance I can say that checking RoutingSession::IsRebuildingOnly() should be enough here (without counters).
Should try-and-test. IDK how and when these states are updated and if they are correct.
There should be a place in the code that is called once, when route recalculation is triggered, from which notification can be posted. Debug logging can be used if necessary to discover it.
Maybe this will be better (although it could sound longer...), as some original translations are not clear.
@vng looks like the current implementation keeps an internal route state and polls notifications to announce periodically (e.g. on a location update event), instead of using a callback and call native TTS code from C++ at the time of an event. Could it be the source of other issues like delayed/not on-time announcements?
CC @fabwu @zyphlar @kirylkaveryn
@ -234,6 +234,7 @@ private:
double m_passedDistanceOnRouteMeters = 0.0;
// Rerouting count
int m_routingRebuildCount = -1; // -1 for the first rebuild called in BuildRoute().
int m_routingRebuildAnnounceCount = 0; // track TTS announcement state (ignore the first build)
It should also be reset in BuildRoute L77
In the languages I know these strings are a bit off. Something coming from "to recalculate" instead of "recalculating", which seems off to me to be in infinitive for TTS announcements.
@matheusgomesms feel free to suggest more natural translations for the languages you know. I personally think "recalculating" by itself of "rerouting" is most understandable but all suggestions are welcome.
The problem is that the translations are in infinitive, instead of gerund (-ing in English). I can't confirm for all languages, but the ones I know are all off, so I suppose all other languages are off too.
I'll gladly suggest corrections to my languages, but just wanted to confirm that these are the strings that will be used, and will not be replaced by another regen.
Maybe this would be better? (Although a shorter translation is preferred...)
Ahh I see. The problem is Deepl itself. When I use Google Translate for the previous string (en=Recalculating the route), it gives me correct translations. Deepl, for some reason, goes from gerund to infinitive, even if I append "it is" in the beginning.
What about this?
Making Spanish l10n sound more natural. "Recalcular la ruta" means "Recalculate the route". :)
Btw, what's the current status of this PR?
LGTM
@zyphlar could you please apply
es
suggestions?@pastk done
✔ Pixel 6 - Android 15
✔French strings