Repository navigation
GPS guard: reject a fix the receiver reports as 2D (GSA) - #3821
Open
AlexandrTyshchenko wants to merge 1 commit into
Open
AlexandrTyshchenko wants to merge 1 commit into
AlexandrTyshchenko wants to merge 1 commit into
Conversation
The guard checked satellites and HDOP but not the fix type. When the receiver sends GSA, a fix it reports as 2D or no-fix is now rejected (`rej 2d`). Receivers without GSA are unchanged (fix mode unknown). GPS_GUARD_REQUIRE_3D=0 turns the check off. `gps diag` shows the fix mode as `fm`.
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.
Follow-up to the review comment by Avamander in #3753: the guard checked satellites and HDOP, but not the fix type.
MicroNMEALocationProviderreads the fix mode from GSA (any talker: GPGSA, GNGSA, BDGSA, ...). MicroNMEA itself does not parse GSA.GpsGuard::acceptFix()rejects a fix the receiver reports as 2D or no-fix:gps guardshowsrej 2d.GPS_GUARD_REQUIRE_3D=0turns the check off.gps diagshows the fix mode asfm(1 none, 2 2D, 3 3D, 0 no recent GSA), only withGPS_GUARD.Only builds with
GPS_GUARDare affected.Tested on a Faketec (nRF52840) with a UART GPS at 38400: the module sends GSA,
gps diagshowsfm:3, fixes are accepted (ok 5sat), periodic mode keeps working (time to fix 7–40 s over 4 cycles at a 5 min period). A real 2D fix was not observed on the bench (needs an obstructed sky), so the reject path is checked only by reading the code.