strix-technica / ADSB-tools

Tools for ADS-B analysis, especially on the Raspberry Pi
GNU General Public License v2.0
9 stars 4 forks source link

Tools for ADS-B analysis

This is a collection of bits and pieces for ADS-B receiver analysis and monitoring, particularly on the Raspberry Pi.

All of what follows assumes that you have unpacked or cloned this repository in /usr/local (recommended to avoid collisions with distribution packages).

At present, there are four tools in this repository, all of them Munin plugins:

dump1090 monitor

Recent forks of antirez's excellent dump1090 ADS-B decoder, notably mutability's fork, either have the built-in web server disabled or removed completely. Instead, they write out data in JSON format which can be served using lighttpd or similar.

This plugin uses those same JSON data to generate Munin plots so you can keep an historic record of the performance of your receiver. It produces performance graphs similar to Joe Prochazka's excellent ADSB Receiver project, but without the additional overhead of that project and without requiring PHP.

It is a wildcard plugin, so it must be linked in /etc/munin/plugins/ correctly (see below for details). You don't have to enable all variations if you don't want. Note that Munin records data in 5 minutes intervals, so the data recorded in Munin will probably differ from those you see in the web interface.

NB: This plugin was tested and developed with the (then) current HEAD of mutability's fork and it expects the data provided by that fork to be present. It is not especially robustly coded and missing data will likely cause exceptions.

Supported data

Installation

Munin usually requires two samples to begin to show anything on the plot, so you need to wait 10 minutes before you can expect to see anything in the plots. If you suspect problems, examine the Munin logs in /var/log/munin.

ADS-B message distribution analysis

Many different tools for dump1090 exist to show aircraft range and other performance data (including the above mentioned Munin plugin), but message count and maximum distance say very little about the quality of messages that your receiver is getting. Quality of messages is equally important as quantity when experimenting with antennae.

This is another Munin plugin that attempts to characterise the quality and consistency of received messages, and can be used with any SBS BaseStation data source, of which dump1090 is one example.

Operating principle

It works on the assumption that each aircraft will transmit messages at a fairly constant rate (which, according to this paper is correct: each Mode S transponder transmits a message every 400-600 milliseconds) and therefore the standard deviation of message interval (for a given aircraft) says something about how many messages you're not getting. The wider the distribution (larger the standard deviation), the less consistently you're receiving messages for each aircraft.

As well as inter-message arrival times, it also performs the same analysis on the displacement between position reports. Rather than analyse actual distance in feet or nautical miles, it analyses the ratio of the actual distance between reports and the distance the aircraft would have travelled in one second at its last reported ground speed. This is to allow for the fact that even in a perfect environment, a plane cruising at 450 kts will go much further between position reports than the same plane that has slowed to Vref on final. As a result, raw displacements don't say a great deal about the consistency of ADS-B message reception.

Naïvely, in a perfect situation and in both cases, the mean interval would be about 500 ms (or a displacement ratio of 0.5) and the standard deviation would be about the same because the aircraft transmits positional messages every 0.5 sec ± 0.1 sec.

There are several reasons why it'll never work out that way:

The best that can be hoped for, then, is some sort of index based on standard deviation compared with the standard deviations from other stations. Future versions might weight nearer aircraft more heavily than distant aircraft.

Since this is experimental code, it presently reports only the statistical mean and standand deviation for each of message interval and displacement, and discussion is welcome.

Installation

UK Met Office weather

This uses the public UK Met Office hourly site-specific observations API to record current basic weather data in Munin. These data are only updated hourly so they're fairly coarse, but they should be fairly reliable.

Installation

Raspberry Pi SoC (CPU) temperature monitor

This is a very simple Munin plugin to monitor the temperature of the SoC IC of your Raspberry Pi. The Pi is not sold with a heatsink and the Pi 3, at least, can get quite hot especially when doing a lot of I/O or doing a lot of computational tasks — and especially in summer if your Pi, like mine, is in the loft.

The SoC will automatically throttle core speed when it reaches 82°C, so between the system load plugin and this plugin, you can monitor the performance of your Pi and add a heatsink (and perhaps miniature fan) if its temperature is getting too close to that limit.

Installation