Living near a busy airport – and especially directly under one of the major flight paths – means regularly dealing with the noise of planes taking off and landing. In attempt to overcome the frustration of having calls and Netflix binges interrupted every few minutes during the nice months of the year when the windows are open, I set out to make the best of it. Inspired by a post on Hacker News earlier this year about how easy (and cheap!) it is to set up your own ADS-B monitoring station I realized I could build a program that automatically sends me information about the planes I hear flying over my home.
With the idea in mind I purchased an RTL-SDR starter kit and dug up my Raspberry Pi Zero W from the depths of my desk drawers. I was honestly amazed at how easy it was to start playing around with the SDR. Within 30 minutes of opening up the kit, I had everything I needed on my computer to listen to FM radio. A little more fiddling and research and I was listening to the airport radios, followed by eventually getting dump1090 set up on my RasPi and plotting the live data on a map. Once I had dump1090 setup and was able to access the processed ADS-B packets over my network it only took a couple weekends of spare time to put together the Node.js app that runs the Telegram notification bot. So without further ado, here’s a quick little demo:
The project cost totaling up to just under US$70 (excluding shipping fees and the USB power adapter).
Antenna – For this setup I have mounted the smaller dipole antenna in an airport-facing window using the suction mount from the antenna kit. I’ve adjusted the antenna so that each side is about 1/2 the wavelength of the 1090MHz signal I’m listening for – roughly 13.8cm – and aligned to form a 90° angle. Conveniently enough, this is about the same as the maximum length for this antenna. While I could probably be more scientific about tuning the length of the antenna and setting its position, the current setup works great for my relatively short-range needs, and the indoor location of the antenna is probably a bigger problem than the length and angle.
RasPi & SDR – These two parts are twist-tied to the window shutters. While originally they were resting on the window sill, I quickly found that opening the shutters would usually result in everything falling to the floor.
The Raspberry Pi has been setup with a standard headless Raspbian Stretch installation. Since the Pi is a fairly popular tool of choice for airplane tracking, everything that was needed for the SDR can be installed with prebuilt packages. For ease of setup, I chose to use the
dump1090 fork maintained by FlightAware. Their package provides both a web UI for viewing the live data in human readable formats as well as the standard
dump1090 network endpoints for fetching the data in SBS1 and BEAST formats.
As for the bot, I used Node.js and TypeScript since I’m relatively comfortable with both. Plus there’s the added benefit that there are already libraries for handling SBS1 data, geographical calculations, and the Telegram bot APIs. The Node.js app I put together handles everything from receiving the SBS1 data from
dump1090 to sending the the messages to the Telegram bot API. I’ve created a systemd service to automatically run the Node.js app when the Raspberry Pi boots up so no need to remember to restart everything manually.