Track aircraft using an ADS-B receiver and Virtual Radar Server (VRS)

VRS radar display

In this guide, I will explain how I set up the software application for an ADS-B receiver. I will also explain how to set up a Virtual Radar Server (VRS), which is a visual display of the received and decoded aircraft data.

I have set up my own Virtual Radar Server here and have written about ADS-B here. To set this up yourself, you will need the following:

  • ADS-B receiver hardware (antenna, receiver, cables, connectors)
  • Raspberry Pi, preferably version 3, including a power supply and SD card
  • Internet access and a network cable (the latter is needed during setup)

Step 1 – Flash Raspbian to your SD card
Flash the latest version of Raspbian (preferably not Lite) to your SD card. I usually do this using Etcher, which can be downloaded here. The latest Raspbian images can be downloaded here.

Step 2 – Enable SSH
After the flashing process finishes, add an empty file named ‘ssh’ (no extension) to the root folder of the ‘Boot’ partition of the fresh SD card. This will allow us to access the Raspberry Pi through SSH in the next steps.

Step 3 – Find the Pi’s IP address
Power up the Raspberry Pi and connect it to the router using your network cable.

Access your router’s control panel – you can find its IP address by starting the command line (Windows+R and type ‘cmd’) and typing ‘ipconfig’. Look for the IP address that is displayed after ‘Default gateway’.

Now that you have accessed the router’s control panel, find the Raspberry Pi’s IP address in the list of connected devices. Note it down.

Step 4 – Log in through SSH
Log in through SSH using PuTTY, available here. In PuTTY’s address box, type the IP address you just noted down. If successful, you will be prompted for a username and password. The default user is ‘pi’ with password ‘raspberry’.

Step 5 – Configure the Pi
Configure the Pi by typing the following command in PuTTY:

sudo raspi-config

Inside this menu, you will have to perform the following tasks:

  • Change the host name to something less generic (optional)
  • Change the user password (recommended!)
  • Enable VNC (under ‘Interfacing options’, allows easy Wi-Fi configuration)
  • Expand the file system (under ‘Advanced options’)

Reboot after this step. The raspi-config application will ask you to do so upon exiting it.

Step 6 – Optional: set up Wi-Fi
Only if you want to use Wi-Fi. Connect to your Pi through VNC Viewer. It can be downloaded here. Use the same user ‘pi’ and the password that you set (or didn’t) in step 5. Connect to Wi-Fi in the top right corner of the screen. Access your router’s control panel again and note down the IP address as it will differ from the wired connection’s IP. Disconnect the network cable from your Pi and log in through PuTTY using the new IP address.

Step 7 – Optional: assign a static IP address
Setting a static IP is useful to prevent your router from assigning different IP addresses to your Pi, which could break your server setup later on. This process varies per router. I did it by assigning a static IP to the MAC address of my Pi through the router’s control panel. You can also do it in the Pi, but this was the most straightforward method for me.

After finishing this step, reboot the Pi and verify that it acquires the static IP that you just set. Use this IP address from now on.

Step 8 – Install ADS-B decoding software
We will use the wonderful automated installation scripts by Joe Prochazka to install and configure all of the necessary software packages. Make sure  your ADS-B receiver is plugged in and you are logged in through SSH. Run the following commands:

sudo apt-get update
sudo apt-get install git
cd ~
git clone https://github.com/jprochazka/adsb-receiver.git
cd adsb-receiver
sudo chmod +x install.sh
./install.sh

This will start the installation process. When prompted to update the system, choose yes. I personally only installed dump1090-fa, PiAware and the Web Portal since I only feed to FlightAware.

At some point, the installer script will ask you to provide a ‘Heywhatsthat’ ID. This is optional as we will ultimately configure VRS, which has its own settings. These settings can therefore be ignored if wanted.

Reboot your Pi after the installation completes and check http://<IP>/dump190-fa/ (replace <IP> with your Pi’s IP address) to verify that your receiver is indeed configured correctly and displaying aircraft.

Step 9 – Configure the Web Portal
After the installation process is complete, the installer will provide you with an address. Navigate to it and configure the Web Portal. After finishing these steps, complete the web portal setup by executing both of the commands that are displayed. The web portal setup is now complete. Performance graphs can be accessed by navigating to http://IP/graphs.php

Step 10 – Create a FlightAware account and claim your receiver
If you haven’t done so yet, create a FlightAware account here. Go ahead and claim your receiver location here if this is your first receiver set-up. If you are re-configuring an old setup and want to continue with your previous feeder ID, run the following command in your PuTTY console:

sudo piaware-config feeder-id <feeder_id>

Replace <feeder_id> with the feeder ID that is listed on your old receiver’s page at FlightAware.com. Your new data will now be added to your old receiver’s statistics.

Step 11 – Install Mono and VRS
We will now install Mono and VRS. VRS is a Windows application and Mono enables you to run it on a Linux installation. Enter the following commands in PuTTY:

sudo apt install mono-complete
cd ~
mkdir VRS
cd VRS
wget http://www.virtualradarserver.co.uk/Files/VirtualRadar.tar.gz
tar -xvzf VirtualRadar.tar.gz
wget http://www.virtualradarserver.co.uk/Files/VirtualRadar.WebAdminPlugin.tar.gz
tar -xvzf VirtualRadar.WebAdminPlugin.tar.gz

Mono requires an additional configuration file to properly run on Linux. Create it by typing:

sudo nano VirtualRadar.exe.config

Copy and paste the contents of the XML snippet under ‘Mono 4 issues’ on this page to the file you just created. Press CTRL-O to save the file and CTRL-X to exit the text editor.

Step 12 – Change the VRS port
In my case, the default VRS port was already in use. We therefore change it to a different port by typing creating a new file on the Pi’s file system:

sudo nano ~/.local/share/VirtualRadar/InstallerConfiguration.xml

Again go to this page, but now copy-paste the contents under ‘Changing the web server port’ to the file we just created. Change the port number in this file to 8081 (or any value you like). Save and close by pressing CTRL-O and CTRL-X.

Verify that your VRS installation works by executing it:

cd ~/VRS
mono VirtualRadar.exe -nogui

If all goes well, no errors should occur and your should be able to access the Virtual Radar Server through the external IP address that is printed to the screen. Aircraft in your receiver’s range should be visible with the default settings.

Step 13 – Access the Virtual Radar Server Web Admin panel
Shut down the VRS instance from step 12 by pressing ‘Q’ and type the following command:

mono VirtualRadar.exe -nogui -createAdmin:username -password:password

Replace ‘username’ and ‘password’ with a username and password combination of your choice. Now, log in to the VRS web admin panel. You should be able to reach it by navigating to the following address:

http://IP:8081/VirtualRadar/WebAdmin/Settings.html

In which you should replace ‘IP’ with the IP address of your Pi. Log in using the username and password you just created. If all goes well, you should now see the options screen of the Web Admin panel.

Step 15 – Configure VRS to start automatically at boot
For convenience, it is useful to set up VRS to start when the Pi boots up. This way, you can reboot the Pi without having to manually start the VRS server. each time. This is done by executing the following commands through PuTTY:

cd ~
sudo nano vrs.sh

Copy and paste the following contents into the editor:

#!/bin/sh
mono /home/pi/VRS/VirtualRadar.exe -nogui

Save and exit by pressing CTRL-O and CTRL-X. Now execute the following:

chmod +x /home/pi/vrs.sh
crontab -e

Press ‘2’ (nano) if asked to choose a text editor. Append the following line to the file:

@reboot /home/pi/vrs.sh

Again, save and close by pressing CTRL-O and CTRL-X. Test your settings by rebooting the Pi and verifying that you can access the VRS server through the address found in step 12 (http://IP:8081/VirtualRadar)

sudo reboot

Step 14 – Configure VRS receivers through the Web Admin Panel
In the ‘Options’ panel, click ‘Receiver locations’ and add a new location. Give it a name and enter your latitude and longitude. You can find your latitude and longitude using simple tools available through Google.

Click ‘Receivers’ and add a receiver. Call it ‘MLAT’ or something similar. For the location, choose the location you just set. Under ‘Network’, change the port to 30106 – FlightAware sends back MLAT data through this port. Leave all other settings at their default values and close the window. You should now have two receivers, similar to mine below:

Receiver setup in VRS
Receiver setup in VRS

Now go to ‘Merged Feeds’ and add a new one. Give it a suitable name and add both of the previously configured receivers (as shown above) to it. I called it ‘All aircraft’ for convenience. Close the window.

Go back to the ‘Receivers’ settings and set the ‘Web site receiver’ and ‘Closest aircraft receiver’ to the merged feed you just created. This way, by default all aircraft will be displayed when people visit your radar server.

Step 15 – Configure the VRS radar view settings
Now that the we have set up the receivers, we can continue by modifying the user interface to create a default user interface that we like. You might have noticed that my VRS site looks different than one with default settings.

To do this, start the server and open it in your browser. Configure the settings to your liking by pressing ‘Menu’ and then ‘Options’ in the top left corner of the map view. Now navigate to:

http://IP:8081/VirtualRadar/settings.html

And press ‘Export Settings’. Copy the contents of the text box that appears. Now navigate back to your Web Admin Panel which we accessed earlier (http://<IP>:8081/VirtualRadar/WebAdmin/Settings.html) and click ‘Initial Settings’. In the ‘Exported settings’ box, paste the contents of your clipboard. These will now be the default view settings for new visitors.

Step 16 – Optional: Add operator logos and aircraft silhouettes
Operator and aircraft logos can be added and will be displayed in the list right of the map display. They are available through several sources, but I downloaded mine through the Radarspotting forum. You will have to create an account to download the files. After acquiring the ZIP files, place them in designated folders on your Pi (for example, /home/pi/logos and /home/pi/silhouettes) and expand the zip files in these folders.

Go back to your Web Admin Panel options again and click on ‘Data Sources’. Add the paths you created to the ‘Flags folder’ and ‘Silhouettes folder’. This should look something like this:

VRS Data Sources configuration
VRS Data Sources configuration

After saving these settings, the flags and silhouettes should show up in your list of aircraft, provided that you activated these columns in the settings menu.

Step 17 – Forward your VRS port
Now that everything is up and running and configured, we can forward the port we chose. In my case, this is port 8081. The process varies for each router and many tutorials are available online. A Google search query should help you with this. You will need to forward the port for the Pi’s IP address, so keep it handy.

After forwarding the port, you should be able to access your VRS web display through your WAN (Wide-Area Network) IP address. Other parts of the address will stay the same.

Step 18 – Link a domain name
Instead of having to type out the IP address when accessing your VRS website, you can also purchase a domain name and create an A record in the domain’s DNS settings, such that you can access your VRS website in the following way:

http://mywebsite.com:8081/VirtualRadar

This looks much better. Again, creating a DNS record is different for each domain/hosting service and your service provider will be able to provide support if you want to do this but are not sure how to go about it.

This ends the guide. I hope it was helpful. Please send me a message if you find any errors in the guide. Thanks for reading!

7 thoughts on “Track aircraft using an ADS-B receiver and Virtual Radar Server (VRS)”

  1. Hello,
    I try to install this package on my pi, and basically I got pretty far. I am blocked to continue the moment I have to choose for dump 1090-mutability, or dump1090-fa.
    I can not make a selection (using putty) in the leading field (where the * is). I can go up and down with the curser using the arrow keys on my keyboard, but the * is not going with it. A few more screens further the same problem, I can not choose between the 4 feeder options. In this screen no * in the leading fields and moving the red curser up or down has no effect.

    Do you have any idea why this is not possible ?

    Thank you very much for your attention,

    Loek

    1. Hi Loek, I think you can select and deselect by pressing the space bar, which should be confirmed by an asterisk showing up next to the correct package. Can you let me know if this works? Willem

      1. Hello Willem,

        It works as you explained. Hitting the spacebar puts the asterisk in the field of the curser.
        I have it all working without a feeder and the wrong 1090 decoder. So I will start all over again with a clean Raspbian install on the pi.

        Thank you very much for your help,

        Loek

  2. Question: I would like to enable the option to plot a range of a receiver.
    In the PC version of VRS I go to the server and input all the location data, after that the tap in the option of the desktopviewer is visible. How can I do that in the Raspbian version on the Pi ?

    Thanks,
    Loek

    1. Hi Loek,

      For the “Pi” version of VRS (It is still the Windows executable, but it runs under Mono on Linux) you should first install the VRS WebAdmin plugin on your Pi installation as described in my installation instructions.

      Once you’re in the WebAdmin interface (http://ip:port/VirtualRadar/WebAdmin/Index.html) you can configure a receiver and associate a ‘Receiver location’ with it. This should allow you to view receiver range plots, but I have experienced myself that I am only able to view the range plots if I access the VRS system through my local network. You might have to tweak some additional settings but I can’t recall everything from the top of my head. Good luck.

  3. Hello Willem,
    You are Dutch aren’t you ? I go further in Dutch, ok ?

    OK, ik heb het geheugentje opnieuw opgeschoond, Raspbian image nieuw geinstalleerd en weer gestart met jouw beschrijving.
    Dat ging goed totdat ik bij stap 8 kwam. Nadat ik alle regels nauwkeurig heb gekopieerd en gepast in putty, begon het install programma te lopen. Na ongeveer 5 minuten reutelen, kwam er een foutmelding:

    INSTALLATION HALTED. UNABLE TO INSTALL REQUIRED PACKAGE. SETUP HAS BEEN TERMINATED.
    The package “dump1090-fa” could not be installed.
    Dump1090-fa setup halted.
    Press enter to continue…….

    Ik heb even teruggekeken in de log op het putty scherm, en daar zag ik enkele errors (in rood). Zie hier het bewuste stukje log,…..
    Ik hoop dat jij hier iets van kan bakken. Voor mij is het een paar UNIX-straatjes te hoog gegrepen,…….

    dpkg-buildpackage: error: failed to sign .buildinfo file

    Entering the bladeRF build directory…
    Installing the libbladerf1 package…

    dpkg: fout: krijg geen toegang tot archief ‘libbladerf1_*.deb’: Bestand of map bestaat niet

    Installing the libbladerf-dev package…

    Voorheen niet geselecteerd pakket libbladerf-dev:armhf wordt geselecteerd.
    (Database wordt ingelezen … 120070 bestanden en mappen momenteel geïnstalleerd.)
    Uitpakken van libbladerf-dev_2018.08-rc2_armhf.deb wordt voorbereid…
    Bezig met uitpakken van libbladerf-dev:armhf (2018.08-rc2) …
    dpkg: vereistenproblemen verhinderen de configuratie van libbladerf-dev:armhf:
    libbladerf-dev:armhf is afhankelijk van libbladerf2 (= 2018.08-rc2); maar:
    Pakket libbladerf2 is niet geïnstalleerd.

    dpkg: fout bij verwerken van pakket libbladerf-dev:armhf (–install):
    vereistenproblemen – blijft ongeconfigureerd
    Fouten gevonden tijdens verwerken van:
    libbladerf-dev:armhf

    Installing the libbladerf-udev package…

    Voorheen niet geselecteerd pakket libbladerf-udev:armhf wordt geselecteerd.
    (Database wordt ingelezen … 120081 bestanden en mappen momenteel geïnstalleerd.)
    Uitpakken van libbladerf-udev_2018.08-rc2_armhf.deb wordt voorbereid…
    Bezig met uitpakken van libbladerf-udev:armhf (2018.08-rc2) …
    Instellen van libbladerf-udev:armhf (2018.08-rc2) …

    Preparing the dump1090-fa Git repository…

    Creating the ADS-B Receiver Project build directory…

    mkdir: map ‘/home/pi/adsb-receiver/build/dump1090-fa’ is aangemaakt

    Entering the dump1090-fa build directory…
    Cloning the dump1090-fa git repository locally…

    Cloning into ‘dump1090’…
    remote: Counting objects: 8059, done.
    remote: Compressing objects: 100% (20/20), done.
    remote: Total 8059 (delta 10), reused 14 (delta 5), pack-reused 8034
    Receiving objects: 100% (8059/8059), 20.96 MiB | 2.13 MiB/s, done.
    Resolving deltas: 100% (5550/5550), done.

    Building and installing the dump1090-fa package…

    Entering the dump1090-fa git repository directory…
    Building the dump1090-fa package…

    dpkg-buildpackage: info: source package dump1090-fa
    dpkg-buildpackage: info: source version 3.6.2
    dpkg-buildpackage: info: source distribution stable
    dpkg-buildpackage: info: source changed by Oliver Jowett
    dpkg-buildpackage: info: host architecture armhf
    dpkg-source –before-build dump1090
    dpkg-checkbuilddeps: error: Unmet build dependencies: libbladerf-dev
    dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting
    dpkg-buildpackage: warning: (Use -d flag to override.)

    Entering the dump1090-fa build directory…
    Installing the dump1090-fa package…

    dpkg: fout: krijg geen toegang tot archief ‘dump1090-fa_3.5.3_*.deb’: Bestand of map b estaat niet

    Checking that the dump1090-fa package was installed properly…

    INSTALLATION HALTED!
    UNABLE TO INSTALL A REQUIRED PACKAGE.
    SETUP HAS BEEN TERMINATED!

    The package “dump1090-fa” could not be installed.

    ——————————————————————————
    Dump1090-fa setup halted.

    Press enter to continue…
    ANY FURTHER SETUP AND/OR INSTALLATION REQUESTS HAVE BEEN TERMINIATED

    [email protected]:~/adsb-receiver $

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.