Setting up an ADS-B Receiver

I will describe here how to set up your own ADS-B Receiving station in Linux. You can click on any image to enlarge.

What does a typical ADS-B output look like?

One of the programs that you can use to decode ADS-B with the RTL-SDR dongle is called "DUMP1090". This is a Linux/Max/Windows based command line ADS-B decoder. It is very useful for Linux based devices such as the Raspberry Pi, but it also works just as well on desktop PCs and laptops. With dump1090 you could set up a Raspberry Pi decoder that feeds data to a online webserver which shows a map. Dump1090 can be downloaded from its most updated Git repository here. To download dump1090 for Windows simply go to the Git repository and download the dump1090 zip file. Dump1090 is reported to probably have the best ADS-B decoding performance out of all the software. Another advantage to dump1090 is that extra mapping software is not required as it can generate a Google Map webserver which shows the aircraft. An typical image is shown below.

The dump1090 program when running on a Raspberry Pi can also produce a rather nice plot on a Web browser running on your local network (PC, Linux or Mac). You might also like to use this as a check that the dump1090 program is still running as expected, and that the TCP/IP link is still up on your Raspberry Pi. Simply enter the URL:

http://<address-or-name-of-RPi>:8080

where the address can be a number or a name, e.g.

http://192.168.0.19:8080

The output will look similar to the following:

Another program, one that I use, to display a tracked planes is called Virtual Radar. Virtual Radar Server is an open-source .NET application that runs a local web server. You can connect to the web server with any modern browser and see the positions of aircraft on a Google Maps map. To run this in Linux, you will need to install a program called "Mono". Mono is an open-source implementation of the .NET framework that you can use to run .NET programs under non-Windows operating systems, such as Linux. You can use it to run Virtual Radar Server on Linux. However Mono relies heavily on native libraries which aren't always stable, and the parts of Virtual Radar Server that rely on Windows-only COM modules won't work, so the Windows .NET version is the one to use if you want stability and all of the features.

The web output of the Virtual Radar software is shown below or you can view mine at http://n8mdp.ddns.net:8085/VirtualRadar.

Back to Top

Preparing the Linux machine or a Raspberry Pi

Before I begin, I want to give credit to David & Cecilia Taylor. They have put together some great webpages on a variety of applications for Satellites, Weather, and the Raspberry Pi, one of which is setting up the ADS-B application. I am using their procedure here and will be repeating many of the steps.

Installing the needed software for the RTL-SDR for Linux

Like so many, I am not a Linux expert, but I am a quick learner. If you have RPi/Linux questions, you'll probably need to ask someone else. In the lines below, you can highlight the command required, use Ctrl-C or right-click Copy to get the text into the clipboard, and then if you use a terminal program called PuTTY, you can right-click on the text area of the terminal session to enter the command into your Linux machine or Raspberry Pi.

Please note that during some of the following commands you may be prompted for Yes or No answers, perhaps about the disk space which will be used by the new download. Unless specified otherwise here, simply accept the default answer, usually "Yes" (or "y").

A. Open a command prompt and type: sudo apt-get update

This will update the table of updates to the latest revision.

B. Again at the command prompt type: sudo apt-get upgrade

This will update the operating system to the latest version, and may therefore take "some time".

C. Next, at the command prompt type: sudo apt-get install git-core

This installs the git repository fetch code. You may already have this installed, in which case you will get a message advising that you already have the most up-to-date version.

Back to Top

Installing and compiling the RTL-SDR driver

D. Next, we will use the instructions to setup sdr-rtl which are given on this Web page for a Raspberry Pi. They worked on my Linux machine as well. We stop where the text says "To run the rtl server type rtl_tcp -a and the IP address of your Pi". For your convenience, the instructions are copied below, and these are exactly what I typed into my Linux machine. You don't need to follow the instructions on the quoted Web page as well as what's below. Step (9) below has been changed so that you no longer need the "sudo" commands to run the programs accessing the dongle.

1. sudo apt-get install git

2. sudo apt-get install cmake

3. sudo apt-get install libusb-1.0-0-dev

4. sudo apt-get install build-essential

You can also put all those commands onto one line should you wish (A linux trick I learned):

      sudo apt-get install git git-core cmake libusb-1.0-0-dev build-essential

although I prefer to do one command at a time in case there is an error, and you can see which step caused the problem.

