fix altitude bits
This commit is contained in:
parent
f52b00f0af
commit
658ee00b0b
|
|
@ -44,7 +44,7 @@ class ModeSParser(PickleModule):
|
||||||
elif type in range(9, 19):
|
elif type in range(9, 19):
|
||||||
# airborne position (w/ baro altitude)
|
# airborne position (w/ baro altitude)
|
||||||
q = (input[5] & 0b1)
|
q = (input[5] & 0b1)
|
||||||
altitude = ((input[5] & 0b11111110) << 3) | ((input[6] & 0b1111) >> 4)
|
altitude = ((input[5] & 0b11111110) << 3) | ((input[6] & 0b11110000) >> 4)
|
||||||
if q:
|
if q:
|
||||||
message["altitude"] = altitude * 25 - 1000
|
message["altitude"] = altitude * 25 - 1000
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue