eorange
♦RF Enabled Member♦
I built a self-contained, standalone ADS-B logger using a Raspberry Pi. My goal was to capture Mode S records into a file, and simultaneously capture a unique list of callsigns into another file.
I used a RaspPi Model 2 B, a NooElec R820T2, and some external LEDS for visual indicators. The unit only needs power and the R820T2; no keyboard, display, or network is needed. Upon boot, the Pi will automatically start logging data into the files, which are named based on the timestamp of the first Mode-S record received. If you cut power and plug it back in, the whole process will restart with a new set of files.
My design: I installed "DUMP1090 mutability" which provides the Mode-S data on localhost port 30003. I then wrote a Python script (started by cron at boot time) which creates the empty files, reads the Mode-S records, and writes them as comma separated values into one file. In another file, I keep updating just the unique list of callsigns found. Finally, a log file checkpoints the progress; a status message is written for every 10 unique callsigns received, and for every 10,000 Mode-S records received. Invalid Mode-S records are also flagged and skipped.
The red LED blinks if an invalid Mode-S record is received, the yellow LED blinks for every 100 valid Mode-S records received (just so you know something is happening), and the green LED blinks every time a new callsign is found.
When it's time to grab the data, I plug in an Ethernet cable and use sftp to retrieve the files. Later I load them into a SQL database.
In one 24 hour period, I logged 4.7 million Mode-S records and 830 unique callsigns. That file was about 190MB.
This solution is completely portable and can be transported anywhere, including a vehicle. All you need to do is supply power; it can be powered up/down as you see fit. At some later time, all the files can be downloaded and processed later.
Feedback and suggestions welcome.
I used a RaspPi Model 2 B, a NooElec R820T2, and some external LEDS for visual indicators. The unit only needs power and the R820T2; no keyboard, display, or network is needed. Upon boot, the Pi will automatically start logging data into the files, which are named based on the timestamp of the first Mode-S record received. If you cut power and plug it back in, the whole process will restart with a new set of files.
My design: I installed "DUMP1090 mutability" which provides the Mode-S data on localhost port 30003. I then wrote a Python script (started by cron at boot time) which creates the empty files, reads the Mode-S records, and writes them as comma separated values into one file. In another file, I keep updating just the unique list of callsigns found. Finally, a log file checkpoints the progress; a status message is written for every 10 unique callsigns received, and for every 10,000 Mode-S records received. Invalid Mode-S records are also flagged and skipped.
The red LED blinks if an invalid Mode-S record is received, the yellow LED blinks for every 100 valid Mode-S records received (just so you know something is happening), and the green LED blinks every time a new callsign is found.
When it's time to grab the data, I plug in an Ethernet cable and use sftp to retrieve the files. Later I load them into a SQL database.
In one 24 hour period, I logged 4.7 million Mode-S records and 830 unique callsigns. That file was about 190MB.
This solution is completely portable and can be transported anywhere, including a vehicle. All you need to do is supply power; it can be powered up/down as you see fit. At some later time, all the files can be downloaded and processed later.
Feedback and suggestions welcome.