From a872cd253e3d4a8e599c140f41d6bf945388e1b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Huy=20V=C3=BB?= Date: Fri, 13 Apr 2018 16:14:31 +0200 Subject: [PATCH 1/2] Update bds40.py --- pyModeS/decoder/bds/bds40.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pyModeS/decoder/bds/bds40.py b/pyModeS/decoder/bds/bds40.py index 4908976..a473da5 100644 --- a/pyModeS/decoder/bds/bds40.py +++ b/pyModeS/decoder/bds/bds40.py @@ -47,6 +47,12 @@ def is40(msg): if wrongstatus(d, 27, 28, 39): return False + + if wrongstatus(d, 48, 49, 51): + return False + + if wrongstatus(d, 54, 55, 56): + return False # bits 40-47 and 52-53 shall all be zero @@ -55,6 +61,7 @@ def is40(msg): if bin2int(d[51:53]) != 0: return False + return True From dfdddb77f2fc2186b8ee06faddf2e402b02bca67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Huy=20V=C3=BB?= Date: Fri, 13 Apr 2018 16:17:31 +0200 Subject: [PATCH 2/2] Update bds40.py --- pyModeS/decoder/bds/bds40.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pyModeS/decoder/bds/bds40.py b/pyModeS/decoder/bds/bds40.py index a473da5..53a95b2 100644 --- a/pyModeS/decoder/bds/bds40.py +++ b/pyModeS/decoder/bds/bds40.py @@ -61,7 +61,6 @@ def is40(msg): if bin2int(d[51:53]) != 0: return False - return True