-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Wait until after GPS lock hold before updating position, if we can. #8064
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
base: develop
Are you sure you want to change the base?
Conversation
(untested, and some code can be optimised, back on this in a couple days) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR optimizes GPS position updates by implementing a smart hold mechanism that waits for better GPS data before updating the local position, based on the configured update interval. When the GPS update interval is greater than 10 seconds, the system now holds for up to 20 seconds after acquiring a GPS lock to allow for ephemeris data download, resulting in more accurate position fixes.
Key changes:
- Skip immediate position updates on GPS lock when update interval > 10 seconds
- Implement conditional hold logic based on GPS update interval settings
- Restructure GPS state machine logic with clearer documentation
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
After the recent patch, we hold lock for a bit before updating the position. The positions that come in after the hold are genuinely better positions than what we've been doing before. However, they only come 20 seconds after we've got lock. Previously, we would update the local position as soon as we got a lock as well as at the end of the hold, since a hold was not always possible. With this patch, if the settings allow, we should skip that first local position update. Fixes meshtastic#8029
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
After the recent patch, we hold lock for a bit before updating the position. The positions that come in after the hold are genuinely better positions
than what we've been doing before. However, they only come 20 seconds
after we've got lock.
Previously, we would update the local position as soon as we got a lock as well as at the end of the hold, since a hold was not always possible. With this patch, if the settings allow, we should skip that first local position update.
Fixes #8029
🤝 Attestations