GithubHelp home page GithubHelp logo

jorgegt / plotrtl1090 Goto Github PK

View Code? Open in Web Editor NEW
133.0 9.0 26.0 44.32 MB

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

License: GNU General Public License v3.0

MATLAB 100.00%
rtl-sdr air-traffic matlab sdr ads-b aviation

plotrtl1090's Introduction

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

  • A server running dump1090 to 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)

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.

  • Valencia Airport (LEVC): using the default options of the provided MATLAB script, the following render can be reproduced: Resultado

  • 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):

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

Resultado

  • 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:
filter = alt < 5000; % feet

Resultado

  • 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:
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

  • Antirez and MalcolmRobb for dump1090.
  • Christianpanton for the included matlab-json function.
  • Natural Earth for releasing the included shapefiles as public domain.

Licensing

This code is licensed under GPL v3.

plotrtl1090's People

Contributors

jorgegt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

plotrtl1090's Issues

Reference to non-existent field 'validposition'.

I try to run your script, but when I select them all below the break and press "Evaluate Selection" i got this error:
Reference to non-existent field 'validposition'.
I use Matlab 2014b and Windows XP (precompiled mex matlab-json from christianpanton github) and I tested PlotRTL1090 on Mac OS X Mavericks with matalb-json compiled by me, and I got the same error (the same version Matlab).

Any ideas what is wrong?

Not issue, only a few ideas for the features

Hi @JorgeGT !
I have two ideas for new features:

  • generate list of all unique ICAO code,
  • generate list of all received plane registration codes,

I'd do it myself but my coding skills are weak:(

Meanwhile, take a look at the visualization of air traffic over the Poland - 24 hours on the Christmas Eve 2014. I use rtl_sdr dongle, your script and Comet DS-3000 antenna mounted 10 meters above the ground. On the animation you can see the two airports. Copernicus Airport Wrocław (EPWR, further south from bulls eye center) and Poznań–Ławica Henryk Wieniawski Airport (EPPO, further north form my location).
3D_gif

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.