Fixed what seems to be an ICAO documentation error: sign reversed in vertical speed in BDS60 messages.
This commit is contained in:
parent
140f312c11
commit
8de58bb01f
@ -856,7 +856,7 @@ def vr60baro(msg):
|
|||||||
|
|
||||||
sign = d[35] # 1 -> minus
|
sign = d[35] # 1 -> minus
|
||||||
value = util.bin2int(d[36:45]) * 32 # feet/min
|
value = util.bin2int(d[36:45]) * 32 # feet/min
|
||||||
roc = -1*value if sign else value
|
roc = value if sign else -1*value
|
||||||
return roc
|
return roc
|
||||||
|
|
||||||
|
|
||||||
@ -876,7 +876,7 @@ def vr60ins(msg):
|
|||||||
|
|
||||||
sign = d[46] # 1 -> minus
|
sign = d[46] # 1 -> minus
|
||||||
value = util.bin2int(d[47:56]) * 32 # feet/min
|
value = util.bin2int(d[47:56]) * 32 # feet/min
|
||||||
roc = -1*value if sign else value
|
roc = value if sign else -1*value
|
||||||
return roc
|
return roc
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@ def test_df20alt():
|
|||||||
def test_ehs_BDS():
|
def test_ehs_BDS():
|
||||||
assert ehs.BDS("A0001838201584F23468207CDFA5") == 'BDS20'
|
assert ehs.BDS("A0001838201584F23468207CDFA5") == 'BDS20'
|
||||||
assert ehs.BDS("A0001839CA3800315800007448D9") == 'BDS40'
|
assert ehs.BDS("A0001839CA3800315800007448D9") == 'BDS40'
|
||||||
|
assert ehs.BDS("A0000691E8D9DF1AFFB7F740A137") == 'BDS44'
|
||||||
assert ehs.BDS("A000139381951536E024D4CCF6B5") == 'BDS50'
|
assert ehs.BDS("A000139381951536E024D4CCF6B5") == 'BDS50'
|
||||||
assert ehs.BDS("A000029CFFBAA11E2004727281F1") == 'BDS60'
|
assert ehs.BDS("A000029CFFBAA11E2004727281F1") == 'BDS60'
|
||||||
|
|
||||||
@ -28,6 +29,11 @@ def test_ehs_BDS40_functions():
|
|||||||
assert ehs.alt40fms("A000029C85E42F313000007047D3") == 3008
|
assert ehs.alt40fms("A000029C85E42F313000007047D3") == 3008
|
||||||
assert ehs.p40baro("A000029C85E42F313000007047D3") == 1020.0
|
assert ehs.p40baro("A000029C85E42F313000007047D3") == 1020.0
|
||||||
|
|
||||||
|
def test_ehs_BDS44_functions():
|
||||||
|
assert ehs.wind44("A0000691E8D9DF1AFFB7F740A137") == (54.0, 168.0)
|
||||||
|
assert ehs.temp44("A0000691E8D9DF1AFFB7F740A137") == -13.4
|
||||||
|
assert ehs.p44("A0000691E8D9DF1AFFB7F740A137") == 2029
|
||||||
|
assert ehs.hum44("A0000691E8D9DF1AFFB7F740A137") == 85.9
|
||||||
|
|
||||||
def test_ehs_BDS50_functions():
|
def test_ehs_BDS50_functions():
|
||||||
assert ehs.roll50("A000139381951536E024D4CCF6B5") == 2.1
|
assert ehs.roll50("A000139381951536E024D4CCF6B5") == 2.1
|
||||||
@ -42,4 +48,4 @@ def test_ehs_BDS60_functions():
|
|||||||
assert ehs.ias60("A000029CFFBAA11E2004727281F1") == 336
|
assert ehs.ias60("A000029CFFBAA11E2004727281F1") == 336
|
||||||
assert ehs.mach60("A000029CFFBAA11E2004727281F1") == 0.48
|
assert ehs.mach60("A000029CFFBAA11E2004727281F1") == 0.48
|
||||||
assert ehs.vr60baro("A000029CFFBAA11E2004727281F1") == 0
|
assert ehs.vr60baro("A000029CFFBAA11E2004727281F1") == 0
|
||||||
assert ehs.vr60ins("A000029CFFBAA11E2004727281F1") == -3648
|
assert ehs.vr60ins("A000029CFFBAA11E2004727281F1") == 3648
|
||||||
|
Loading…
Reference in New Issue
Block a user