BADA File Parser

Example of BADA3, BADA4 and BADAH file parser

BADA Family: BADAH | BADA Version: DUMMY | ICAO: DUMH | WTC: L | MTOW = 2675.0
BADA Family: BADA4 | BADA Version: DUMMY | ICAO: DUMT | WTC: M | VMO = 245.0 | MMO = 0.53 | MTOW = 17500.0
BADA Family: BADA3 | BADA Version: DUMMY | ICAO: BZJT | WTC: M | VMO = 292.0 | MMO = 0.755 | MTOW = 7212.0

from pyBADA.bada3 import Bada3Aircraft
from pyBADA.bada4 import Bada4Aircraft
from pyBADA.badaH import BadaHAircraft

# initialization of BADAH
AC = BadaHAircraft(badaVersion="DUMMY", acName="DUMH")

# BADAH
if AC.BADAFamily.BADAH:
    ICAO = AC.ICAO
    WTC = AC.WTC
    MTOW = AC.MTOW
    print(
        "BADA Family:",
        AC.BADAFamilyName,
        "| BADA Version:",
        AC.BADAVersion,
        "| ICAO:",
        ICAO,
        "| WTC:",
        WTC,
        "| MTOW =",
        MTOW,
    )

# initialization of BADA4
AC = Bada4Aircraft(badaVersion="DUMMY", acName="Dummy-TBP")

# BADA3 or BADA4
if AC.BADAFamily.BADA3 or AC.BADAFamily.BADA4:
    ICAO = AC.ICAO
    WTC = AC.WTC
    VMO = AC.VMO
    MMO = AC.MMO
    MTOW = AC.MTOW
    print(
        "BADA Family:",
        AC.BADAFamilyName,
        "| BADA Version:",
        AC.BADAVersion,
        "| ICAO:",
        ICAO,
        "| WTC:",
        WTC,
        "| VMO =",
        VMO,
        "| MMO =",
        MMO,
        "| MTOW =",
        MTOW,
    )

# initialization of BADA3
AC = Bada3Aircraft(badaVersion="DUMMY", acName="BZJT")

# BADA3 or BADA4
if AC.BADAFamily.BADA3 or AC.BADAFamily.BADA4:
    ICAO = AC.ICAO
    WTC = AC.WTC
    VMO = AC.VMO
    MMO = AC.MMO
    MTOW = AC.MTOW
    print(
        "BADA Family:",
        AC.BADAFamilyName,
        "| BADA Version:",
        AC.BADAVersion,
        "| ICAO:",
        ICAO,
        "| WTC:",
        WTC,
        "| VMO =",
        VMO,
        "| MMO =",
        MMO,
        "| MTOW =",
        MTOW,
    )

Total running time of the script: (0 minutes 0.013 seconds)

Gallery generated by Sphinx-Gallery