Planespotting with Rust: using nom to parse ADS-B messages

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • nom

    Rust parser combinator framework

  • Just in case you are not familiar with nom, it is a parser combinator written in Rust. The most basic thing you can do with it is import one of its parsing functions, give it some byte or string input and then get a Result as output with the parsed value and the rest of the input or an error if the parser failed. tag for example is used to recognize literal character/byte sequences.

  • ads-b-parser

  • You can find the full source code here: ads-b-parser. This is by no means a complete parser but here's what I was able to achieve with it:

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • usbipd-win

    Windows software for sharing locally connected USB devices to other machines, including Hyper-V guests and WSL 2.

  • ADS-B is a protocol used by aircrafts to broadcast their position, altitude, speed, and other information. Nowadays, the majority of aircrafts broadcast ADS-B messages constantly. Anyone with the right equipment can listen to these messages. You can buy a relatively cheap USB dongle with an antenna on Amazon and install drivers for it on Linux. In my case I used usbipd-win to mount the USB device inside Ubuntu running in WSL2. Then I installed the Linux drivers and dump1090, a program that makes use of these drivers and then outputs ADS-B messages in a format that is easy to parse. While you can use dump1090 to display a neat table full of information about aircrafts, I wanted to use its raw output capabilities to parse ADS-B messages myself. It starts a simple TCP server that outputs raw ADS-B messages wrapped in Mode-S Beast frames. I'm not sure what Beast means, but I found something that looks like its spec here.

  • dump1090

    Dump1090 is a simple Mode S decoder for RTLSDR devices (by flightaware)

  • ADS-B is a protocol used by aircrafts to broadcast their position, altitude, speed, and other information. Nowadays, the majority of aircrafts broadcast ADS-B messages constantly. Anyone with the right equipment can listen to these messages. You can buy a relatively cheap USB dongle with an antenna on Amazon and install drivers for it on Linux. In my case I used usbipd-win to mount the USB device inside Ubuntu running in WSL2. Then I installed the Linux drivers and dump1090, a program that makes use of these drivers and then outputs ADS-B messages in a format that is easy to parse. While you can use dump1090 to display a neat table full of information about aircrafts, I wanted to use its raw output capabilities to parse ADS-B messages myself. It starts a simple TCP server that outputs raw ADS-B messages wrapped in Mode-S Beast frames. I'm not sure what Beast means, but I found something that looks like its spec here.

  • adsb-tools

  • ADS-B is a protocol used by aircrafts to broadcast their position, altitude, speed, and other information. Nowadays, the majority of aircrafts broadcast ADS-B messages constantly. Anyone with the right equipment can listen to these messages. You can buy a relatively cheap USB dongle with an antenna on Amazon and install drivers for it on Linux. In my case I used usbipd-win to mount the USB device inside Ubuntu running in WSL2. Then I installed the Linux drivers and dump1090, a program that makes use of these drivers and then outputs ADS-B messages in a format that is easy to parse. While you can use dump1090 to display a neat table full of information about aircrafts, I wanted to use its raw output capabilities to parse ADS-B messages myself. It starts a simple TCP server that outputs raw ADS-B messages wrapped in Mode-S Beast frames. I'm not sure what Beast means, but I found something that looks like its spec here.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts