Repository navigation
Limit the first periodic GPS acquisition after boot - #3823
Open
AlexandrTyshchenko wants to merge 1 commit into
Open
AlexandrTyshchenko wants to merge 1 commit into
AlexandrTyshchenko wants to merge 1 commit into
Conversation
Before the first fix since boot, a periodic acquisition had no timeout. If no fix is accepted (no sky view, no antenna, or a guard rejecting spoofed fixes), the receiver then stayed on until a fix was accepted. Give that window its own limit, GPS_FIRST_FIX_TIMEOUT_MS (15 min by default, enough for a full almanac; 0 keeps the old behaviour). It counts as a miss and the next acquisition starts after the configured period.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before the first fix since boot, a periodic acquisition has no timeout ("cold start can be long"). If no fix is ever accepted — no sky view, a disconnected antenna, or
GPS_GUARDrejecting spoofed fixes — the receiver stays on until a fix is accepted. On a solar node that's tens of mA for as long as the condition lasts, and the fix-stats never report a miss.This gives that window its own limit,
GPS_FIRST_FIX_TIMEOUT_MS: 15 min by default (a full almanac download takes 12.5 min, so a cold start without backup power still fits). When it expires, the window counts as a miss and the next acquisition starts after the configured period.0keeps the current behaviour. Windows after the first fix still useGPS_PERIODIC_ACQUISITION_TIMEOUT_MS(5 min).Tested on a Faketec (nRF52840, u-blox MAX-M10S,
GPS_GUARD), built withGPS_FIRST_FIX_TIMEOUT_MS=60000and a 2 min period:gps fix_stats→miss:1; next window the same (miss:2)rej region): every window stopped at the limit,miss:3…miss:9over ~25 minttf:7s ok:1 miss:0Also builds for
RAK_4631_repeater, with and withoutGPS_GUARD/GPS_FIRST_FIX_TIMEOUT_MS=0.