gedai.fuel
Functions to calculate fuel use.
- gedai.fuel.compute_fuel_flow(obj: DataFrame, fuelflow, m_start: float, ac: dict, retry_with_mtow: bool = True, vectorised: bool = True) DataFrame[source]
 - gedai.fuel.compute_fuel_flow(obj: Flight, fuelflow, m_start: float, ac: dict, retry_with_mtow: bool = True, vectorised: bool = True) Flight
 Calculate fuel flow based on phase, mass, and aircraft config.
Accepts either a pandas DataFrame or a Flight object. If given a Flight, it returns a new Flight with added fuel-related columns. If given a DataFrame, it returns a modified copy.
- Parameters:
 df (pd.DataFrame) – Flight data.
fuelflow (openap.FuelFlow) – Instance of the OpenAP FuelFlow class.
m_start (float) – Initial mass of the aircraft [kg] or fraction of MTOW.
ac (dict) – Aircraft configuration.
retry_with_mtow (bool, optional) – Retry with MTOW if final mass is below OEW. Defaults to True.
vectorised (bool, optional) – Use a vectorised method (approximation, but up to 100 times faster). Defaults to True.
- Returns:
 - DataFrame with columns “fuelflow” [kg/s],
 ”fuel” [kg], and “dt” [s].
- Return type:
 Union[pd.DataFrame, Flight]
- Raises:
 ValueError – If m_start is invalid or final mass is below OEW.