junzis / pyModeS

Python decoder for Mode S and ADS-B signals
GNU General Public License v3.0
529 stars 151 forks source link

Does this work on already stored data? #26

Closed dwood97 closed 4 years ago

dwood97 commented 5 years ago

Hi,

Does this parse out the hex data if it is already stored in say a .csv, or does it only parse it as the data comes in?

junzis commented 5 years ago

The modeslive is an independent layer handles streaming data. The underlying pyModeS decoder works the same as before.

dwood97 commented 5 years ago

So even though the data is different in the csv test files, the decoder will be able to determine which type of data it is by running...? My receiver receives both the adsb and commb data it seems, so I am confused on if the decoder can do both at the same time? RAW_20180720_21.zip

junzis commented 5 years ago

It does not work out of the box. You will have to adapt the code to read data from csv.

Have a look at the code at:

https://github.com/junzis/pyModeS/blob/master/pyModeS/streamer/modeslive

This can the place to start with.

dwood97 commented 5 years ago

OK, basically where I am at is that with you sil-master files I can save data to a csv. With other software I can get live decoded ads-b data, but it is not saved. What I am looking for is to save decoded ads-b data, ideally to a csv or database. It does not need to be real time. So is modifying modeslive the best way to go still?

Also, thank you for the replies and I realize these are probably really beginner questions about this so I appreciate the time you take to answer.

junzis commented 5 years ago

Oh, I see now. If you only need the information based on ADS-B (position, ground speed). I would recommend using the following existing scripts:

https://github.com/junzis/sil/tree/master/extra_tools

They use Pandas to load the raw CSV, decode and save the output to a new CSV. The columns may be different. So you need to update these scripts a little bit. You also need to filter out the non ADS-B messages in Pandas too.

But if you want to have parameters from Comm-B (airspeeds), you will have to modify the modeslive to read from offline files and save output to a CSV.

However, the data saving part could be a part of modeslive. It's a good point. I will tried to implement that at some point.

dwood97 commented 5 years ago

Alright. So only the extra_tools works on actually saving any data offline right now? That helps, thank you.

Are you aware of any projects that parse and save live data for offline use? I have looked around and there seem to be a few, but I was wondering if you had looked into it

junzis commented 5 years ago

The scripts in extra_tools do the offline decoding.

We mostly use pyModeS and build different logics on top. It is not complicated to write these scripts in Python. I don't see a tool that does everything we need, especially when we need to extract more information from raw data. This is also why we came up with pyModeS. It's like legos, we just have to pile up the functions to get the information we need.

Which tools have you found? I am interested in your findings too.

dwood97 commented 5 years ago

OK I think I see. I will try modifying to code to see if I can get something working.

Here are some of the posts I have been following: https://discussions.flightaware.com/t/tool-for-decoding-beast-format-ads-b-data/17007 http://10pm-blog.blogspot.com/2016/03/new-improved-ads-b-aircraft-data.html

There are some tools available, but a lot of them use code that is over my comprehension and expertise (even these Python scripts are tricky for me). Just type in 1090 on GitHub and some results should show up. Best of luck in you work!