Crate adsb_deku[−][src]
Expand description
adsb_deku
Decoder for ADS-B(Automatic Dependent Surveillance-Broadcast)/Mode-S protocol Downlink Format packets from 1090mhz. Derived from Aeronautical Telecommunications Volume IV: Surveillance and Collision Avoidance Systems, Fifth Edition.
support
DF | Name | Section |
---|---|---|
0 | Short Air-Air Surveillance | 3.1.2.8.2 |
4 | Surveillance Altitude Reply | 3.1.2.6.5 |
5 | Surveillance Identity Reply | 3.1.2.6.7 |
11 | All Call Reply | 2.1.2.5.2.2 |
16 | Long Air-Air Surveillance | 3.1.2.8.3 |
17 | Extended Squitter(ADS-B) | 3.1.2.8.6 |
18 | Extended Squitter(Supplementary) | 3.1.2.8.7 |
19 | Extended Squitter(Military) | 3.1.2.8.8 |
20 | Comm-B Altitude Reply | 3.1.2.6.6 |
21 | Comm-B Identity Reply | 3.1.2.6.8 |
24 | Comm-D | 3.1.2.7.3 |
example usage
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) (11)
ICAO Address: a2c1bd (Mode S / ADS-B)
Air/Ground: airborne
Altitude: 23650 ft barometric
CPR type: Airborne
CPR odd flag: even
CPR NUCp/NIC: 7
CPR latitude: (87769)
CPR longitude: (71577)
CPR decoding: global
"#,
frame.to_string()
);
testing and development
testing
Test data was generated using my rtl-sdr with dump1090-fa
.
cargo test
fmt
cargo +nightly fmt
Applications
Server/Demodulation(External) Applications
(C) dump1090_fa
This is the most tested application/implementation of 2400 sample rate demodulation used by flightaware.
./dump1090 --net --quiet
(Rust) dump1090_rs
This is a fork of dump1090_rs with only demodulation and data forwarding functions.
./cargo r --release
Client Applications
dump1090
Dump protocol bytes using this library in the same fashion as dump1090-fa
.
This is mostly used to find bugs with my implementation compared to other parsers, as it will panic on
unimplemented parsing.
cd apps
cargo r --bin 1090 --release
radar tui
Display a radar like tui (terminal user interface) showing aircraft: ICAO address, lat, long. The terminal used is cool-retro-terminal.
cd apps
cargo r --bin radar --release -- --lat="50.0" --long="50.0" --cities "(name,lat,long)" "(name,lat,long)"
Radar Mode
Coverage Mode
Re-exports
pub use deku;
Modules
From https://github.com/asmarques/adsb/blob/master/src/cpr.rs
Structs
(3.1.2.8.7.3)
Table: A-2-97
Downlink ADSB Packet
ICAO Address; Mode S transponder code
Enums
(3.1.2.5.2.2.1) Transponder level and additional information
(3.1.2.8.7.2) Control Field
Downlink Format (3.1.2.3.2.1.2)
TODO This should have sort of [ignore] attribute, since we don’t need to implement DekuRead on this.