Created on 03-07-201809:26 PM - edited 09-16-202201:42 AM
Ingest All The Things Series: Flight Data Via Radio
I am using the FlightAware Pro Stick Plus ADS-B USB Receiver with Built-in Filter on a Mac, I should hook this up to one of my raspberry pis and add a longer antenna outside. You need a good antenna, a good location and nothing blocking your signal. It also depends on what air traffic is nearby.
For a proof of concept it's pretty cool to see air data going through a cheap USB stick into a computer stored in a file and loaded into Apache NiFi to send on for data processing.
There is a web server you can run to see the planes on a map which is pretty cool, but I want to just ingest the data for processing.
My Equipment
If you wish to watch the data flash by in a command-line interface, you can run with interactive flag and watch all the updates.
We are dumping the data as it streams as raw text into a file. A snippet of it tailed in Apache NiFi is shown below:
Like everything else, we may want to add a schema to parse into records.
Our ingest flow:
I am getting the REST data from the ADSB Exchange REST API, tailing the raw text dump from dump1090 and reading the aircraft history JSON files produced by dump1090 as well.
For further processing, I send the Aircraft History JSON files to my server cluster to send to a cloud hosted MongoDB database. Thanks to a free tier from mLab.
And our data quickly arrives as JSON in Mongo.
The main install is the dump1090 github and is pretty straight forward.
Installation on OSX
brew update
brew install librtlsdr pkg-config
make
@Hellmar Becker has a really well developed example and presentation on how he is processing this data. See the Apache NiFi code, Python, Setup Scripts and Presentation here: https://github.com/hellmarbecker/plt-airt-2000 My example is with a different USB stick and a different continent.