GpsDriver decodes a position-fix stream from a u-blox, NMEA,
RTK, or vendor-custom receiver and exposes it as a series of
GpsFix samples. Drivers that support RTK can also accept RTCM
correction payloads.
The interface
inject_rtcm is a no-op for non-RTK drivers.
Rust
The same driver exists in the Rust SDK as theados-sdk::drivers::GpsDriver
trait. It mirrors the Python base class method for method, with an associated
Session type in place of the opaque GpsSession and a SampleStream<GpsFix>
(a boxed async stream) in place of the Python async generator.
Err(DriverError::NotSupported(...)) from
inject_rtcm when the receiver has no RTK support, where the Python driver
raises NotImplementedError. The GpsFix and GpsCapabilities fields are
identical to the Python ones below.
Capabilities
Fix samples
fix_type follows the common convention: 0 no fix, 2 2D, 3 3D, 4
DGPS, 5 RTK float, 6 RTK fixed.
Manifest permissions
inject_rtcm writes corrections back over the same device link the
driver already opened, so it needs no extra capability.
See also
- Driver layer for the contract.