add more DF to icao function

This commit is contained in:
Junzi Sun 2018-05-30 10:25:00 +02:00
parent c91bd4bb03
commit 9fa475ab9a

View File

@ -89,9 +89,9 @@ def icao(msg):
DF = df(msg)
if DF in (17, 18):
if DF in (11, 17, 18):
addr = msg[2:8]
elif DF in (4, 5, 20, 21):
elif DF in (0, 4, 5, 16, 20, 21):
c0 = bin2int(crc(msg, encode=True))
c1 = hex2int(msg[-6:])
addr = '%06X' % (c0 ^ c1)