Crate adsb_deku

source ·
Expand description

adsb_deku provides decoding for the ADS-B Downlink protocol by using the deku crate.

See rsadsb.github.io for more details.

Comm-B Altitude Reply and Comm-B Identity Reply Comm-B Support

BDSNameTable
(0,0)Empty
(1,0)Data Link CapabilityA-2-16
(2,0)Aircraft IdentificationA-2-32

Extended Squitter(ADS-B) and Extended Squitter(TIS-B) Type Code Support

Example

To begin using adsb_deku, import the Frame struct as well as the trait deku::DekuContainerRead. This trait is re-exported for your convenience. Frame::from_bytes() provides the interface for decoding bytes into adsb data.

use hexlit::hex;
use adsb_deku::Frame;
use adsb_deku::deku::DekuContainerRead;

let bytes = hex!("8da2c1bd587ba2adb31799cb802b");
let frame = Frame::from_bytes((&bytes, 0)).unwrap().1;
assert_eq!(
        r#" Extended Squitter Airborne position (barometric altitude)
  Address:       a2c1bd (Mode S / ADS-B)
  Air/Ground:    airborne
  Altitude:      23650 ft barometric
  CPR type:      Airborne
  CPR odd flag:  even
  CPR latitude:  (87769)
  CPR longitude: (71577)
"#,
    frame.to_string()
);

Apps

The apps/ directory of the project repository contains programs radar and 1090 for showcasing different adsb_deku uses. See the README.md for examples of use.

Re-exports

Modules

Structs

Enums