Home

Awesome

PlotRTL1090

3D visualization of air traffic through RTL-SDR (dump1090) and MATLAB

Summary

PlotRTL1090 is a simple MATLAB routine to record and visualize air traffic. It makes use of the excellent dump1090, forked by MalcolmRobb from antirez which profits from the ability of a ~$6 USB DTV receptor (RTL-SDR) 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 .gif and .mp4).

Requirements

Example results

The file 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.

load('coords_nl');
centerLoc = [52.3147007,4.755935]; 
countries = shaperead([SHPdir 'ne_10m_admin_0_countries.shp'],'UseGeoCoords', true);

Resultado

filter = alt < 5000; % feet

Resultado

filter = cellfun(@(x) ~isempty(regexpi(x,'^RYR.*$')),flg);

Resultado

Tip: you can concatenate logical expressions in the filter! You could for example select only Ryanair flights operating under 5000 ft by making filter = cellfun(@(x) ~isempty(regexpi(x,'^RYR.*$')),flg) & alt < 6000;. Any combination of altitude, speed, position, callsign, etc. is available!

Acknowledgements

Licensing

This code is licensed under GPL v3.