diff --git a/python/altitude.py b/python/altitude.py index 1824194..3519642 100755 --- a/python/altitude.py +++ b/python/altitude.py @@ -48,7 +48,7 @@ def decode_alt(alt, bit13): #in this representation, the altitude bits are as follows: # 12 11 10 9 8 7 (6) 5 (4) 3 2 1 0 # so bits 6 and 4 are the M and Q bits, respectively. - tmp1 = (alt & 0x3F80) >> 2 + tmp1 = (alt & 0x1F80) >> 2 tmp2 = (alt & 0x0020) >> 1 else: tmp1 = (alt & 0x1FE0) >> 1