GPS: accept a 2D fix, but keep the GPS on for a 3D fix
Per review: a 2D fix is valid, only less precise, and in some places a receiver never gets a 3D fix. So the guard no longer rejects it; instead the fix mode decides when the GPS may sleep: - the fix mode is read from GSA for every NMEA receiver, not only with GPS_GUARD (`fm:` in `gps diag`), and stored with the last fix; - in periodic mode, and for `gps once`, the GPS sleeps only after a 3D fix (or a fix from a receiver that does not report the mode); after a 2D fix it stays on up to the acquisition timeout; - a 2D fix does not replace a 3D fix younger than 5 min (GPS_3D_FIX_PREFERRED_MS).
This commit is contained in:
1 parent
87679ba526
commit
fb210a8441
4 files changed
+31
-25
No files matched your search
@@ -1026,7 +1026,7 @@ region save
|
||||
**Parameters:**
|
||||
- `value`: `0` for continuous tracking, or a period. The value can be postfixed with `s`, `m`, `h` or `d` to specify the unit (seconds by default).
|
||||
|
||||
**Note:** A periodic acquisition stops after receiving a valid fix, then resumes after the configured period.
|
||||
**Note:** A periodic acquisition stops after receiving a valid fix, then resumes after the configured period. If the receiver reports the fix mode (GSA) and the fix is 2D, the GPS stays on up to the acquisition timeout to get a 3D fix; a 2D fix is used as the position, but does not replace a 3D fix younger than 5 minutes (`GPS_3D_FIX_PREFERRED_MS`).
|
||||
|
||||
---
|
||||
|
||||
@@ -1078,7 +1078,7 @@ region save
|
||||
---
|
||||
|
||||
#### GPS anti-spoofing guard (When built with `GPS_GUARD`)
|
||||
With `GPS_GUARD`, a fix becomes the node's last fix (position, telemetry, adverts) only after it passes plausibility checks: at least `GPS_GUARD_MIN_SATS` satellites, HDOP ≤ `GPS_GUARD_MAX_HDOP10`/10, a 3D fix if the receiver reports the fix mode in GSA (`GPS_GUARD_REQUIRE_3D`, default on; status `rej 2d`), inside the optional build-time region (`GPS_GUARD_LAT_MIN/MAX`, `GPS_GUARD_LON_MIN/MAX`), within the fence around the node's configured `lat`/`lon` (if set), no jump faster than `GPS_GUARD_MAX_SPEED_KMH`, and `GPS_GUARD_STABLE_FIXES` consistent fixes in a row. An unverified position is never reported.
|
||||
With `GPS_GUARD`, a fix becomes the node's last fix (position, telemetry, adverts) only after it passes plausibility checks: at least `GPS_GUARD_MIN_SATS` satellites, HDOP ≤ `GPS_GUARD_MAX_HDOP10`/10, inside the optional build-time region (`GPS_GUARD_LAT_MIN/MAX`, `GPS_GUARD_LON_MIN/MAX`), within the fence around the node's configured `lat`/`lon` (if set), no jump faster than `GPS_GUARD_MAX_SPEED_KMH`, and `GPS_GUARD_STABLE_FIXES` consistent fixes in a row. An unverified position is never reported.
|
||||
|
||||
GPS time is written to the clock only while such a fix is current, never earlier than the firmware build date, and, once the clock holds a plausible time (from the build date to 10 years after it), only within `GPS_GUARD_TIME_MAX_STEP` seconds for the first sync and within clock drift (`GPS_GUARD_TIME_DRIFT_BASE` s + `GPS_GUARD_TIME_DRIFT_PPM`) afterwards. Setting the clock manually (`time`, `clock sync`) resets that anchor. A clock outside that window (e.g. a bogus date in 2080) is corrected by the first trusted fix.
|
||||
|
||||
|
||||
Reference in new issue
Block a user