예제 #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
def test_bds60_functions():
    assert bds.bds60.hdg60("A00004128F39F91A7E27C46ADC21") == 42.715
    assert bds.bds60.ias60("A00004128F39F91A7E27C46ADC21") == 252
    assert bds.bds60.mach60("A00004128F39F91A7E27C46ADC21") == 0.42
    assert bds.bds60.vr60baro("A00004128F39F91A7E27C46ADC21") == -1920
    assert bds.bds60.vr60ins("A00004128F39F91A7E27C46ADC21") == -1920

    assert commb.hdg60("A00004128F39F91A7E27C46ADC21") == 42.715
    assert commb.ias60("A00004128F39F91A7E27C46ADC21") == 252
    assert commb.mach60("A00004128F39F91A7E27C46ADC21") == 0.42
    assert commb.vr60baro("A00004128F39F91A7E27C46ADC21") == -1920
    assert commb.vr60ins("A00004128F39F91A7E27C46ADC21") == -1920

    assert ehs.hdg60("A00004128F39F91A7E27C46ADC21") == 42.715
    assert ehs.ias60("A00004128F39F91A7E27C46ADC21") == 252
    assert ehs.mach60("A00004128F39F91A7E27C46ADC21") == 0.42
    assert ehs.vr60baro("A00004128F39F91A7E27C46ADC21") == -1920
    assert ehs.vr60ins("A00004128F39F91A7E27C46ADC21") == -1920
예제 #3
0
파일: test_ehs.py 프로젝트: srofen/pyModeS
def test_ehs_BDS60_functions():
    assert ehs.hdg60("A00004128F39F91A7E27C46ADC21") == 42.7
    assert ehs.ias60("A00004128F39F91A7E27C46ADC21") == 252
    assert ehs.mach60("A00004128F39F91A7E27C46ADC21") == 0.42
    assert ehs.vr60baro("A00004128F39F91A7E27C46ADC21") == -1920
    assert ehs.vr60ins("A00004128F39F91A7E27C46ADC21") == -1920