From 5f7e28950cd579d45a96bbffe2fe28d2d4b4d783 Mon Sep 17 00:00:00 2001 From: junzis Date: Mon, 24 Jul 2017 17:06:20 +0200 Subject: [PATCH] work on altitude code --- pyModeS/modes_common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyModeS/modes_common.py b/pyModeS/modes_common.py index 0e59650..b56e3c0 100644 --- a/pyModeS/modes_common.py +++ b/pyModeS/modes_common.py @@ -102,11 +102,11 @@ def altcode(msg): D4 = mbin[31] # standard greycode - gc5 = C2 + C1 + B4 + B2 + B1 + A4 + A2 + A1 + gc5 = D2 + D4 + A1 + A2 + A4 + B1 + B2 + B4 N5 = int(util.gray2bin(gc5, 8), 2) # in 100-ft step must be converted - gc1 = D4 + D2 + D1 + gc1 = C1 + C2 + C4 N1 = int(util.gray2bin(gc1, 3), 2) - 1 if N1 == 6: