From 3dfeaeb88d09d0c15a69a09ac931b84b66532a07 Mon Sep 17 00:00:00 2001 From: Raphael Monstein Date: Mon, 16 Sep 2024 20:09:06 +0200 Subject: [PATCH 1/2] fixed issue 27 --- openap/fuel.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openap/fuel.py b/openap/fuel.py index 6e83072..a99214a 100644 --- a/openap/fuel.py +++ b/openap/fuel.py @@ -46,6 +46,8 @@ def __init__(self, ac, eng=None, **kwargs): if not hasattr(self, "WRAP"): self.WRAP = importlib.import_module("openap.kinematic").WRAP + self.use_synonym = kwargs.get("use_synonym", False) + self.ac = ac.lower() self.aircraft = prop.aircraft(ac, **kwargs) From 5979b4123140f78bddce560397274aa90ae8bfb0 Mon Sep 17 00:00:00 2001 From: Raphael Monstein Date: Tue, 17 Sep 2024 10:17:42 +0200 Subject: [PATCH 2/2] Corrected exception text --- openap/fuel.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openap/fuel.py b/openap/fuel.py index a99214a..e770396 100644 --- a/openap/fuel.py +++ b/openap/fuel.py @@ -67,7 +67,7 @@ def fuel_params(self): """Obtain the fuel model parameters. Returns: - dict: drag polar model parameters. + dict: fuel model parameters. """ polar_files = glob.glob(dir_fuelmodel + "*.yml") ac_polar_available = [pathlib.Path(s).stem for s in polar_files] @@ -79,7 +79,7 @@ def fuel_params(self): if self.use_synonym and syno.shape[0] > 0: ac = syno.new.iloc[0] else: - raise ValueError(f"Drag polar for {self.ac} not avaiable.") + raise ValueError(f"Fuel model for {self.ac} not avaiable.") f = dir_fuelmodel + ac + ".yml" with open(f, "r") as file: