Skip to main content

The best for last: A complete Docker-RPi-RTL-SDR ADSB/ACARS Solution

 

After my last two blogposts [1][2], many of you asked “Why Docker on a Raspberry?” if you can install all the software directly (“There are so much tutorials“). Yeah, that’s right – but think how much work you have to invest to get the following setup running:

sdr_gear

  • Raspberry Pi 2 & 2 RTL-SDR Sticks
    • Nr 1 is monitoring ADSB via dump1090
    • Nr 2 is monitoring ACARS on 2 frequencies via acarsdec
  • FR24FEED (www.flightradar24.com) is taking the data from dump1090 and feeds it to FR24
  • FlightAirMap (PHP/MySQL) is taking the data from acarsdec and dump1090 to generate a comprehensive statistic and live map of your received data.
  • A Mysql server for storing the Data behind FlightAirMap

You need five services which you have to install/compile, to configure, to link and to manage.

But there is a much more convenient solution: docker-compose and one (!) configuration file 🙂

FlightAirMap & dump1090 Screenshots

flightairmap_3
FlightAirMap

flightairmap_2
FlightAirMap

flightairmap_1
FlightAirMap

dump1090
dump1090

The system

let me give you a quick overview. Every “cube” in the following graph is a docker service. Every service is linked in a certain way to another service. Beside these interconnections, some services also share connections to the outside – web interfaces (FlightAirMap & dump1090) or push connections to an external service (FR24 Feeder). The diagram shows you the ‘deluxe’ version. If you don’t have 2 SDR-Sticks around or you don’t need the FR24 Feeder – don’t worry, I’ll start with the basics system and explain how to extend it with different components – it’s easy as playing with LEGO 😉

Schema

 

The “budget” system (dump1090 & FlightAirMap)

schema_minimalThis is the minimal FlightAirMap-System. It consinst of dump1090 and a RTL-SDR stick as an ADSB receiver and FlightAirMap + MySQL as map & statistic hub. Both webinterfaces (dump1090 and FlightAirMap) will be accessible form outside.

 

 

 

 

 

 

 

Let’s start

Please ssh to your raspberry, create a folder (compose-airmap for example) and put the contents of the listing below in a file called docker-compose.ymloh, and please make sure you edit the following lines:

Line No.
5 the –lat & –lon values have to be set accordingly to your receiver location
45 Set your timezone (list of timezones)
54 Set your countrycode (AU=Australia, DE=Germany, …)
55 & 56 Set your lat & lon values  (as in line 5)

 

And now let the magic happen 😉 Execute a  docker-compose up  in the folder containing the docker-compose.yml

Docker will now download all the needed images and start the containers. FlightAirMap will then download and insert basic data to the Mysql database (flight routes, aircraft infos and so on).

Both steps will take a descent amount of time depending on your internet connection. In case something goes wrong or got stuck – just press CTRL+C and run  docker-compose up  again.

If everything is done, you should be able to connect to the dump1090 interface by opening http://<yourraspberryip>:8080 and to the FlightAirMap interface by opening http://<yourraspberryip>.

 

The “medium” system (“budget” + fr24feed)

schema_medium

 

fr24feed is a small application which sends the output of dump1090 to FlightRadar24 where your data will be combined with many other feeders to one big worldmap.

So if you want to use the feeder, just add the following code to your docker-compose.yml. If you don’t plan to send data, just skip this part 🙂

Please make sure you change the FR24KEY 🙂

 

Add the above code to the docker-compose.yml and start via  docker-compose up

The “deluxe” system (“medium” + acarsdec)

SchemaThis solution needs 2 RTL-SDR sticks as we have to decode two different bands of frequencies (ACARS & ADSB). You don’t need to add the fr24feed if you not plan to push your data to flightradar24.

As dump1090 is using the first RTL-SDR stick, acarsdec is configured to use the second (index 1)

 

 

Please make sure you set the correct frequencies – 131.450 & 131.550 are for Australia – you’ll find the frequencies for your location in my last post about ACARS.

 

 

Add the above code to the docker-compose.yml and start via  docker-compose up – short after docker downloaded the image and started the containers, you should see the ACARS message coming in 🙂

 

I hope you like my post – and as usual:

if you have questions, see errors or need more information, drop me a line via the comments or via twitter