Now install the RTL-2832U USB dongle driver source and compile:

5. git clone https://gitea.osmocom.org/sdr/rtl-sdr.git

6. cd rtl-sdr

7. mkdir build

8. cd build

9. cmake ../ -DINSTALL_UDEV_RULES=ON

10. make

11. sudo make install

12. sudo ldconfig

If this was successful you should see no return on the previous command. Install the RTL-2832U USB dongle into your Linux machine or on an external powered USB HUB if you are using a Raspberry Pi.

NOTE: If you get errors that the compiler can't find 'libusb.h', there is one other step you may have to do before step 9. When I was installing the RTL-SDR files on a Lubuntu system, I had to do the following in a terminal command line:

sudo apt-get install pkg-config

Once I did this, I could then do steps 9 and 10 successfuly!

While many report using a powered USB hub, you may find the built-in ports adequate, if you have enough 5V and power(current) fed to the Raspberry Pi. You may get different results, and possibly if you use the live plug-and-play will more likely need the hub.

cd ~

sudo cp ./rtl-sdr/rtl-sdr.rules /etc/udev/rules.d/

sudo reboot

14. Open a terminal window and type: rtl_test -t

The first time I tried this was with my NooElec R820T tuner, I got the following:

This was what I was expecting to get. Don't worry when it says that there is "No E4000 tuner found, aborting". This is ok. As long as it recognizes the dongle, it says that it is sampling, and that you see the gain values, you should be in good shape.

For Raspberry Pi users, if you get error messages such as "cb transfer status: 1, canceling." it may be because the dongle is taking too much power from the Raspberry Pi. David Taylor claimed not to have seen this with all the dongles he tested. You may be able to resolved this problem by putting the USB dongle on a separately powered USB hub.

Back to Top

Installing Dump1090

E. Now download the latest release dump1090 application source code. We will use the instructions from this Web page. We start following the instructions from about half way down the page where it says "git clone git://github.com/antirez/dump1090.git", which requires us to take these steps:

1. cd ~ or cd /home/pi/ (goes to your home directory)

2. git clone git://github.com/MalcolmRobb/dump1090.git

3. cd dump1090

4. make

NOTE: If got errors at this point where pkg-config could not be found on your Linux, installing pkg-config cures the problem. But if you had no errors from the make step, you will not need not need to do steps 5 and 6.

5. sudo apt-get install pkg-config

6. make

F. When you type "./dump1090 --interactive" in your terminal window, if you've got everything installed, compiled and connected correctly then you should see a screen displaying aircraft being received by your Linux machine or RPi. However, likely you will need to run this with privilege to allow the program to open the port. Note the double "--" if you are typing the command by hand, and note the "./" in front of the word "dump1090".

            ./dump1090 --interactive

If you want to see the output over the network at this point, remember to add the "--net" command-line switch:

            ./dump1090 --interactive --net

Back to Top

Installing Mono

Since I originally chose to use the Virtual Radar software to display my ADS-B information in linux, a program call "mono" is required. As previously mentioned, Mono is an open-source implementation of the .NET framework that you can use to run .NET programs under non-Windows operating systems, such as Linux. You can use it to run Virtual Radar Server on Linux. However Mono relies heavily on native libraries which aren't always stable, and the parts of Virtual Radar Server that rely on

I will be repeating the installation procedure from the Linux page of the VirtualRadar website.

First of all you need to make sure you have the mono runtime installed. For most Linux distributions this can be installed via the package manager (e.g. sudo apt-get install mono-complete on Debian / Ubuntu), otherwise you can go to http://www.mono-project.com and download it from there.

Mono uses X11. Most Linux distributions already have X11 installed but some (notably OS/X) do not and will need to have it installed.

The Mono version has been successfully tested under OS/X Mountain Lion with XQuartz and Mono 3.0.3.

Back to Top

Installing Virtual Radar and configuring

Once Mono (and X11) is installed you can download and unpack VRS from here:

VirtualRadar.tar.gz

Decompress that somewhere. It will create a folder called VirtualRadar - open a shell prompt, cd into the VirtualRadar folder and enter:

mono VirtualRadar.exe

