This is a companion application for an ADSB receiver running on a Raspberry PI such as PiAware, FR24 or similar
(using dump1090-fa
software).
This application turns a Raspberry Pi with UnicornHAT HD into a Radar Scope. The receiver's position is marked on the scope as a single bright white dot in the centre of the display, with aircraft currently in the range of the ADSB receiver placed around. The positions of the aircraft on the scope against the white receiver pixel correspond to the real GPS positions of the aircraft in relation to the real GPS position of the receiver.
The altitude of the aircraft on the scope is colour coded and the colour scheme is the same as in the case of
dump1090-fa
web interface (from lowest to highest these go: red - orange - yellow - green - cyan - blue - purple).
In addition, it is possible to add a static list of airports to display on the scope as well. These will be marked as dark gray dots on the display.
To use the application, it has to be running on a Raspberry Pi computer with a UnicornHAT HD (made and sold by
Pimoroni). In addition, you need to have an access to an ADSB receiver based on dump1090-fa
. It is possible that
dump1090-mutability
will also work, however I had no way of testing this.
Note: the ADSB receiver software can, but does not have to, run on the same Raspberry Pi as the PiRadarScope. In case
it is running on a separate computer, all that's required is a network access to the http port on the ADSB receiver
computer, and for the web server to be configured to provide the JSON files with aircraft and receiver data. On a
default PiAware installation, the following two URLs are used (replace localhost
with a hostname of your ADSB
receiver):
Additionally, the RaspberryPi needs to have the UnicornHat HD installed along with the unicornhathd
Python module.
Note, currently the older UnicornHAT has not been tested and therefore is not supported. It may work with only
minimal code changes, so if you have one around, why not giving it a go?
Finally, all code has been tested with Python 3. It may work with Python 2, but YMMV.
The installation steps are as follows:
-
Install
dump1090-fa
based ADSB receiver. Make sure it's receiving aircraft and that you can see them in your web browser on thedump1090-fa
web page. -
Install UnicornHAT HD and accompanying software.
-
Clone this repository from github:
git clone https://github.com/mkrzysztofowicz/piradarscope.git cd piradarscope
-
Copy the example configuration file
radarscope.conf
to/etc
or your home directory (or any other suitable path)sudo cp radarscope.conf /etc/radarscope.conf
-
Copy the daemon file
radarscoped.py
to/usr/local/bin
sudo cp radarscoped.py /usr/local/bin sudo chmod 755 /usr/local/bin/radarscoped.py sudo ln -s /usr/local/bin/radarscoped.py /usr/local/bin/radarscoped
-
Edit the
/etc/radarscope.conf
file to fit your environment. Refer to the comments in the example file for guidance.
Start the daemon using the following command:
sudo radarscoped -c /etc/radarscope.conf
NOTE: The above command should be issued with sudo
, however the daemon drops privileges as soon as it starts
to make sure it doesn't run as the root user.
To make the daemon start automatically at boot, you can use systemd
with the included radarscoped.service
file.
To do so, copy radarscoped.service
into /etc/systemd/system
and issue the following commands:
sudo cp radarscoped.service /etc/systemd/system
sudo systemctl enable radarscoped.service
sudo systemctl start radarscoped
If everything worked well, you should see something similar to below: