update BDS60 check

This commit is contained in:
junzis
2017-07-26 12:02:49 +02:00
parent c6952e4e63
commit 8c90371111
2 changed files with 19 additions and 13 deletions
+2 -5
View File
@@ -833,11 +833,8 @@ def isBDS60(msg):
if mach is not None and mach > 1: if mach is not None and mach > 1:
result &= False result &= False
# leave out the check from vr60baro, due to very noisy measurement # leave out the check from vertical rates,
# due to very noisy measurement
vri = vr60ins(msg)
if vri is not None and abs(vri) > 10000:
result &= False
return result return result
+17 -8
View File
@@ -1,3 +1,4 @@
from __future__ import print_function
from pyModeS import adsb, ehs, util from pyModeS import adsb, ehs, util
@@ -47,36 +48,44 @@ def ehs_decode_all(n=None):
ts = r[1] ts = r[1]
m = r[2] m = r[2]
df = util.df(m)
icao = ehs.icao(m) icao = ehs.icao(m)
vBDS = ehs.BDS(m) vBDS = ehs.BDS(m)
alt = ehs.df20alt(m) if df==20 else None
if vBDS: if vBDS:
if isinstance(vBDS, list): if isinstance(vBDS, list):
print(ts, m, icao, vBDS) print(ts, m, icao, df, alt, vBDS)
if vBDS == "BDS20": if vBDS == "BDS20":
print(ts, m, icao, vBDS, ehs.callsign(m)) print(ts, m, icao, df, alt, vBDS, ehs.callsign(m))
if vBDS == "BDS40": if vBDS == "BDS40":
print(ts, m, icao, vBDS, ehs.alt40mcp(m), print(ts, m, icao, df, alt, vBDS, ehs.alt40mcp(m),
ehs.alt40fms(m), ehs.p40baro(m)) ehs.alt40fms(m), ehs.p40baro(m))
if vBDS == "BDS44": if vBDS == "BDS44":
print(ts, m, icao, vBDS, ehs.wind44(m), print(ts, m, icao, df, alt, vBDS, ehs.wind44(m),
ehs.temp44(m), ehs.p44(m), ehs.hum44(m)) ehs.temp44(m), ehs.p44(m), ehs.hum44(m))
if vBDS == "BDS44REV":
print(ts, m, icao, df, alt, vBDS, ehs.wind44(m, rev=True),
ehs.temp44(m, rev=True), ehs.p44(m, rev=True), ehs.hum44(m, rev=True))
if vBDS == "BDS50": if vBDS == "BDS50":
print(ts, m, icao, vBDS, ehs.roll50(m), ehs.trk50(m), print(ts, m, icao, df, alt, vBDS, ehs.roll50(m), ehs.trk50(m),
ehs.gs50(m), ehs.rtrk50(m), ehs.tas50(m)) ehs.gs50(m), ehs.rtrk50(m), ehs.tas50(m))
if vBDS == "BDS53": if vBDS == "BDS53":
print(ts, m, icao, vBDS, ehs.hdg53(m), ehs.ias53(m), print(ts, m, icao, df, alt, vBDS, ehs.hdg53(m), ehs.ias53(m),
ehs.mach53(m), ehs.tas53(m), ehs.vr53(m)) ehs.mach53(m), ehs.tas53(m), ehs.vr53(m))
if vBDS == "BDS60": if vBDS == "BDS60":
print(ts, m, icao, vBDS, ehs.hdg60(m), ehs.ias60(m), print(ts, m, icao, df, alt, vBDS, ehs.hdg60(m), ehs.ias60(m),
ehs.mach60(m), ehs.vr60baro(m), ehs.vr60ins(m)) ehs.mach60(m), ehs.vr60baro(m), ehs.vr60ins(m))
else: else:
print(ts, m, icao, 'UNKNOWN') print(ts, m, icao, df, alt, 'UNKNOWN')
if __name__ == '__main__': if __name__ == '__main__':
adsb_decode_all(100) adsb_decode_all(100)