Skip to main content

Crate rtcm3_ffi

Crate rtcm3_ffi 

Source
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§

Rtcm3CellData
One satellite/signal cell’s data block within a Rtcm3GpsMsm7 message.
Rtcm3FfiMessage
Opaque handle to a decoded RTCM3 message, owned by the caller until freed with rtcm3_message_free.
Rtcm3GlonassBias
GLONASS Code-Phase Biases (type 1230). Each bias field is only meaningful when its _present flag is true - the underlying signal wasn’t present in the station’s stream otherwise, and _raw reads 0.
Rtcm3GpsMsm7
GPS Full Pseudoranges and PhaseRanges plus CNR, high resolution (type 1077). num_satellites/num_signals/num_cells say how many entries of satellites/cells are meaningful; the rest are unused padding, matching the core crate’s own mask-derived counts.
Rtcm3SatelliteData
One satellite’s data block within a Rtcm3GpsMsm7 message.
Rtcm3StationArp
Stationary RTK Reference Station ARP (type 1005): the base station’s antenna reference point position.

Enums§

Rtcm3FfiError
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 (len bytes long). buf may 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) into out, returning true on a match. Returns false without writing to out if msg is NULL or holds a different message type.
rtcm3_message_as_gps_msm7⚠
Reads msg’s message as a GPS MSM7 message (type 1077) into out, returning true on a match. Returns false without writing to out if msg is 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) into out, returning true on a match. Returns false without writing to out if msg is 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. 1005 for a Stationary RTK Reference Station ARP), or 0xFFFF for 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.