From 0eb2d1f6a2f8ba10b54da65b6809593b1fb0f051 Mon Sep 17 00:00:00 2001 From: Flyer350 <57186034+Flyer350@users.noreply.github.com> Date: Thu, 18 Nov 2021 11:24:42 +0100 Subject: [PATCH] Update bds61.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix the Mode A decoder. The ZERO is already part of the binary data inside the message and does not need to be added. See ED-102A, 2.2.3.2.7.8.1.2 b. Starting with ―ME‖ bit 12, the code sequence shall be C1, A1, C2, A2, C4, A4, ZERO, B1, D1, B2, D2, B4, D4. --- pyModeS/decoder/bds/bds61.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyModeS/decoder/bds/bds61.py b/pyModeS/decoder/bds/bds61.py index 05dc649..22e7343 100644 --- a/pyModeS/decoder/bds/bds61.py +++ b/pyModeS/decoder/bds/bds61.py @@ -77,7 +77,7 @@ def emergency_squawk(msg: str) -> str: msgbin = common.hex2bin(msg) # construct the 13 bits Mode A ID code - idcode = msgbin[43:49] + "0" + msgbin[49:55] + idcode = msgbin[43:56] squawk = common.squawk(idcode) return squawk