junzis / pyModeS

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

Add ACAS support #71

Closed tuftedocelot closed 1 year ago

tuftedocelot commented 4 years ago

Definitely not ready yet. I need to find a source of actual ACAS messages versus reading straight from the specs (not pretty)

junzis commented 4 years ago

I updated the structure and functions.

acas.py is meant for DF=0/16. So I moved some functions to BDS61 bds61_st2.py.

I also consolidated some of the functions, and still need to properly test the code before merging. But it looks quite good already.

tuftedocelot commented 4 years ago

:+1:

Thanks for the ARA material. I couldn't decide how to return/present that info back.

When it comes to tests, are there any good ADS-B/Mode S message repositories already out there? I checked opensky's Java library and there aren't even any tests in there to borrow valid messages from. The only other thing I could think of was to log any/all messages that I can receive and go spelunking for the relevant message types

junzis commented 4 years ago

When it comes to tests, are there any good ADS-B/Mode S message repositories already out there? I checked opensky's Java library and there aren't even any tests in there to borrow valid messages from. The only other thing I could think of was to log any/all messages that I can receive and go spelunking for the relevant message types

@xoolive, do you have any hand-picked BDS61 messages from your recent paper for a proper unit test?

Flyer350 commented 3 years ago

I don't understand the link between ACAS messages and BDS61? (extended squitter emergency/priority status)

junzis commented 3 years ago

I don't understand the link between ACAS messages and BDS61? (extended squitter emergency/priority status)

It's been a while. I think it was about the coordinated reply in DF=16, which has a very similar structure as BDS 6,1 (subtype 2)

junzis commented 3 years ago

The MV field in DF=16 can be any GICB data. This makes the decoding very complicated.

It is similar to what we did with BDS inferring, except that now we are probably getting extended squitter data, and this is very hard to inference without knowing the data selector code.

tedder commented 3 years ago

I can run it against DF16 messages, though they all return False from isACAS. I note it says it's for 3,1, but then the string appears to be for 3,0:

    :return: if VDS is 3,1
...
    vds = mv[0:8]
    if vds == "00110000":

Looks like the messages I'm seeing with DF16 are UDS 5,8 and 5,9. Not sure if it'd be helpful to paste them in here, but I thought I'd at least indicate I'd tested isACAS.

junzis commented 1 year ago

I am going to pull this into a separate branch and then work from there.