The Web server status section tells you the IP addresses currently connected to the Virtual Radar serve. Just below that section, you will see a hyperlink, like mine http://127.0.0.1:8085/VirtualRadar, that will allow you to pull up the Virtual Radar webpage locally on your computer. Make note of the port address in the IP address. This will be discussed shortly. The Feed status section displays the connections status and message information that is transferred from the dump1090 software. I don't rebroadcast my server data so I am not going to discuss this.

I mentioned about the port used with Virtual Radar. By default VRS will listen to port 8080. If you have other software listening to port 8080, or you just want to use another port, then you can change the port via a configuration file.

Start VRS and click Help | About. Click the link to take you to the configuration files folder. For most Linux distributions it will be ~/.local/share/VirtualRadar.

In the configuration folder create a text file called InstallerConfiguration.xml.

Open the file and paste this into it:

<?xml version="1.0" encoding="utf-8" ?>
<InstallerSettings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<WebServerPort>8080</WebServerPort>
</InstallerSettings>

Change the "8080" in the file to the port number you want. I changed mine to 8085. Keep this in mind as we further configure Virtual Radar server.

Let's start to configure Virtual Radar Server. I will use my settings as the example here. From the menu bar in the VRS window, select Tools and select the Options option. This will open up a window similar to the following:

The first thing that I did was to hit the New button so I could create a new receiver called N8MDP. You can see in the above window how I set all three of the general settings to N8MDP.

The next step is to set the receiver location general settings. By clicking on my newly created N8MDP receiver in the listing, I can set the general settings like I show below:

I would like to discuss the Data Feed:Data Source option here. This setting allows you to select the format that the data feed is transmitting. The supported formats are:

1. BaseStation - Kinetic's de-facto standard, usually transmitted by BaseStation on port 30003.

2. SBS-3 Raw Feed - Kinetic's binary format for Mode-S and ADS-B messages picked up by the SBS-3, usually transmitted either directly by the receiver (when connected to the network) or by BaseStation on port 30006.

3. AVR or Beast Raw Feed - the open standard AVR format for Mode-S and ADS-B messages or the Beast's binary format. Virtual Radar Server can automatically detect which of these formats is being sent.

4. Compressed VRS - a compressed feed format that is similar to BaseStation but requires much less bandwidth. At the time of writing only Virtual Radar Server rebroadcast servers can transmit this format.

For this installation, I use the BaseStation option. It works the best with dump1090.

The other option I want to discuss is the Network:Port option. Don't let this confuse you with the server port option I presented above that defaults to 8080. This is the port number that the receiver or software, in this case dump1090, is transmitting messages on. Port 30003 is the purt number that dump1090 defaults to for this particular purpose.

I recommend that you create a Receiver Location. I think this is used when the information is plotted using Google Maps. As shown below, highlight Receiver Locations and hit the New button.

You can then enter in the options as shown below. I use the N8MDP as the location. You can then put in your Latitude and Longitude information.

The next important configuration setting is the Raw Feed Decoding as I show below. Explore these various settings.

The next configuration is the Web Server settings. Again, explore these settings to see what works for you. Do note the UPnP:Internet port number setting. Make sure you set this to the internet port value I discussed previously. Mine is set to 8085. Don't forget that if you want to share your ADS-B with others on the internet, you must open up this port as well on your internet router as well. Otherwise, nobody outside your firewall on the router will be able to access the data on your webpage.

Next to configure is the Web Site option. It's important that you set the four options in the Google Maps section. This forces Google maps to immeidately to to your location where your receiver is located, the map typ the web page will display and the initial zoom level. The map types include road map, satellite view, etc. Again you can set the options that work the best for you.

Lastly, you can change some of the General settings that best fit your requirements.

Once you have made all of your settings, click the OK button to take you back to the main screen.

I would recommend at this point that you close all of your programs and reboot the computer to get back to a fresh start.

Once you have rebooted your computer, start the dump1090 program in a terminal window. In a second terminal window, cd into the VirtualRadar folder and enter: mono VirtualRadar.exe to start the application. If dump1090 is displaying aircraft data, you should see planes being tracked in the Virtual Radar terminal window and on a webpage. If you do not see any tracked planes in a virtual radar webpage, go back and make sure that all of your settings are correct.

Further documentation on the Virtual Radar server can be found at the Virtual Radar Documentation page.

