rs1090
rs1090 is a Rust library to decode Mode S and ADS-B messages.
It takes its inspiration from the Python pyModeS library, and uses deku in order to decode binary data in a clean declarative way.
The project started as a fork of a very similar project called adsb-deku, but modules have been refactored to match pyModeS design, implementations extensively reviewed, simplified, corrected, and completed.
The direction ambitioned by rs1090 boil down to:
- improving the performance of Mode S decoding in Python;
- exporting trajectory data to cross-platform formats such as JSON or parquet;
- providing efficient multi-receiver Mode S decoding;
- serving real-time enriched trajectory data to external applications.
If you just want to decode ADS-B messages from your Raspberry and visualize the data on a map, you may want to stick to one of the dump0190 implementations.
The rs1090 library comes with a companion application decode1090 and a Python binding rs1090.
Installation
Run the following Cargo command in your project directory:
Or add the following line to your Cargo.toml:
= "0.2.0" # check for the latest version
For the Python binding:
Usage
In Rust:
use hex;
use *;
In Python:
>>> import rs1090
>>> rs1090.decode("8c4841753a9a153237aef0f275be")
{'df': '17', 'icao24': '484175', 'bds': '06', 'NUCp': 7, 'groundspeed': 17.0, 'track': 92.8125, 'parity': 'odd', 'lat_cpr': 39195, 'lon_cpr': 110320}