minor update
This commit is contained in:
parent
0e29a4d18a
commit
27daf52850
@ -678,9 +678,9 @@ def altitude_diff(msg):
|
||||
|
||||
msgbin = util.hex2bin(msg)
|
||||
sign = -1 if int(msgbin[80]) else 1
|
||||
value = util.bin2int(msgbin[81:88]) * 25
|
||||
value = util.bin2int(msgbin[81:88])
|
||||
|
||||
if value == 0 or value == 127:
|
||||
return None
|
||||
else:
|
||||
return sign * value
|
||||
return sign * (value - 1) * 25 # in ft.
|
||||
|
@ -61,7 +61,7 @@ def test_adsb_velocity():
|
||||
assert vgs == (159, 182.9, -832, 'GS')
|
||||
assert vas == (376, 244.0, -2304, 'AS')
|
||||
assert vgs_surface == (19.0, 42.2, 0 , 'GS')
|
||||
assert adsb.altitude_diff('8D485020994409940838175B284F') == 575
|
||||
assert adsb.altitude_diff('8D485020994409940838175B284F') == 550
|
||||
|
||||
|
||||
def test_nic():
|
||||
|
Loading…
Reference in New Issue
Block a user