3D Visualization of air traffic
Introducing PlotRTL1090 - a simple routine for 3D visualization of aircraft ADS-B broadcasting through RTL-SDR (using a dump1090 server) and MATLAB
PlotRTL1090 is a simple MATLAB routine to record and visualize air traffic. It makes use of the excellent
dump1090 by @antirez which profits from the ability of a ~$6 USB DTV receptor (RTL-SDR, to the right) to relay raw radio data along a wide spectrum, including the 1090 MHz frequency in which aircraft broadcast ADS-B messages indicating their callsign, altitude, speed, position, etc.
The code is provided on a single file for convenience, but the actual use is divided in two phases. The first portion of the code contains a loop that polls a running
dump1090 server (or forks!) to read the JSON transcript of decoded ADS-B messages and store them in a
.mat file. You can resume this loop at any time to collect additional data (which will be timestamped for your convenience). When enough data is recorded, you can execute the second code cell to render the data into a 3D visualization (which will be also saved as a
- A server running
dump1090to record ADS-B data. For those who don’t have (yet!) an RTL-SDR dongle available, two sample datasets are provided to test the code. Those have been used to generate the renders shown on the following section.
- MATLAB (tested on 2012b and 2014a)
coords contains a recording of air traffic around the Valencia area (LEVC) in Spain. The file
coords_nl has been supplied by /u/theodric of /r/RTLSDR using this code near Amsterdam-Schiphol (EHAM) area in The Netherlands. Using these files some sample renderings are shown below.
Valencia Airport (LEVC)
Using the default options of the provided MATLAB script and the example dataset, the following render can be reproduced, showing the air traffic over LEVC. Note the vertical exaggeration! A high atitude airway can be clearly seen, and some airport operations as well:
Amsterdam-Schiphol Airport (EHAM)
In order to use the data from Schiphol, we must also modify the bullseye center and select which land contours to plot. In this case the most simple option is to select all countries (the render time will be increased):
1 2 3 4 load('coords_nl'); centerLoc = [52.3147007,4.755935]; % EHAM coords countries = shaperead([SHPdir 'ne_10m_admin_0_countries.shp'],... 'UseGeoCoords', true);
Holding, approach and take off patterns (EHAM)
Just by filtering the plotted data by altitude, we can avoid the very crowded high altitude airways and focus on landing/take off operations. Operations from the small Den Helder airport can also be seen:
1 filter = alt < 5000; % feet
Airlines: Ryanair (EHAM)
The filter can contain more elaborate expressions! For instance, let’s use a regular expression to select only flights operated by the blue-and-white irish low cost. As you can see in the following figure, the irish airline appears to avoid using the Schiphol airport, as only high altitude flighs can be seen:
1 filter = cellfun(@(x) ~isempty(regexpi(x,'^RYR.*$')),flg);
- Antirez for
- Christianpanton for the included
- Natural Earth for releasing the included shapefiles as public domain.
This code is licensed under GPL v3.