junzis / pyModeS

Python decoder for Mode S and ADS-B signals

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not receiving squawk

carvicas opened this issue · comments

I receive all the other ADS-B messages but not the squawk ones. Are commercial planes actually emiting them or maybe in emergency cases only?

Squawk codes are not transmitted in ADS-B.

You may want to use other types of Mode S messages (DF 5 or 21), and you can use the idcode() from pyModeS to decode the squawk.

https://github.com/junzis/pyModeS#decode-identity-replies-in-df5--df21

Thank you for the answer.

Is the message lenght 28 for all pyModeS messages (including the squawk) or only for ADS-B ones?

If the answer is yes, I suppose that "if len(msg) != 28: # wrong data length" should start all implementations to ensure (with
"if pms.crc(msg) !=0: # CRC fail") that the message is ok.

Sorry for this is a late reply. Not all Mode S messages are 112 bits, some are 56 bits. See following table.
https://mode-s.org/decode/content/introduction.html#tb:mode_s_formats