logo
Expand description

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

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

pub use deku;

Modules

All data structures needed for parsing DF::ADSB or DF::TisB messages

B-Definition Subfield for Comm-B Messages

Compact Position Reporting for Position Reporting

Structs

13 bit encoded altitude

Latitude, Longitude and Altitude information

Downlink ADS-B Packet

ICAO Address; Mode S transponder code

13 bit identity code

Enums

Even / Odd

Transponder level and additional information (3.1.2.5.2.2.1)

Downlink Format (3.1.2.3.2.1.2)

Type of DownlinkRequest

Airborne / Ground and SPI

Uplink / Downlink

Positive / Negative

SPI Condition

Message Type