feat(pps_capture): allow selecting GPS receiver by device ID (#26719)

* feat(pps_capture): allow selecting GPS receiver by device ID

Add PPS_CAP_GPS_ID parameter to select which GPS receiver's data
is used for PPS timestamp correlation. Matches by device ID rather
than uORB instance index, which avoids dependence on instance ordering.

When set to 0 (default), uses the first available instance for
backward compatibility.

* docs(pps_capture): document PPS_CAP_GPS_ID for multi-GPS setups

* fix(pps_capture): use GPS_MAX_RECEIVERS constant and mark PPS_CAP_GPS_ID reboot-required
This commit is contained in:
Jacob Dahl
2026-03-19 11:25:04 -08:00
committed by GitHub
parent 75a51c19c7
commit 375d540cf8
4 changed files with 56 additions and 12 deletions

View File

@@ -57,6 +57,17 @@ param set PWM_MAIN_FUNC10 2064
param set PPS_CAP_ENABLE 1
```
#### Multi-GPS Setups
If you have multiple GPS receivers, set `PPS_CAP_GPS_ID` to the device ID of the GPS receiver that emits the PPS signal.
When set to `0` (default), the driver uses the first available GPS instance.
You can find the device ID by running:
```sh
listener sensor_gps
```
### Wiring
The wiring configuration depends on your specific flight controller.
@@ -129,5 +140,5 @@ See also:
The PPS signal provides much higher temporal precision than the transmitted time data, which has latency and jitter from serial communication.
::: warning
If the PPS driver does not sending any data for 5 seconds (despite having `PPS_CAP_ENABLE` set to 1), the `SENS_GPS0_DELAY` will be used instead for estimating the latency.
If the PPS driver does not send any data for 5 seconds (despite having `PPS_CAP_ENABLE` set to 1), the corresponding `SENS_GPS*_DELAY` parameter will be used instead for estimating the latency.
:::