Expand description
C FFI bindings for the rtcm3 RTCM3 GNSS RTK correction decoder.
Exposes a decode-only subset of rtcm3’s API: decode a single frame
from a raw byte buffer into an opaque message handle, then read its
fields via an rtcm3_message_as_<type> function that fills a plain C
struct - one call per message type, matching mavwire-ffi’s shape.
See include/rtcm3.h for the generated C declarations.
This crate is a plain (non-no_std) library: it targets host
environments linking a shared or static C library, not the embedded
no_alloc use case rtcm3 itself supports. Embedded consumers should
use the rtcm3 Rust crate directly.
Structs§
- Rtcm3
Cell Data - One satellite/signal cell’s data block within a
Rtcm3GpsMsm7message. - Rtcm3
FfiMessage - Opaque handle to a decoded RTCM3 message, owned by the caller until
freed with
rtcm3_message_free. - Rtcm3
Glonass Bias - GLONASS Code-Phase Biases (type 1230). Each bias field is only
meaningful when its
_presentflag istrue- the underlying signal wasn’t present in the station’s stream otherwise, and_rawreads0. - Rtcm3
GpsMsm7 - GPS Full Pseudoranges and
PhaseRangesplus CNR, high resolution (type 1077).num_satellites/num_signals/num_cellssay how many entries ofsatellites/cellsare meaningful; the rest are unused padding, matching the core crate’s own mask-derived counts. - Rtcm3
Satellite Data - One satellite’s data block within a
Rtcm3GpsMsm7message. - Rtcm3
Station Arp - Stationary RTK Reference Station ARP (type 1005): the base station’s antenna reference point position.
Enums§
- Rtcm3
FfiError - Error codes returned by
rtcm3_decode.
Constants§
- RTCM3_
FFI_ MAX_ CELLS - Largest number of satellite/signal cells a single MSM message can describe (the cell mask is 64 bits wide, per the RTCM3 wire format itself).
- RTCM3_
FFI_ MAX_ SATELLITES - Largest number of satellites a single MSM message can describe (the satellite mask is 64 bits wide, per the RTCM3 wire format itself).
Functions§
- rtcm3_
decode ⚠ - Decodes a single RTCM3 frame from the start of
buf(lenbytes long).bufmay contain trailing bytes after the frame (e.g. the start of the next frame in a stream); only the leading frame is parsed. - rtcm3_
message_ ⚠as_ glonass_ bias - Reads
msg’s message as a GLONASS Code-Phase Biases message (type 1230) intoout, returningtrueon a match. Returnsfalsewithout writing tooutifmsgis NULL or holds a different message type. - rtcm3_
message_ ⚠as_ gps_ msm7 - Reads
msg’s message as a GPS MSM7 message (type 1077) intoout, returningtrueon a match. Returnsfalsewithout writing tooutifmsgis NULL or holds a different message type. - rtcm3_
message_ ⚠as_ station_ arp - Reads
msg’s message as a Stationary RTK Reference Station ARP (type 1005) intoout, returningtrueon a match. Returnsfalsewithout writing tooutifmsgis NULL or holds a different message type. - rtcm3_
message_ ⚠free - Frees a message handle returned by
rtcm3_decode. Passing NULL is a no-op. - rtcm3_
message_ ⚠type - The message’s RTCM3 message type (DF002, e.g.
1005for a Stationary RTK Reference Station ARP), or0xFFFFfor a NULL handle or a variant this header doesn’t know about yet. - rtcm3_
version - This crate’s version string, as a NUL-terminated C string with static lifetime.