diff --git a/examples/optimum_speed_altitude.py b/examples/optimum_speed_altitude.py index 5e35e3a..3564dc2 100644 --- a/examples/optimum_speed_altitude.py +++ b/examples/optimum_speed_altitude.py @@ -13,11 +13,11 @@ from pyBADA.bada4 import Parser as Bada4Parser from pyBADA.badaH import Parser as BadaHParser -# initialization of BADA3, BADA4 and BADAH -# uncomment for testing different BADA family if available badaVersion = "DUMMY" -AC = BadaHAircraft(badaVersion=badaVersion, acName="DUMH") -# AC = Bada4Aircraft(badaVersion=badaVersion, acName='DUMMY-TWIN') + +# initialization of BADA4 +AC = Bada4Aircraft(badaVersion=badaVersion, acName="DUMMY-TWIN") +print("BADA4 Optimum Speed and Altitude:") # BADA4 if AC.BADAFamily.BADA4: @@ -77,6 +77,9 @@ optAlt_precomputed = AC.OPT.getOPTParam("OPTALT", M, mass) print("optAlt_precomputed = ", optAlt_precomputed) +# initialization of BADAH +AC = BadaHAircraft(badaVersion=badaVersion, acName="DUMH") +print("\nBADAH Optimum Speed and Altitude:") # BADAH if AC.BADAFamily.BADAH: diff --git a/src/pyBADA/bada4.py b/src/pyBADA/bada4.py index d43c10a..2f7aabb 100644 --- a/src/pyBADA/bada4.py +++ b/src/pyBADA/bada4.py @@ -3801,8 +3801,6 @@ def getOPTParam(self, optParam, var_1, var_2=None): filename = os.path.join( self.AC.filePath, - "BADA4", - self.AC.BADAVersion, self.AC.acName, optParam + ".OPT", ) diff --git a/src/pyBADA/badaH.py b/src/pyBADA/badaH.py index 90b60a3..02e3968 100644 --- a/src/pyBADA/badaH.py +++ b/src/pyBADA/badaH.py @@ -1215,8 +1215,6 @@ def getOPTParam(self, optParam, var_1, var_2, DeltaTemp): filename = os.path.join( self.AC.filePath, - self.AC.BADAFamilyName, - self.AC.BADAVersion, self.AC.acName, optParam + ".OPT", )