From 9fa475ab9a4344d05501d327d7549cc7b2077370 Mon Sep 17 00:00:00 2001 From: Junzi Sun Date: Wed, 30 May 2018 10:25:00 +0200 Subject: [PATCH] add more DF to icao function --- pyModeS/decoder/common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyModeS/decoder/common.py b/pyModeS/decoder/common.py index 3fd293c..4225568 100644 --- a/pyModeS/decoder/common.py +++ b/pyModeS/decoder/common.py @@ -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)