Tracking planes for fun and... premium accounts

I’m not even sure what started it, but I think I was looking through random Github repositories for things to self-host. One of the repos I found was sdr-enthusiasts/docker-readsb-protobuf. It’s basically a tool to read ADS-B data from a Software Defined Radio (SDR) connected to your computer. ADS-B is the system used by planes to publicly broadcast several metrics like their callsign, location, height, speed and more.

The container image I found is basically the main tool that decodes data received by an SDR. In fact it’s the dockerized version of readsb-protobuf which is already a special version of readsb. It’s using Google’s protobuf format for communication and data storage.

From here, things went down the rabbit hole. This container image is part of a whole suite of tools that interact with each other. Pretty much all things are configured through environment variables while some data should be stored in a persistent storage. The documentation is top notch for a community-driven hobby project.

The main container comes with a basic map and Telegraf pre-installed so all the data can be exported to an InfluxDB. The documentation explains every single step on how to get your SDR hardware running on different architectures and systems. In my case everything runs directly on my Unraid host without any special configuration in regards to kernel modules.

readsb map

readsb map

Now comes the interesting part. Like I said, readsb is able to talk to other tools. Want a more advanced map? sdr-enthusiasts/docker-tar1090 got you covered. tar1090 provides an improved version of readsb’s map. If you want to see it in full action, there’s a public instance hosted on globe.adsbexchange.com.

tar1090 map

tar1090 map

This brings me to another feature of the whole suite. Feeders. There’s quite a list of container images that yet again can be easily configured via environment variables, that take the data from readsb and feed it to other services like the just mentioned ADS-B Exchange, flightradar24, FlightAware, OpenSky and many more.

By feeding your data, some of these services provide an ad-free or even business accounts which grant extra features or, well, an ad-free experience.

Feeder status on ADS-B Exchange. Status and direct links to stats are available by checking adsbexchange.com/myip/

Feeder status on ADS-B Exchange. Status and direct links to stats are available by checking adsbexchange.com/myip/

Then there’s other tools like sdr-enthusiasts/docker-planefence where you can configure a geofence and if a plane enters said geofence, it will trigger a Tweet, notification, webhook or whatever you configured. Fancy Discord notifications are also a thing.

Discord bot posting a plane sighting once entered a geofence

Discord bot posting a plane sighting once entered a geofence

Stepping things up a notch and using some object detection and you get a bot that posts an actual image of a plane that is just flying over your house.

Discord bot posting an actual image it has taken of a plane

Discord bot posting an actual image it has taken of a plane

There’s even things like sdr-enthusiasts/docker-virtualradarserver which lets you feed your own data into Virtual Radar Server. Basically a tool that plots planes and their tracks on a map similar to what people in air traffic control see. But the fancy part: this tools also lets you use that data to display the plane within Microsoft’s Flight Simulator X.

So, the whole setup can run on a RaspberryPi and requires an RTL-SDR. There are some alternative SDRs that may work though. I went with a 30€ NooElec NESDR Mini. It comes with its own antenna which can be replaced since it is connected via an MCX connector. While the antenna works, its range was not super satisfying in my case. This is because the antenna isn’t tuned for the ADS-B frequency of 1090 MHz.

I was looking for options on how to increase the range. With the antenna that came with the SDR stick, I was able to receive ADS-B messages from around 40-50 km. This was enough to reach the Kassel Airport (KSF) but not enough to reach Paderborn-Lippstadt Airport (PAD). Buying professionally-made antennas puts me down at least 90€ and I would have to mount them to the wall to not be in the way.

I found a shop, that sold a “Ten-90” antenna which is basically a PCB antenna tuned for 1090 MHz. Unfortunately, that didn’t really do much. The range increased by maybe 30-40 km, but that was not what I was reaching for. By looking further into the topic, I came across a thread or more like a tutorial on how to build your very own 1090 MHz antenna from a simple antenna Coax cable, and zipties. It’s called the Quick Spider. I just had to cut it into the right length and remove the insulation. Then stick everything together and be done with a working antenna.

The mounting is still a bit janky, but it works just fine

My DIY Quick Spider antenna build

My DIY Quick Spider antenna build

If you have another look at the tar1090 screenshot above, it shows some dark blue zigzag lines around the center point. These lines represent the outer range of where a plane position has been tracked. Since the antenna is still indoors, parts of my apartments will always reduce the total range, but to the north, I can track planes of up to 190 km now. Remember, this is just some jank antenna I built myself with some left-over coax cable.

Remember when I said that I can export data to InfluxDB? Yep, Grafana is also a thing. Someone made a ready-to-use dashboard which can be easily imported.

Grafana dashboards with hourly plane data

Grafana dashboards with hourly plane data

Grafana dashboards with actual plane data

Grafana dashboards with actual plane data

All-in-all it’s a neat project. Learned a bit more about how protobuf works, how antennas work and how >20% CPU utilization affects an electric bill (not much tbh but I can definetly see an increase in wattage). Everytime I hear a loud plane or helicopter over my house, I open the map and have a look to check what it is, where it came from and where it’s going to.