Fix calculation of vertical rate
The sign bit was incorrectly included in the vertical rate calculation, which resulted in all negative vertical rates being -255 or smaller
This commit is contained in:
parent
8ef02fa2b1
commit
2ee87c8c61
@ -344,7 +344,7 @@ def velocity(msg):
|
||||
tag = 'AS'
|
||||
|
||||
vr_sign = util.bin2int(msgbin[68])
|
||||
vr = util.bin2int(msgbin[68:77]) # vertical rate
|
||||
vr = util.bin2int(msgbin[69:77]) # vertical rate
|
||||
rocd = -1*vr if vr_sign else vr # rate of climb/descend
|
||||
|
||||
return int(spd), round(hdg, 1), int(rocd), tag
|
||||
|
Loading…
Reference in New Issue
Block a user