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:
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.
dump1090
instance
or else this plugin will throw an exception./usr/local/share/munin/plugins/dump1090_
. You should set your altitude and
you must adjust the JSON_DATA
path to where your dump1090
instance writes
its JSON data.sudo aptitude install -R python-geopy
sudo aptitude install -R munin munin-node
is probably sufficient./etc/munin/munin.conf
and possibly /etc/munin/munin-node.conf
if
you're security conscious. See also installing Munin on a Raspberry
Pi./etc/munin/plugins/
. You will probably want to
disable most of them since every plugin enabled consumes a bit of CPU every 5
minutes. To enable this plugin, create the necessary symlinks according to
your preferences:
cd /etc/munin/plugins
sudo ln -s /usr/local/share/munin/plugins/dump1090_ dump1090_ac
sudo ln -s /usr/local/share/munin/plugins/dump1090_ dump1090_cpu
sudo ln -s /usr/local/share/munin/plugins/dump1090_ dump1090_messages
sudo ln -s /usr/local/share/munin/plugins/dump1090_ dump1090_quality
sudo ln -s /usr/local/share/munin/plugins/dump1090_ dump1090_signal
sudo ln -s /usr/local/share/munin/plugins/dump1090_ dump1090_tracks
sudo systemctl restart munin-node
sudo cp /usr/local/etc/lighttpd/conf-available/89-munin.conf /etc/lighttpd/conf-available
sudo lighty-enable-mod munin
sudo systemctl restart lighttpd
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
.
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.
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.
dump1090_
plugin instructions./usr/local/share/munin/plugins/adsb-msg-dist
.sudo aptitude install -R python-geopy python-daemon
systemd
service description and start the collector daemon:
sudo cp /usr/local/etc/systemd/system/adsb-msg-dist.service /etc/systemd/system/
sudo systemctl enable adsb-msg-dist
sudo systemctl start adsb-msg-dist
cd /etc/munin/plugins
sudo ln -s /usr/local/share/munin/plugins/adsb-msg-dist
sudo systemctl restart munin-node
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.
dump1090_
plugin instructions./usr/local/share/munin/plugins/ukmo_wx_config.py
:
/usr/local/share/munin/plugins/ukmo_wx list 60
cd /etc/munin/plugins
sudo ln -s /usr/local/share/munin/plugins/ukmo_wx
sudo systemctl restart munin-node
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.
dump1090_
plugin instructions.cd /etc/munin/plugins
sudo ln -s /usr/local/share/munin/plugins/SoC_temp
sudo systemctl restart munin-node