Welcome to Radarspotting. Please login or sign up.

March 29, 2024, 05:14:12 AM

Login with username, password and session length

New Members

New Members

You should get an activation email when you join.  If not, please use the Contact option.

Mode S / ADSB log software for RPi

Started by evertonma, October 06, 2015, 01:53:14 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

evertonma

Hi!!

Is there any kind of software for Raspberry Pi to log Mode S and ADSB aircraft? I am interested to generate a text log including information like hex code, first and last time of contact, first and last altitude, squawk code..., running on my RPi. I know that there are some softwares like that for Windows, but it would be nice if there's an application like that to run without a PC/Notebook.

I have a RPi2 with a ModeS Beast, running ModeSMixer2.

Thanks in advance!

IanH

Two thoughts:

1) output msg format using modesMixer and capture the text into a file for further processing  (--outServer msg:30003)

2) perhaps Virtual Radar Server could do this. There is a Linux version which I think I have run on a Pi  :-\ . A bit slow for the graphics output. But it also comes with a database plugin that writes to the standard basestation.sqb file.So that could be read with SQLite tools. And there was a headless version (no graphics on Pi) which would speed things up a bit. http://www.virtualradarserver.co.uk/

I might give these a try on my Pi2  ;D

There may be other options - just my initial thoughts.

Anmer

Quote from: IanH on October 06, 2015, 12:52:54 PM
2) perhaps Virtual Radar Server could do this. There is a Linux version which I think I have run on a Pi

I had a similar thought Ian but where would you keep the sqb file?
Here to Help.

IanH

Basestation.sqb would be located on the Pi. It could be copied across to a PC when required.
The request was to use a Pi so I assume that would be ok.

I need to set up a Pi for this. I'm testing Piaware on a Pi B+ at the moment but using the downloadable Raspian image. That doesn't allow any other hooks into the data stream so I need to add the components separately as described elsewhere on here. I'll do that on the Pi2.

Anmer

Quote from: IanH on October 06, 2015, 01:55:04 PM
Basestation.sqb would be located on the Pi. It could be copied across to a PC when required.

That makes sense Ian.  Be interested to see how you get on.

The PiAware SD image outputs data to various ports including 30003 in "SBS" format.
Here to Help.

IanH

Simple solution first:

On the RPi, use modesmixer2 to generate MSG (text) format on port 30003. You'll need to get modesmixer2 to get data from your Beast first (check on here somewhere: inConnect, inServer, inSerial ??) and then add --OutServer msg:30003 to the command line.

Once that is running, launch netcat in a terminal to save that to a CSV:
nc 127.0.0.1 30003 >> flights.csv
There is no interaction once that starts. Use Ctrl-C to stop the program.

Example content of the CSV file which can  be loaded into Excel on a PC.
MSG,8,111,11111,4CA847,111111,2015/10/06,22:10:27.304,2015/10/06,22:10:27.303,,,,,,,,,,,,0
MSG,5,111,11111,40073F,111111,2015/10/06,22:10:27.316,2015/10/06,22:10:27.308,,32000,,,,,,,0,,0,0
MSG,1,111,11111,40057F,111111,2015/10/06,22:10:27.360,2015/10/06,22:10:27.319,TCX2775 ,,,,,,,,,,,0


[source for information: https://www.reddit.com/r/RTLSDR/comments/20pyfg/heres_one_weeks_worth_of_adsb_data_from_flights/]

IanH

More complex version uses Virtual Radar Server. I got it to work but need to find a simple way to explain. Advantage is that it outputs into basestation.sqb format so keeps track of multiple flights and provides all the information requested in the original post.

I'll try again tonight (after work).

IanH

QuoteThe PiAware SD image outputs data to various ports including 30003 in "SBS" format.

Yes you were correct. I needed to use inConnect instead of inServer from modesmixer2 when checking what connections were available.  :-[  Once I had confirmed 30003 output, testing could start  ;D

evertonma

#8
Quote from: IanH on October 07, 2015, 09:09:32 AM
Simple solution first:

On the RPi, use modesmixer2 to generate MSG (text) format on port 30003. You'll need to get modesmixer2 to get data from your Beast first (check on here somewhere: inConnect, inServer, inSerial ??) and then add --OutServer msg:30003 to the command line.

Once that is running, launch netcat in a terminal to save that to a CSV:
nc 127.0.0.1 30003 >> flights.csv
There is no interaction once that starts. Use Ctrl-C to stop the program.

Example content of the CSV file which can  be loaded into Excel on a PC.
MSG,8,111,11111,4CA847,111111,2015/10/06,22:10:27.304,2015/10/06,22:10:27.303,,,,,,,,,,,,0
MSG,5,111,11111,40073F,111111,2015/10/06,22:10:27.316,2015/10/06,22:10:27.308,,32000,,,,,,,0,,0,0
MSG,1,111,11111,40057F,111111,2015/10/06,22:10:27.360,2015/10/06,22:10:27.319,TCX2775 ,,,,,,,,,,,0


[source for information: https://www.reddit.com/r/RTLSDR/comments/20pyfg/heres_one_weeks_worth_of_adsb_data_from_flights/]

Nice (and easy) solution!!

Do you have any idea how to create daily logs based on this?

As far as I understood, it will create a log with every message received. Is there a way to filter it, showing first and last message on that period of time, for example?