mirror of
https://github.com/adafruit/Adafruit_GPS.git
synced 2026-10-26 22:10:17 +00:00
Report fresh GNSS fixes independently of GGA quality
Co-authored-by: Limor Fried <ladyada@users.noreply.github.com>
This commit is contained in:
1 parent
5da4759bd3
commit
e1d068c899
2 files changed
+9
-3
No files matched your search
@@ -6,8 +6,11 @@ format-error, and parsed-sentence counts every two seconds. Unsupported sentence
|
||||
types count as valid frames but do not increase the parsed count.
|
||||
|
||||
No receiver commands are sent. A position fix is reported when available and
|
||||
is not required to establish communication. Coordinates are printed only with
|
||||
a recent fix. Keep raw captures private if they contain location information.
|
||||
is not required to establish communication. `fix` is true only when the latest
|
||||
fix status is valid and less than five seconds old; coordinates use that same
|
||||
check, including for RMC/GLL-only output. `ggaQuality` reports the last GGA fix
|
||||
quality separately and may be stale when GGA sentences stop arriving. Keep raw
|
||||
captures private if they contain location information.
|
||||
|
||||
| Fixture | Build selection | Receive wiring |
|
||||
| --- | --- | --- |
|
||||
|
||||
@@ -126,9 +126,12 @@ void reportGPS(Adafruit_GPS &gps, ReceiveCounts &counts,
|
||||
Serial.print(counts.formatErrors);
|
||||
Serial.print(F(" parsed="));
|
||||
Serial.print(counts.parsed);
|
||||
bool freshFix = gps.fix && gps.secondsSinceFix() < 5;
|
||||
Serial.print(F(" fix="));
|
||||
Serial.print(freshFix);
|
||||
Serial.print(F(" ggaQuality="));
|
||||
Serial.print(gps.fixquality);
|
||||
if (gps.fix && gps.fixquality && gps.secondsSinceFix() < 5) {
|
||||
if (freshFix) {
|
||||
Serial.print(F(" latitudeE7="));
|
||||
Serial.print(gps.latitude_fixed);
|
||||
Serial.print(F(" longitudeE7="));
|
||||
|
||||
Reference in new issue
Block a user