diff --git a/pyModeS/ehs.py b/pyModeS/ehs.py index c90a08b..9db13a4 100644 --- a/pyModeS/ehs.py +++ b/pyModeS/ehs.py @@ -833,11 +833,8 @@ def isBDS60(msg): if mach is not None and mach > 1: result &= False - # leave out the check from vr60baro, due to very noisy measurement - - vri = vr60ins(msg) - if vri is not None and abs(vri) > 10000: - result &= False + # leave out the check from vertical rates, + # due to very noisy measurement return result diff --git a/tests/sample_data_test.py b/tests/sample_data_test.py index 6b0f1b5..060d6c3 100644 --- a/tests/sample_data_test.py +++ b/tests/sample_data_test.py @@ -1,3 +1,4 @@ +from __future__ import print_function from pyModeS import adsb, ehs, util @@ -47,36 +48,44 @@ def ehs_decode_all(n=None): ts = r[1] m = r[2] + + df = util.df(m) icao = ehs.icao(m) vBDS = ehs.BDS(m) + alt = ehs.df20alt(m) if df==20 else None + if vBDS: if isinstance(vBDS, list): - print(ts, m, icao, vBDS) + print(ts, m, icao, df, alt, vBDS) if vBDS == "BDS20": - print(ts, m, icao, vBDS, ehs.callsign(m)) + print(ts, m, icao, df, alt, vBDS, ehs.callsign(m)) 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)) 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)) + 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": - 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)) 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)) 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)) else: - print(ts, m, icao, 'UNKNOWN') + print(ts, m, icao, df, alt, 'UNKNOWN') if __name__ == '__main__': adsb_decode_all(100)