If you want to install the same Virtual Radar software but on a Windows machine, you can obtain the Windows installer software here. Most of the configuration options I explained above still apply. There have been some updates to the software since I installed it. It is possible some screens may not look the same but the configuration is very similar to what I explained.

Back to Top

Installing Plug-in Options

If you took a look at my Virtual Radar page, you might have noticed silhouettes and flags of various air carriers. These are plug-in options that you can install into your Virtual Radar Server. They are not available from the Virtual Radar website and are no longer available from the original SBS-Resources website. I did confirm that the sites have been taken down. Since these files are no longer available from the site, I zipped up the files for download. The files can be downloaded here.

Once you have downloaded the file, uncompress the files to a new folder in a path similar to the followng:

c:\SBS-resources\Files

Install this on a Windows system to avoid hassles with using software like Linux WINE. You will upload the proper files to the Virtual Radar server software on your Linux machine after you have selected the silhouette and flag files. Let me walk through what I did to get the files I needed for Virtual Radar.

Once you have completed this, you can then proceed to step 7 below.

After the Resources 6.7 (or similar) has been installed:

1. Run the program in Windows. You might get a pop-up windows that looks like the following:

sbs1

I selected the 32-bit box and just hit the next button.

2. The following main window opens:

sbs2

3. There is a file in the Registrations section that we need to get loaded up. Select the Registrations button, then click on the .SQB File button that opens up in the next window.

sbs3

Click the OK button. This process will take a few minutes. Ultimately, you will see the Files copied box fill up like this:

sbs4

The file that we are going to use the BaseStation.sqb file. Go ahead and hit the Close button. Then hit the Home button in the Registrations window.

4. In the Installation File window, choose the Operator Flags button so we can get the soilhouettes and the carrier flags.

sbs2

5. The Operator Flags window opens up so that you can select Operator and Silhouette flag files.

sbs5

Review the various operator flag versions and make your selection. Like in step 3, the following window will pop-up. Hit the OK button to start the process and wait a few minutes for the files to load. When the files are loaded, click Close.

sbs6

6. When the Operator Flags window opens back up, select the Silhouette tab. Then select the Silhouettes button and follow the same process as you did in step 5. Once that is complete, hit the Home button.

7. At this point, you should have the three key file folders installed that are needed to install in your Virtual Radar applications. You will need to go get those folders. They are likely in the director C:\SBS-resources\Files.

To make life easier, I copied the entire SBS-resources file folder that had the contents of all the file folders to a flash drive. I then copied the contents of the entire SBS-resources file folder to the Home directory in my Ubuntu system.

This is all we need from the SBS-resources application.

8. From the menu bar in the VRS window, select Tools and select the Options option. Click on the Data Sources from the tree so that the Aircraft Data information opens up, like I show below.

There are three Aircraft Data lines that need to be filled in:

1. Database filename
2. Flags folder
3. Silhouettes folder

On each line, you have the ability to browse for the necessary files and folders needed. For the Database filename, select the BaseStation.sqb file that is in the Registration folder in the location where you save the entire contents of the SBS-resources folder in your Home directory. For the Flags folder, select the particular OperatorLogos folder that you want to use. Don't select and files, just the folder only. For the Silhouettes folder, again just select the SilhouettesLogos folder only. When you are done, your window should look similar to mine above. If not, go back and make sure you selected the right file and folders you want. When done, click the OK button.

Believe it or not, you are done! Restart your Virtual Radar webpage that you are viewing and see of you start seeing any silhouettes and aircraft operator logos in your page. Also go ahead and click and any of the planes being tracked to see more information about the plane.

 

Untitled Document

Aviation Topics

Experience

Local Airports

Metars

ADS-B

Pictures

My Flying Videos

Jet Videos


Local ADS-B Virtual Radar Sweep

radar

METARs for my local airports:

Cuyahoga County Airport (KCGF)


Cleveland Hopkins International (KCLE)


Lake County Executive Airport (KLNN)


Burke Lakefront Airport (KBKL)


Youngstown-Warren Regional Airport (KYNG)


Akron-Canton Regional Airport (KCAK)

Back to top of page

Untitled Document
|   Home   |    SSTV   |    DSSTV   |    SDR   |    Aviation   |    Projects   |    Weather   |    Logbook    |    Contact   |


© 2024 , Jonathan Tucker N8MDP. All Rights Reserved.
Image by macrovector_official on Freepik