devkit_driver.rtk_navsatfix_shim
rtk_navsatfix_shim.py ───────────────────── Republishes /rover/fix as /gnss/fix with NavSatFix.status corrected from UBXNavPVT.carr_soln.
Problem ─────── ublox_dgnss sets NavSatFix.status = STATUS_GBAS_FIX (2) for both RTK FLOAT and RTK FIXED because sensor_msgs/NavSatFix has no float/fixed distinction. fusioncore maps STATUS_GBAS_FIX → RTK_FIXED (4), so it always believes it has centimetre-level accuracy even when the baseline hasn’t converged.
What this shim actually fixes ────────────────────────────── UBXNavPVT.carr_soln tells us the real answer:
- 0 = no RTK → downgrade ublox_dgnss’s STATUS_GBAS_FIX to the receiver’s
actual GPS/SBAS status so fusioncore doesn’t see false GBAS
1 = RTK FLOAT → STATUS_SBAS_FIX (1); fusioncore sees DGPS (2), not RTK_FIXED 2 = RTK FIXED → STATUS_GBAS_FIX (2); fusioncore correctly sees RTK_FIXED (4)
What this shim does NOT fix ──────────────────────────── fusioncore has no RTK_FLOAT (3) fix type — it only has GPS(1), DGPS(2), RTK_FIXED(4). We map FLOAT → DGPS (closest available) rather than RTK_FIXED. This is conservative: fusioncore will use the HP fix covariance (which reflects float accuracy) but will not gate on RTK quality. To get fusioncore to reject FLOAT fixes, raise gnss.min_fix_type above 2 — but that will also reject DGPS. Full FLOAT/FIXED discrimination requires a fusioncore extension.
Cold-start race mitigation ─────────────────────────── NavSatFix HP and UBXNavPVT are both published by ublox_dgnss, but on cold start the HP fix often arrives before the first valid PVT message. To avoid forwarding early fixes with stale carr_soln, the shim waits up to PVT_TIMEOUT_S for the first PVT before publishing any fix. After that, it publishes immediately regardless of PVT age (the receiver is running and carr_soln updates at 1 Hz or better).
Subscriptions ─────────────
/rover/fix sensor_msgs/NavSatFix position fixes /rover/ubx_nav_pvt ublox_ubx_msgs/UBXNavPVT carr_soln field
Publications ────────────
/gnss/fix sensor_msgs/NavSatFix corrected status
Functions
|
Classes
|