r/pygame • u/SignedInt32 • 1d ago
Using pygame for RF ADS-B plotting (Passive Radar Interface, mercator)

Another example I made using the same pipeline but with an cosmetically enhanced interface.

github: https://github.com/TheBarret/PRad
The codebase it is a little out dated, but the core principle still works today, with a cheap RTL ($30 bucks or so) you can 100% become your own air-traffic recorder or passive radar observatory.

USB based RTL devices: https://www.rtl-sdr.com/about-rtl-sdr/
The math to equate these distance and coordinates, I used the Mercator projection to plot down the active beacons (transponders), these locations are relative, the ads-b beacon sends a ton-load more of vectors to plot more details if you wish. This example script only demonstrates how it works in sequence with a servicer called dump1090-mutability found at:
https://github.com/adsb-related-code/dump1090-mutability
(This is the de-modulator for the 1090Mhz ads-b signals, it does the heavy lifting for us)
I hope you enjoy the show&tell, everything is open source!
2
u/Mars_Iki 1d ago
Just checked out your post and repo — super clean setup, man! Thanks for taking the time to share it! 🙌
Love how we actually landed on the exact same architecture from opposite sides of RF: letting a fast C backend do the heavy lifting (`dump1090` for you, `ngspice` + C++ DLL for me) while Pygame handles the smooth real-time radar/oscilloscope canvas. Pulling live 1090 MHz ADS-B telemetry with a $30 RTL-SDR and plotting Mercator tracks right in Pygame is seriously awesome. Dropped an upvote on your post!