Expand description
C FFI bindings for the squitter 1090ES/DF17 (ADS-B extended squitter)
decoder.
Exposes a decode-only subset of squitter’s API: decode a single hex
frame into an opaque message handle, then read common fields off it
(ICAO address, callsign, altitude, raw CPR position fields, ground
speed, vertical rate). See include/squitter.h for the generated C
declarations.
A single decoded squitter position message never carries a resolved
latitude/longitude by itself: CPR position decoding needs one even- and
one odd-format frame paired together (see squitter::message::cpr).
This FFI surface
exposes the raw CPR fields (format, encoded latitude/longitude) rather
than hiding that pairing requirement; a C caller wanting resolved
positions needs to pair frames itself (or, in Rust, use
squitter::message::AirbornePosition::decode’s
squitter::message::PositionPair).
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 squitter itself supports. Embedded consumers
should use the squitter Rust crate directly.
Structs§
- Squitter
Message - Opaque handle to a decoded ADS-B message, owned by the caller until
freed with
squitter_message_free.
Enums§
- Squitter
Error - Error codes returned by
squitter_decode_line.
Functions§
- squitter_
decode_ ⚠line - Decodes a single hex-encoded DF17 frame (bare hex or dump1090’s
*...;framing). - squitter_
message_ ⚠altitude_ feet - Reads barometric altitude, in feet, off a message.
- squitter_
message_ ⚠altitude_ gnss_ meters - Reads GNSS height, in meters, off a message.
- squitter_
message_ ⚠callsign - Reads the aircraft callsign into
bufas a NUL-terminated string. - squitter_
message_ ⚠cpr - Reads the raw CPR-encoded position fields off a message.
- squitter_
message_ ⚠free - Frees a message handle returned by
squitter_decode_line. Passing NULL is a no-op. - squitter_
message_ ⚠ground_ speed_ knots - Reads ground speed, in knots, off a message.
- squitter_
message_ ⚠heading_ degrees - True airspeed/indicated airspeed heading, in decimal degrees, off an airspeed-subtype airborne velocity message.
- squitter_
message_ ⚠icao_ address - The transmitting aircraft’s 24-bit ICAO address.
- squitter_
message_ ⚠kind - Which message family this handle holds:
1= identification,2= surface position,3= airborne position,4= airborne velocity,0for a NULL handle. - squitter_
message_ ⚠vertical_ rate_ fpm - Reads vertical rate, in feet/minute (positive = climb), off a message.
- squitter_
version - The
squittercrate version, as a NUL-terminated, statically allocated string (e.g."0.1.1"). Do not free.