Merge upstream/dev (80 commits) [upstream-sync]
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
8d0b0dd164
140 files changed
+3573
-853
No files matched your search
+90
-12
@@ -1116,9 +1116,16 @@ region save
|
||||
---
|
||||
### GPS (When GPS support is compiled in)
|
||||
|
||||
#### View or change GPS state
|
||||
#### View GPS state
|
||||
**Usage:**
|
||||
- `gps`
|
||||
|
||||
**Note:** Reports the requested state, receiver activity, last-fix status (last fix gives number of sats and how long ago was the fix), and mode. In periodic mode, `waiting` means the receiver is off between acquisitions; the last fix remains available. `off(hw)` means a hardware GPS switch is off.
|
||||
|
||||
---
|
||||
|
||||
#### Change GPS state
|
||||
**Usage:**
|
||||
- `gps <state>`
|
||||
|
||||
**Parameters:**
|
||||
@@ -1126,20 +1133,43 @@ region save
|
||||
|
||||
**Default:** `off`
|
||||
|
||||
**Note:** Output format:
|
||||
- `off` when the GPS hardware is disabled
|
||||
- `on, {active|deactivated}, {fix|no fix}, {sat count} sats` when the GPS hardware is enabled
|
||||
- `duty, {awake|asleep}, {fix|no fix}, {sat count} sats` in duty-cycle mode
|
||||
**Note:** In duty-cycle mode `gps` answers `duty, {awake|asleep}, {fix|no fix}, {sat count} sats`.
|
||||
|
||||
`gps duty` powers the receiver only around a clock sync and cuts it in between.
|
||||
It is meant for a node that runs GPS purely to keep its (volatile) RTC set — a
|
||||
mast or solar repeater — where a receiver drawing tens of mA continuously
|
||||
dwarfs the rest of the power budget. Clock accuracy is unchanged: the sync
|
||||
cadence matches the periodic re-sync that `gps on` already does. The position
|
||||
still comes from prefs (see `gps advert`), so duty mode does not affect what a
|
||||
repeater advertises. Build-time knobs: `GPS_DUTY_SYNC_INTERVAL_SECS` (1800),
|
||||
`GPS_DUTY_MAX_AWAKE_SECS` (300, the cap on one attempt) and
|
||||
`GPS_DUTY_RETRY_SECS` (3600, backoff after a window with no fix).
|
||||
dwarfs the rest of the power budget. Unlike `gps period`, every attempt is
|
||||
capped even before the first fix ever, so a node that never sees the sky does
|
||||
not keep the receiver powered. It sets `gps period` to 0. The position still
|
||||
comes from prefs (see `set loc`), so duty mode does not affect what a repeater
|
||||
advertises. `gps on` / `gps off` leave duty mode. Build-time knobs:
|
||||
`GPS_DUTY_SYNC_INTERVAL_SECS` (1800), `GPS_DUTY_MAX_AWAKE_SECS` (300, the cap on
|
||||
one attempt) and `GPS_DUTY_RETRY_SECS` (3600, backoff after a window with no fix).
|
||||
|
||||
---
|
||||
|
||||
#### View or change the GPS acquisition period
|
||||
**Usage:**
|
||||
- `gps period`
|
||||
- `gps period <value>`
|
||||
|
||||
**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.
|
||||
|
||||
---
|
||||
|
||||
#### View the last GPS fix
|
||||
**Usage:**
|
||||
- `gps fix`
|
||||
|
||||
**Output:**
|
||||
- `> Fix (n sat): <lat>, <lon>`: the GPS currently has a fix.
|
||||
- `> Last fix <age> ago (n sat)[, acq <time>]: <lat>, <lon>`: position of the last valid fix; `acq` is shown only while the receiver is running and shows how for how long the gps has been trying to get a fix.
|
||||
- `> No fix[, acq <time>]`: no valid fix since the node started.
|
||||
|
||||
**Note:** Ages and durations are given in `s`, `m` or `h`.
|
||||
|
||||
---
|
||||
|
||||
@@ -1149,6 +1179,50 @@ repeater advertises. Build-time knobs: `GPS_DUTY_SYNC_INTERVAL_SECS` (1800),
|
||||
|
||||
---
|
||||
|
||||
#### On demand GPS fix
|
||||
**Usage:**
|
||||
- `gps once`
|
||||
- `gps once -s`
|
||||
|
||||
**Parameters:**
|
||||
- `-s`: also sync this node's clock with GPS time (as `gps sync`)
|
||||
|
||||
**Note:** Starts an acquisition now. If the GPS is off, it is switched and kept on until a valid fix and then turned off.
|
||||
|
||||
**Reply:** `OK - turning on and acquiring` (GPS was off), `OK - waking gps` (periodic mode, receiver off between acquisitions) or `OK - gps already on`. `Error, gps hw switch off` if a hardware GPS switch is off, `Error, gps once not supported`.
|
||||
|
||||
---
|
||||
|
||||
#### View GPS time to first fix statistics
|
||||
**Usage:**
|
||||
- `gps fix_stats`
|
||||
|
||||
**Output:** `> ttf:<last>/<max> ok:<n> miss:<n>`: last and maximum time between a start of the GPS and its first valid fix, then the last count of consecutive starts with a fix (`ok`) or without one (`miss`).
|
||||
|
||||
---
|
||||
|
||||
#### View GPS diagnostics
|
||||
**Usage:**
|
||||
- `gps diag`
|
||||
|
||||
---
|
||||
|
||||
#### 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, 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.
|
||||
|
||||
Covers serial NMEA receivers (`MicroNMEALocationProvider`).
|
||||
|
||||
**Usage:**
|
||||
- `gps guard`: status, e.g. `> ok 7sat time ok +1s`, `> rej region time rej nofix`, `> ok 7sat time wait` (last check passed, no current trusted fix to check again, e.g. GPS asleep between periodic fixes), or `... ALERT gps-clk +3600s 75m` when a trusted fix has disagreed with the clock by the same offset for `GPS_GUARD_ALERT_MIN` minutes.
|
||||
- `gps guard on`, `gps guard off`: turn the guard on or off (saved, default on). While off, every fix and GPS time is accepted and `gps guard` shows `off`.
|
||||
- `gps guard accept`: while an alert is active, confirm that the GPS time is right and apply it to the clock.
|
||||
- `gps fence`, `gps fence <metres>`: fence radius around the configured `lat`/`lon` (`0` = off). Default `GPS_GUARD_FENCE_M` (1000); a value set here is saved.
|
||||
- `gps ref`: the reference position; follows `set lat`, `set lon` and `gps setloc`.
|
||||
|
||||
---
|
||||
|
||||
#### Set this node's location based on the GPS coordinates
|
||||
**Usage:**
|
||||
- `gps setloc`
|
||||
@@ -1157,6 +1231,8 @@ repeater advertises. Build-time knobs: `GPS_DUTY_SYNC_INTERVAL_SECS` (1800),
|
||||
|
||||
#### View or change the GPS advert policy
|
||||
**Usage:**
|
||||
- `get advert.loc`
|
||||
- `set advert.loc <policy>`
|
||||
- `gps advert`
|
||||
- `gps advert <policy>`
|
||||
|
||||
@@ -1164,10 +1240,12 @@ repeater advertises. Build-time knobs: `GPS_DUTY_SYNC_INTERVAL_SECS` (1800),
|
||||
- `policy`: `none`|`share`|`prefs`
|
||||
- `none`: don't include location in adverts
|
||||
- `share`: share gps location (from SensorManager)
|
||||
- `prefs`: location stored in node's lat and lon settings
|
||||
- `prefs`: location stored in node's lat and lon settings (can be different from gps value)
|
||||
|
||||
**Default:** `prefs`
|
||||
|
||||
**Note:** `gps advert` command is the old format but is only accessible when a gps is attached to the unit. It has been kept for compatibility but one should prefer using `get/set` commands instead.
|
||||
|
||||
---
|
||||
|
||||
### Sensors (When sensor support is compiled in)
|
||||
|
||||
Reference in new issue
Block a user