From b52431ca51613b38a0205466e81fe9cf51cdf6d7 Mon Sep 17 00:00:00 2001 From: Flyer350 <57186034+Flyer350@users.noreply.github.com> Date: Mon, 24 Jan 2022 10:38:17 +0100 Subject: [PATCH 1/2] Update bds20.py #message with empty callsign can still be BDS2,0 Example messages: a900189f20000000000000d0d739 a100000020000000000000a81785 --- pyModeS/decoder/bds/bds20.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyModeS/decoder/bds/bds20.py b/pyModeS/decoder/bds/bds20.py index 63e10cd..914544e 100644 --- a/pyModeS/decoder/bds/bds20.py +++ b/pyModeS/decoder/bds/bds20.py @@ -26,7 +26,7 @@ def is20(msg): cs = cs20(msg) - if "#" in cs: + if "#" in cs and common.bin2int(d[8:56])>0: #message with empty callsign can still be BDS2,0 return False return True From ce5adbafe5ad74127e5143cb77c0cdf360ae18d9 Mon Sep 17 00:00:00 2001 From: Junzi Sun Date: Mon, 18 Apr 2022 11:27:53 +0200 Subject: [PATCH 2/2] Update bds20.py --- pyModeS/decoder/bds/bds20.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pyModeS/decoder/bds/bds20.py b/pyModeS/decoder/bds/bds20.py index 914544e..d5f4b2f 100644 --- a/pyModeS/decoder/bds/bds20.py +++ b/pyModeS/decoder/bds/bds20.py @@ -24,9 +24,11 @@ def is20(msg): if d[0:8] != "00100000": return False - cs = cs20(msg) + # allow empty callsign + if common.bin2int(d[8:56]) == 0 + return True - if "#" in cs and common.bin2int(d[8:56])>0: #message with empty callsign can still be BDS2,0 + if "#" in cs20(msg): return False return True