Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Announce GPS accuracy #103

Open
steinbro opened this issue Sep 7, 2024 · 4 comments
Open

Announce GPS accuracy #103

steinbro opened this issue Sep 7, 2024 · 4 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@steinbro
Copy link
Member

steinbro commented Sep 7, 2024

@jchudge suggested having the app announce GPS accuracy at startup. This shouldn't require any calculations, just reporting the system's CLLocationAccuracy. But I wanted to open up the implementation details for discussion, specifically that the GPS accuracy can and does change as the user moves around. Should it be announced periodically, or perhaps if it exceeds some threshold?

@steinbro steinbro added enhancement New feature or request good first issue Good for newcomers labels Sep 7, 2024
Copy link

jchudge commented Sep 9, 2024

I would suggest implementing it on opening the app and also when awakening it from 'sleeping'. The intent is to communicate the accuracy at the outset of a person's experience - knowing that they can go into settings to look it up if they need to at other times. During it's earlier incarnation, we implemented something similar that provided updates every time there was a change of about 5 metres or so...this resulted in a fairly constant barrage of notifications which were disruptive and not particularly helpful.

@steinbro
Copy link
Member Author

steinbro commented Sep 9, 2024

Ah, I hadn't realized this information was already exposed to the user, under the Troubleshooting section. To the implementers, the relevant code is here: https://github.com/soundscape-community/soundscape/blob/main/apps/ios/GuideDogs/Code/Visual%20UI/View%20Controllers/Settings/StatusTableViewController.swift#L112

@steinbro
Copy link
Member Author

To play a callout at startup and wake, we can locate the places where the appLaunch glyph is played, namely in these two places:

https://github.com/soundscape-community/soundscape/blob/main/apps/ios/GuideDogs/Code/App/AppContext.swift#L245

https://github.com/soundscape-community/soundscape/blob/main/apps/ios/GuideDogs/Code/Behaviors/EventProcessor.swift#L156

However, we can't simply read the accuracy value at that instant, because the GPS location hasn't been determined yet. We probably need to watch for the first LocationUpdatedEvent to trigger after resume.

@steinbro
Copy link
Member Author

Revising my previous comment: the first accuracy reading on launch/wake generally seems to be very large (i.e. imprecise) and gradually improves with subsequent readings. I think this is what you see when launching a map application, with a circle that starts large and quickly narrows in. If we want to announce a single value that's representative of the "true" accuracy, we'll need to wait until the reading stabilizes. That would make the implementation of this a bit more involved than simply adding a callout in one or two places in the code -- we might need to add a new Behavior that tracks accuracy values and has some heuristic to judge when they've stabilized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants