From 7653b2459d76400d154a7ec48f79b06af0c5cfef Mon Sep 17 00:00:00 2001 From: Junzi Sun Date: Wed, 4 Apr 2018 09:46:05 +0200 Subject: [PATCH] minor update --- pyModeS/decoder/bds/bds17.py | 2 +- pyModeS/decoder/bds/bds20.py | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/pyModeS/decoder/bds/bds17.py b/pyModeS/decoder/bds/bds17.py index 3d1e2a9..e8a0084 100644 --- a/pyModeS/decoder/bds/bds17.py +++ b/pyModeS/decoder/bds/bds17.py @@ -46,7 +46,7 @@ def is17(msg): # basic BDS codes for ADS-B shall be supported # assuming ADS-B out is installed (2017EU/2020US mandate) - if not set(['BDS05', 'BDS06', 'BDS09', 'BDS20']).issubset(caps): + if not set(['BDS05', 'BDS06', 'BDS08', 'BDS09', 'BDS20']).issubset(caps): return False return True diff --git a/pyModeS/decoder/bds/bds20.py b/pyModeS/decoder/bds/bds20.py index 4a63844..2f13a39 100644 --- a/pyModeS/decoder/bds/bds20.py +++ b/pyModeS/decoder/bds/bds20.py @@ -36,9 +36,7 @@ def is20(msg): d = hex2bin(data(msg)) - # status bit 1, 14, and 27 - - if bin2int(d[0:4]) != 2 or bin2int(d[4:8]) != 0: + if d[0:8] != '00100000': return False cs = cs20(msg)