Tracking flights with a Raspberry Pi and Arch Linux - ADS-B Ground Station - Part 1
By 2020 most aircraft in the US will be required to broadcast position locations through the new ADS-B standard. The ever handy Raspberry Pi can be turned into a personal ADS-B ground station with the addition of a simple antenna and some open source software. Once completed, you can track the flight path of all ADS-B transmitting aircraft within range of the antenna (potentially up to hundreds of miles away).
This first post will cover setting up the software side of the Raspberry Pi. A second post will address the hardware setup for the project.
Archlinux ARM
This guide mostly follows the same steps as the PiAware project. However, the PiAware project recommends installing on a debian based distro, and since I prefer to use Arch Linux as much as possible, I will be describing how to achieve a similar setup using Arch Linux ARM.
Head over to the Raspberry Pi page on the Arch Linux ARM website. Follow the installation instructions to get a bare version of Arch Linux running on the pi. At this point you can turn on the pi and ssh in using ethernet. The initial root password is root
and the initial hostname for the rpi will be alarmpi
.
ssh root@alarmpi
This is a good time to change the root password, as well as setup a new user. The first section of the General Recommendations article on the Arch Linux wiki site is helpful if you aren't comfortable doing it solo. I also went ahead and setup key-based authentication for ssh and disabled password logins to ssh as well as root ssh access.
Installing additional packages
Back to the actual purpose of the project, it's time to install some additional software to enable the processing of the ADS-B data received from the antenna. Additionally, the base-devel group package needs to be installed so we can build some things from source using the AUR and Arch Linux's makepkg tool.
pacman -S base-devel git wget tcl tcllib rtl-sdr
The RTL-SDR libraries are what are used to interface with the antenna. Now we need to install the 'dump1090' software which is the decoder for the ADS-B signal. Unfortunately, there is no package already build in the Arch Linux ARM repos so I modified the PKGBUILD for the 'dump1090-git' package from the AUR. Simply download the tarball from the previous page, and extract it to a temporary directory.
cd /tmp/
wget https://aur.archlinux.org/packages/du/dump1090-git/dump1090-git.tar.gz
tar xvf dump1090-git.tar.gz
cd dump1090-git
Once in the directory, edit the PKGBUILD so the line that says arch=('i686' 'x86_64') now says arch=('any'). Now make the package and install.
makepkg
Use pacman -U
to install the newly created package.
Wrap up
Now that the software has been installed it is time to install the antenna and the rest of the hardware in part 2.