Add generic GPS UART and NMEA diagnostics - #3200
Open
F4FPR wants to merge 3 commits into
Open
Conversation
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.
What
Adds a compact, observation-only
gps diagcommand available through the normal CLIreply path.
The generic
LocationProviderfallback reports enable state, satellites and fix state.MicroNMEALocationProvideradditionally reports:begin()andstop()call counts.The command also reports the requested GPS setting separately from the provider enable
state. The output is compact enough for the existing 160-byte CLI reply buffer.
Why
During field testing, a ThinkNode M6 with an L76K went from a valid 18/20 satellite fix
to persistent
on, active, no fix, 0 satswithout a node reboot. Agps off/gps oncycle did not recover it. The existing
gpscommand cannot distinguish a silentmodule/UART from a live receiver that is still sending valid NMEA but sees no satellites.
These diagnostics make that distinction without streaming raw NMEA and are useful for
all serial GNSS receivers using
MicroNMEALocationProvider, not only the M6.Implementation notes
MicroNMEA 2.0.6 states that
process()returning true means a complete non-emptysentence was processed, but that sentence may be invalid. This change therefore uses
MicroNMEA::testChecksum()for theok/badcounters. The fix age is updated onlyafter a newly parsed, checksum-valid GGA or RMC sentence reports a valid fix, so unrelated
NMEA traffic cannot make an old fix appear fresh.
Scope
Related to #2862 and #2863.