I thought I would see if I could make an 'old fashioned' radar to show what aircraft were being picked up so I could have my own desk based radar.
I found an example of a radar written in pygame, which became the basis of my code (although I am pretty sure the original author wouldn't recognise it now) and created a radar class.
I plugged in the GPS coordinates of the aircraft using the PiAware flight data class I created to produce a pretty swanky, even if I say so myself, radar of all the aircraft I am picking up signals from.
Setup PiAware
If you want to have a go, first you need to setup a PiAware server to receive data - you don't need a lot of equipment and its really easy to do.
Download my project
The code is on github at github.com/martinohanlon/PiAwareRadar.
git clone https://github.com/martinohanlon/PiAwareRadarRun the program
The program expects a number of command line parameters, the mandatory being the latitude and longitude of your PiAware server, which will be the centre of the radar.
cd PiAwareRadar/piawareradar python3 piawareradar.py mylat mylonYou can set other parameters for the IP address of the PiAware server, if your radar is running on a different machine, whether you want it to run full screen and the layout of your screen (normal or touch).
Usage
usage: piawareradar.py [-h] [--piawareip PIAWAREIP] [--screen SCREEN] [--fullscreen] lat lon PiAware Flight Radar positional arguments: lat The latitude of the receiver lon The longitude of the receiver optional arguments: -h, --help show this help message and exit --piawareip PIAWAREIP The ip address of the piaware server --screen SCREEN The screen config to use [normal / touch] --fullscreen Fullscreen radar
Nice creative work. Delighted that you extended PiAware. Thx.
ReplyDeletevery cool, still have a pi2 stuck to a 5 inch screen so it might have to be turned into one of these for my coffee table!
ReplyDeleteIt looks really cool on the official raspberry touch screen.
DeleteThanks for this, Martin.
ReplyDeleteDo you know if there is an online source for the PiAware/Flightaware data for those who want to have a quick dabble with the code?
Not as far as Im aware.
Deleteit's possible to share this radar view live as personal webpage? like Dump1090?
ReplyDeleteit's possible to share this radar view live as personal webpage? like Dump1090?
ReplyDeleteNot easily! Its written using pygame which is a fat client.
DeleteIs there a way to populate parameters like altitude, speed, tail number, speed ?
ReplyDeleteWill be nice if can get linked with Stratux instead...
ReplyDeleteLooks great. As a bit of a Rpi newbie I'm unclear if I can do this WITH the Rpi thats receiving the ADSB (running headless ATM) or on another Rpi which I am slowly building various radio apps on (SDR stuff and ham radio apps) but which is on the same network. I'd be glad for a little more guidance... :-)
ReplyDeleteYes, you can run this on the same Pi which ADSB is running on. This is exactly what I did.
DeleteThis comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
ReplyDelete