예제 #1
0
def bds_info(BDS, m):
    if BDS == "BDS17":
        info = ([i[-2:] for i in ehs.cap17(m)])

    elif BDS == "BDS20":
        info = ehs.callsign(m)

    elif BDS == "BDS40":
        info = (ehs.alt40mcp(m), ehs.alt40fms(m), ehs.p40baro(m))

    elif BDS == "BDS44":
        info = (ehs.wind44(m), ehs.temp44(m), ehs.p44(m), ehs.hum44(m))

    elif BDS == "BDS44REV":
        info = (ehs.wind44(m, rev=True), ehs.temp44(m, rev=True),
                ehs.p44(m, rev=True), ehs.hum44(m, rev=True))

    elif BDS == "BDS50":
        info = (ehs.roll50(m), ehs.trk50(m), ehs.gs50(m), ehs.rtrk50(m),
                ehs.tas50(m))

    elif BDS == "BDS53":
        info = (ehs.hdg53(m), ehs.ias53(m), ehs.mach53(m), ehs.tas53(m),
                ehs.vr53(m))

    elif BDS == "BDS60":
        info = (ehs.hdg60(m), ehs.ias60(m), ehs.mach60(m), ehs.vr60baro(m),
                ehs.vr60ins(m))

    else:
        info = None

    return info
예제 #2
0
파일: test_ehs.py 프로젝트: srofen/pyModeS
def test_ehs_BDS50_functions():
    assert ehs.roll50("A000139381951536E024D4CCF6B5") == 2.1
    assert ehs.trk50("A000139381951536E024D4CCF6B5") == 114.3
    assert ehs.gs50("A000139381951536E024D4CCF6B5") == 438
    assert ehs.rtrk50("A000139381951536E024D4CCF6B5") == 0.125
    assert ehs.tas50("A000139381951536E024D4CCF6B5") == 424
    # signed values
    assert ehs.roll50("A0001691FFD263377FFCE02B2BF9") == -0.4
예제 #3
0
def test_bds50_functions():
    assert bds.bds50.roll50("A000139381951536E024D4CCF6B5") == 2.1
    assert bds.bds50.roll50(
        "A0001691FFD263377FFCE02B2BF9") == -0.4  # signed value
    assert bds.bds50.trk50("A000139381951536E024D4CCF6B5") == 114.258
    assert bds.bds50.gs50("A000139381951536E024D4CCF6B5") == 438
    assert bds.bds50.rtrk50("A000139381951536E024D4CCF6B5") == 0.125
    assert bds.bds50.tas50("A000139381951536E024D4CCF6B5") == 424

    assert commb.roll50("A000139381951536E024D4CCF6B5") == 2.1
    assert commb.roll50("A0001691FFD263377FFCE02B2BF9") == -0.4  # signed value
    assert commb.trk50("A000139381951536E024D4CCF6B5") == 114.258
    assert commb.gs50("A000139381951536E024D4CCF6B5") == 438
    assert commb.rtrk50("A000139381951536E024D4CCF6B5") == 0.125
    assert commb.tas50("A000139381951536E024D4CCF6B5") == 424

    assert ehs.roll50("A000139381951536E024D4CCF6B5") == 2.1
    assert ehs.roll50("A0001691FFD263377FFCE02B2BF9") == -0.4  # signed value
    assert ehs.trk50("A000139381951536E024D4CCF6B5") == 114.258
    assert ehs.gs50("A000139381951536E024D4CCF6B5") == 438
    assert ehs.rtrk50("A000139381951536E024D4CCF6B5") == 0.125
    assert ehs.tas50("A000139381951536E024D4CCF6B5") == 424