Planes send position and other meta data via radio to stations on the ground - like airport towers. Using a simple and cheap SDR (Software Defined Radio) and some easy to configure software, it is possible to decode the messages send by the airplanes. Using some tools, their positions can be seen on a map view. In this blogpost I document how to configure the software "dump1090", a tool which enables the exact things I just described.
For the devices I got one of these bad boys here, which you can find for a couple of bugs on Amazon:
The next thing you need is a suitable antenna. ADS-B is sent at 1090 MHz.
My SDR-Stick came with a default one suited for DVB-T reception, which worked just fine (sadly I had to destroy it because I needed it for another experiment). If you got one of those you should be ready to go ahead. I build a new one using these very simple instructions I found here, and fitted it to my shelf using some tape. Using this antenna I was able to receive signals from more than 250km distance.
Last but not least just connect the stick up to your system (I used a raspberry pi), and follow these steps to get it up and running! :)
Setup the device
Let`s have a look on how to setup the device.
if not done already, find one of those devices and buy it.
connect it via USB to your Linux or MacOS computer
check if it is detected using
lsusb. It should show up as "RTL2838"
[basti@archRPI ~]$ lsusb Bus 001 Device 004: ID 0bda:2838 Realtek Semiconductor Corp. RTL2838 DVB-T
Installation - dump1090
Dump1090 is a tool that can decode the data send by the planes and display it on a map. This is how to install it.
- Download the source and build it
git clone https://github.com/MalcolmRobb/dump1090.git cd dump1090/ make
- start the server with the following command. It will start reading available values via ADS-B
sudo ./dump1090 --interactive --net
you can now have a look at your tracked flights opening http://localhost:8080
- Create a new file in
etc/systemd/system/dump1090.servicewith the following contents:
[Unit] Description=dump1090 as a service [Service] Type=simple RestartSec=5 Restart=on-failure WorkingDirectory=/home/YOURUSER/dump1090 ExecStart=/home/YOURUSER/dump1090/dump1090 --interactive --net [Install] WantedBy=multi-user.target enable and execute the service sudo systemctl enable dump1090.service sudo systemctl start dump1090.service
Reverse Proxy with Apache
- enable proxypass for apache, therefore in your apache conf (e.g.
/etc/httpd/conf/httpd.conf) uncomment or add these lines
LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_http_module modules/mod_proxy_http.so
- in apache conf (e.g. located
/etc/httpd/conf/httpd.confon Arch) add the following lines:
<Location /dump1090> ProxyPass http://127.0.0.1:8080 </Location>
~/dump1090/public_html/gmap.htmland fix the now wrong references, like so
- restart apache
sudo systemctl restart httpd
- then in gmap.html, add it like this