Skip to main content

Crate squitter

Crate squitter 

Source
Expand description

A no_std, allocation-free parser and encoder for ADS-B (Automatic Dependent Surveillance-Broadcast) messages, per the Mode S extended squitter format (Downlink Format 17), as commonly represented as raw hex frames (e.g. dump1090’s *8D4840D6202CC371C32CE0576098; format).

§Layering

  • frame parses and CRC-24-validates a hex-encoded DF17 frame.
  • bits reads and writes arbitrary-width fields directly against the frame’s plain binary bytes.
  • message decodes/encodes the bit-packed ME field into a typed AdsbMessage, one variant per supported type-code family.

§No allocation

Nothing in this crate uses alloc.

Re-exports§

pub use error::AdsbError;
pub use frame::Frame;
pub use message::AdsbMessage;

Modules§

bits
Bit-level codec for Mode S frame data.
crc
Mode S CRC-24, the frame-integrity layer for DF17 (analogous to NMEA’s XOR checksum for AIS, but a real cyclic redundancy check).
error
Error types for every layer of the decode/encode pipeline.
frame
Raw Mode S DF17 frame parsing: hex text to a checksum-validated, 112-bit/14-byte frame. Analogous to aivdm’s nmea::Sentence::parse, but the wire format here is a plain hex string rather than a comma-delimited NMEA sentence with six-bit ASCII armor.
message
Type-code-dispatched decoding/encoding of a DF17 frame’s ME field into a typed AdsbMessage.
string
The Mode S six-bit callsign alphabet (ICAO Annex 10 Vol IV), used by aircraft identification messages. Distinct from AIS’s six-bit ASCII alphabet (different domain, different mapping): A-Z are 1..=26, 0-9 are 48..=57, space is 32; everything else is unused.

Functions§

decode_line
Decodes a single hex-encoded DF17 frame into a typed ADS-B message.
encode_frame
Encodes a typed ADS-B message into a full DF17 Frame, given the transmitting aircraft’s 24-bit ICAO address and transponder capability level (only the low 24/3 bits of each are used, respectively).