Live Charts for Signal Optimization (Antenna, Gain, etc.)

I put together a Python app that can run side by side with dump1090 on a RPi or on a remote machine and produces a set of live charts that show message rate averages over various periods, signal strengths percentile ranges, aircraft distance percentile ranges, and counts of signals in distance buckets.

The charts update continuously once per second, so you can change your antenna position or modify the dump1090 settings and restart the server and see the effects instantly. For the gain settings for dump1090-fa, it’s quite instructive to set the gain value to zero and observe how the algorithm tunes the gain over the course of a couple of minutes.

I don’t have the time this week to package this up nicely, but if you’re a little Python literate, you can grab the files and throw them into a directory, you should be able to get it running with “pip install -r requirements.txt” and then “python msgrates.py”. The web page is served up on port 8000.

dump1090 signal stats dashboard

5 Likes

I would certainly be interested in running this when it is packaged up for us non Pythonists :wink:

Looks good!

1 Like

Let me know whether the instructions make sense to you: clemensv/signalstats1090

Now with a PyPI package and systemd service setup clemensv/signalstats1090

It looks pretty straight forward to me. I will give it a try and let you know

Many thanks

How do I install this on a RPi? I can run git clone on the RPi and get the files. But then what ? Thanks.

Full instructions halfway down the page Mark:

Thanks, I found that just after I posted !

Ok, it runs now. But I can’t access: http://localhost:8000

You need to access http://{pi-hostname}:8000

Ok pi-hostname is just raspberrypibut that doesn’t seem to work either.

Here’s what I get from the command line:

INFO:signalstats1090.signalstats1090:Starting server on raspberrypi:8000
INFO:signalstats1090.signalstats1090:Using antenna location: 33.xx, -117.xx
/home/pi/signalstats1090/lib/python3.11/site-packages/websockets/legacy/__init__.py:6: DeprecationWarning: websockets.legacy is deprecated; see https://websockets.readthedocs.io/en/stable/howto/upgrade.html for upgrade instructions
  warnings.warn(  # deprecated in 14.0 - 2024-11-09
/home/pi/signalstats1090/lib/python3.11/site-packages/uvicorn/protocols/websockets/websockets_impl.py:17: DeprecationWarning: websockets.server.WebSocketServerProtocol is deprecated
  from websockets.server import WebSocketServerProtocol
INFO:     Started server process [1211381]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://raspberrypi:8000 (Press CTRL+C to quit)

Don't know if those deprecation warnings matter

I installed signalstats1090 as a service on an old Raspberry-pi 1 I had kicking about to remotely connect to my running system on a different r-pi.
I used the install script and when running on my raspbian-lite it installs but on starting the service it fails with error:
Error importing numpy: you should not try to import numpy from its source directory; please exit the numpy source tree, and relaunch your python interpreter from there.

It appears a 32bit ‘lite’ install needs libopenblas-dev (apparently not required on a 64bit system?)
sudo apt-get install libopenblas-dev

It now runs OK and I can access the graphs on the remote r-pi 1

Nigel

1 Like

Ok, I got access to the graphs. I used the ip address of the RPi rather than the host name.

1 Like

To use hostnames instead of IP adresses you need to configure the hosts and lmhosts files located at %windir%\system32\drivers\etc. There are samples there for you to follow.

Thank you for that feedback. I’ll look into how to make the dependencies conditional.

Now I’m curious whether they’ll help you with tuning the gain. You can restart dump1090 with new configs while the app runs and see the effect of the settings. With dump1090-fa setting the gain to zero ended self-tuning into a near optimal state for my environment.

The deprecation warnings are ignorable.

FYI: I am chasing a high CPU condition that occurs after collecting a lot of data over several hours in a high-traffic environment.

I’m not on a Windows machine – would need a Mac equivalent.

How to edit the Host file on macOS | Tom’s Guide

1 Like

I noticed that CPU utilization ramps up over a period of about 2 hrs and then stabilizes. On a RPi 4, CPU utilization is about 9% with dump1090-fa and dump978-fa. Adding in signalstats1090 ramps it up to 24%.