Update bds61.py

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.
This commit is contained in:
Flyer350 2021-11-18 11:24:42 +01:00 committed by GitHub
parent 26ef5d3ad9
commit 0eb2d1f6a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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