TCL

pyBADA Trajectory Computation Light (TCL) for BADAH/BADAE/BADA3/BADA4 aircraft performance module Developped @EUROCONTROL (EIH) 2024

pyBADA.TCL.accDec(AC, speedType, v_init, v_final, phase, Hp_init, m_init, DeltaTemp, wS=0.0, turnMetrics={'bankAngle': 0.0, 'directionOfTurn': None, 'rateOfTurn': 0.0}, control=None, Lat=None, Lon=None, initialHeading={'constantHeading': None, 'magnetic': None, 'true': None}, reducedPower=None, magneticDeclinationGrid=None, **kwargs)[source]

Calculates the time, fuel consumption, and other key flight parameters required for an aircraft to perform an acceleration or deceleration from an initial speed (v_init) to a final speed (v_final) during the climb, cruise, or descent phases of flight.

The flight parameters are calculated using different models for the BADA (Base of Aircraft Data) families (BADA3, BADA4, BADAH, BADAE). The function can also accommodate different control laws, vertical evolution phases, wind conditions, and complex flight dynamics like turns.

Note

The control law used during the segment depends on the targets provided in the input parameter ‘control’:

  • ROCD/slope+ESF: Law based on ROCD/slope + ESF

  • ROCD/slope+acc: Law based on ROCD/slope + acceleration

  • ROCD/slope only: Law based on rating + ROCD/slope

  • ESF only: Law based on rating + ESF

  • acc only: Law based on rating + acceleration

  • Neither: Law is rating + default ESF

Parameters:
  • AC – Aircraft object {BADA3/4/H/E}.

  • speedType – Type of speed being followed {M, CAS, TAS}.

  • v_init – Initial speed [kt] (CAS/TAS) or [-] MACH.

  • v_final – Final speed [kt] (CAS/TAS) or [-] MACH.

  • phase – Vertical evolution phase {Climb, Descent, Cruise}.

  • control

    A dictionary containing the following targets:

    • ROCDtarget: Rate of climb/descent to be followed [ft/min].

    • slopetarget: Slope (flight path angle) to be followed [deg].

    • acctarget: Acceleration to be followed [m/s^2].

    • ESFtarget: Energy Share Factor to be followed [-].

  • Hp_init – Initial pressure altitude [ft].

  • m_init – Initial aircraft mass [kg].

  • DeltaTemp – Deviation from the standard ISA temperature [K].

  • wS – Wind speed component along the longitudinal axis (affects ground speed) [kt]. Default is 0.0.

  • turnMetrics

    A dictionary defining turn parameters:

    • rateOfTurn [deg/s]

    • bankAngle [deg]

    • directionOfTurn {LEFT/RIGHT}. Default is straight flight.

  • Lat – Initial latitude [deg]. Default is None.

  • Lon – Initial longitude [deg]. Default is None.

  • initialHeading

    A dictionary defining the initial heading (magnetic or true) and whether to fly a constant heading:

    • magnetic: Magnetic heading [deg].

    • true: True heading [deg].

    • constantHeading: Whether to maintain a constant heading. Default is None.

  • reducedPower – Boolean specifying if reduced power is applied during the climb. Default is None.

  • magneticDeclinationGrid – Optional grid of magnetic declination used to correct magnetic heading. Default is None.

  • kwargs

    Additional optional parameters:

    • speed_step: Speed step size for the iterative calculation [-] for M, [kt] for TAS/CAS. Default is 0.01 Mach, 5 kt for TAS/CAS.

    • SOC_init: Initial battery state of charge for electric aircraft (BADAE) [%]. Default is 100.

    • config: Default aerodynamic configuration (TO, IC, CR, AP, LD). Default is None.

    • mass_const: Boolean indicating whether mass remains constant during the flight segment. Default is False.

    • m_iter: Number of iterations for the mass integration loop. Default is 10 for BADA3/4/H, 5 for BADAE.

Returns:

A pandas DataFrame containing the flight trajectory with columns such as:

  • Hp - wAltitude [ft]

  • TAS - True Air Speed [kt]

  • CAS - Calibrated Air Speed [kt]

  • GS - Ground Speed [kt]

  • M - Mach number [-]

  • ROCD - Rate of Climb/Descent [ft/min]

  • ESF - Energy Share Factor [-]

  • FUEL - Fuel flow [kg/s]

  • FUELCONSUMED - Total fuel consumed [kg]

  • THR - Thrust force [N]

  • DRAG - Drag force [N]

  • time - Elapsed time [s]

  • dist - Distance flown [NM]

  • slope - Trajectory slope [deg]

  • mass - Aircraft mass [kg]

  • config - Aerodynamic configuration

  • LAT - Latitude [deg]

  • LON - Longitude [deg]

  • HDGTrue - True heading [deg]

  • HDGMagnetic - Magnetic heading [deg]

  • BankAngle - Bank angle [deg]

  • ROT - Rate of turn [deg/s]

  • Comment - Comments for each segment

  • For BADAH:
    • Preq - Required power [W]

    • Peng - Generated power [W]

    • Pav - Available power [W]

  • For BADAE (electric aircraft):
    • Pmec - Mechanical power [W]

    • Pelc - Electrical power [W]

    • Pbat - Power supplied by the battery [W]

    • SOCr - Rate of battery state of charge depletion [%/h]

    • SOC - Battery state of charge [%]

    • Ibat - Battery current [A]

    • Vbat - Battery voltage [V]

    • Vgbat - Ground battery voltage [V]

Return type:

pandas.DataFrame

pyBADA.TCL.accDec_time(AC, length, speedType, v_init, speedEvol, phase, Hp_init, m_init, DeltaTemp, wS=0.0, turnMetrics={'bankAngle': 0.0, 'directionOfTurn': None, 'rateOfTurn': 0.0}, control=None, Lat=None, Lon=None, initialHeading={'constantHeading': None, 'magnetic': None, 'true': None}, reducedPower=None, magneticDeclinationGrid=None, **kwargs)[source]

Calculates the time, fuel consumption, and other key flight parameters required for an aircraft to perform an acceleration or deceleration from an initial speed (v_init) over a set period of time during the climb, cruise, or descent phases of flight.

The flight parameters are calculated using different models for the BADA (Base of Aircraft Data) families (BADA3, BADA4, BADAH, BADAE). The function can also accommodate different control laws, vertical evolution phases, wind conditions, and complex flight dynamics like turns.

Note

The control law used during the segment depends on the targets provided in the input parameter ‘control’:

  • ROCD/slope+ESF: Law based on ROCD/slope + ESF

  • ROCD/slope+acc: Law based on ROCD/slope + acceleration

  • ROCD/slope only: Law based on rating + ROCD/slope

  • ESF only: Law based on rating + ESF

  • acc only: Law based on rating + acceleration

  • Neither: Law is rating + default ESF

Parameters:
  • AC – Aircraft object {BADA3/4/H/E}.

  • length – Total duration of the flight segment [s].

  • speedType – Type of speed being followed {M, CAS, TAS}.

  • v_init – Initial speed [kt] (CAS/TAS) or [-] MACH.

  • speedEvol – Evolution of speed {acc, dec} (acceleration or deceleration).

  • phase – Vertical evolution phase {Climb, Descent, Cruise}.

  • control

    A dictionary containing the following targets:

    • ROCDtarget: Rate of climb/descent to be followed [ft/min].

    • slopetarget: Slope (flight path angle) to be followed [deg].

    • acctarget: Acceleration to be followed [m/s^2].

    • ESFtarget: Energy Share Factor to be followed [-].

  • Hp_init – Initial pressure altitude [ft].

  • m_init – Initial aircraft mass [kg].

  • DeltaTemp – Deviation from the standard ISA temperature [K].

  • wS – Wind speed component along the longitudinal axis (affects ground speed) [kt]. Default is 0.0.

  • turnMetrics

    A dictionary defining turn parameters:

    • rateOfTurn [deg/s]

    • bankAngle [deg]

    • directionOfTurn {LEFT/RIGHT}. Default is straight flight.

  • Lat – Initial latitude [deg]. Default is None.

  • Lon – Initial longitude [deg]. Default is None.

  • initialHeading

    A dictionary defining the initial heading (magnetic or true) and whether to fly a constant heading:

    • magnetic: Magnetic heading [deg].

    • true: True heading [deg].

    • constantHeading: Whether to maintain a constant heading. Default is None.

  • reducedPower – Boolean specifying if reduced power is applied during the climb. Default is None.

  • magneticDeclinationGrid – Optional grid of magnetic declination used to correct magnetic heading. Default is None.

  • kwargs

    Additional optional parameters:

    • step_length: Length of each time step in the calculation [s]. Default is 1 second.

    • SOC_init: Initial battery state of charge for electric aircraft (BADAE) [%]. Default is 100.

    • config: Default aerodynamic configuration (TO, IC, CR, AP, LD). Default is None.

    • mass_const: Boolean indicating whether mass remains constant during the flight segment. Default is False.

    • m_iter: Number of iterations for the mass integration loop. Default is 10 for BADA3/4/H, 5 for BADAE.

Returns:

A pandas DataFrame containing the flight trajectory with columns such as:

  • Hp - wAltitude [ft]

  • TAS - True Air Speed [kt]

  • CAS - Calibrated Air Speed [kt]

  • GS - Ground Speed [kt]

  • M - Mach number [-]

  • ROCD - Rate of Climb/Descent [ft/min]

  • ESF - Energy Share Factor [-]

  • FUEL - Fuel flow [kg/s]

  • FUELCONSUMED - Total fuel consumed [kg]

  • THR - Thrust force [N]

  • DRAG - Drag force [N]

  • time - Elapsed time [s]

  • dist - Distance flown [NM]

  • slope - Trajectory slope [deg]

  • mass - Aircraft mass [kg]

  • config - Aerodynamic configuration

  • LAT - Latitude [deg]

  • LON - Longitude [deg]

  • HDGTrue - True heading [deg]

  • HDGMagnetic - Magnetic heading [deg]

  • BankAngle - Bank angle [deg]

  • ROT - Rate of turn [deg/s]

  • Comment - Comments for each segment

  • For BADAH:
    • Preq - Required power [W]

    • Peng - Generated power [W]

    • Pav - Available power [W]

  • For BADAE (electric aircraft):
    • Pmec - Mechanical power [W]

    • Pelc - Electrical power [W]

    • Pbat - Power supplied by the battery [W]

    • SOCr - Rate of battery state of charge depletion [%/h]

    • SOC - Battery state of charge [%]

    • Ibat - Battery current [A]

    • Vbat - Battery voltage [V]

    • Vgbat - Ground battery voltage [V]

Return type:

pandas.DataFrame

pyBADA.TCL.checkArgument(argument, **kwargs)[source]
pyBADA.TCL.constantSpeedLevel(AC, lengthType, length, speedType, v, Hp_init, m_init, DeltaTemp, maxRFL=inf, wS=0.0, turnMetrics={'bankAngle': 0.0, 'directionOfTurn': None, 'rateOfTurn': 0.0}, stepClimb=False, Lat=None, Lon=None, initialHeading={'constantHeading': None, 'magnetic': None, 'true': None}, flightPhase='Cruise', magneticDeclinationGrid=None, **kwargs)[source]

Calculates the time, fuel consumption, and other parameters for a level flight segment at a constant speed for a given aircraft in the BADA model. It supports step-climb, constant heading (true or magnetic), and turns.

The function handles different BADA families (BADA3, BADA4, BADAH, BADAE), and computes various parameters such as altitude, speed, fuel consumption, power, heading, and mass based on aircraft performance data.

Parameters:
  • AC – Aircraft object {BADA3/4/H/E}

  • lengthType – Specifies if the length of the flight segment is based on ‘distance’ [NM] or ‘time’ [s].

  • length – The length of the flight segment. Distance [NM] or Time [s] depending on lengthType.

  • speedType – Specifies the type of speed to follow {M, CAS, TAS}.

  • v – The target speed in [kt] for CAS/TAS or [-] for MACH.

  • Hp_init – Initial pressure altitude at the start of the flight segment [ft].

  • m_init – Initial mass of the aircraft [kg].

  • DeltaTemp – Deviation from the standard ISA temperature [K].

  • maxRFL – Maximum cruise altitude limit [ft]. Default is infinity.

  • wS – Wind speed component along the longitudinal axis (positive for headwind, negative for tailwind) [kt]. Default is 0.0.

  • turnMetrics

    Dictionary containing turn parameters:

    • rateOfTurn [deg/s]

    • bankAngle [deg]

    • directionOfTurn {LEFT/RIGHT}. Default is no turn (straight flight).

  • stepClimb – Boolean to enable or disable step climb during the cruise segment. Default is False.

  • Lat – Geographical latitude of the starting point [deg].

  • Lon – Geographical longitude of the starting point [deg].

  • initialHeading

    Dictionary defining the initial heading and its type:

    • magnetic: Magnetic heading [deg].

    • true: True heading [deg].

    • constantHeading: Whether to fly along a constant heading (loxodrome). Default is None.

  • flightPhase – Defines the phase of flight, e.g., “Cruise”, “Climb”, “Descent”. Default is “Cruise”.

  • magneticDeclinationGrid – Optional magnetic declination grid to correct headings. Default is None.

  • kwargs

    Additional optional parameters:

    • mass_const: Boolean. If True, keeps the aircraft mass constant during the segment. Default is False.

    • SOC_init: Initial battery state of charge for electric aircraft [%]. Default is 100 for BADAE.

    • speedBrakes: Dictionary defining whether speed brakes are deployed and their drag coefficient {deployed: False, value: 0.03}.

    • ROCD_min: Minimum rate of climb/descent threshold to identify service ceiling [ft/min]. Default varies by aircraft type.

    • config: Default aerodynamic configuration. Values: TO, IC, CR, AP, LD.

    • HpStep: Altitude step for step climb [ft]. Default is 2000 ft.

    • m_iter: Number of iterations for mass integration. Default is 1 for BADAE, 2 for others.

    • step_length: The step length for each iteration in [NM] or [s], depending on the lengthType. Default is 100 NM for BADA3/4 and 10 NM for BADAH/BADAE.

Returns:

A pandas DataFrame containing the flight trajectory with columns such as:

  • Hp - wAltitude [ft]

  • TAS - True Air Speed [kt]

  • CAS - Calibrated Air Speed [kt]

  • GS - Ground Speed [kt]

  • M - Mach number [-]

  • ROCD - Rate of Climb/Descent [ft/min]

  • ESF - Energy Share Factor [-]

  • FUEL - Fuel flow [kg/s]

  • FUELCONSUMED - Total fuel consumed [kg]

  • THR - Thrust force [N]

  • DRAG - Drag force [N]

  • time - Elapsed time [s]

  • dist - Distance flown [NM]

  • slope - Trajectory slope [deg]

  • mass - Aircraft mass [kg]

  • config - Aerodynamic configuration

  • LAT - Latitude [deg]

  • LON - Longitude [deg]

  • HDGTrue - True heading [deg]

  • HDGMagnetic - Magnetic heading [deg]

  • BankAngle - Bank angle [deg]

  • ROT - Rate of turn [deg/s]

  • Comment - Comments for each segment

  • For BADAH:
    • Preq - Required power [W]

    • Peng - Generated power [W]

    • Pav - Available power [W]

  • For BADAE (electric aircraft):
    • Pmec - Mechanical power [W]

    • Pelc - Electrical power [W]

    • Pbat - Power supplied by the battery [W]

    • SOCr - Rate of battery state of charge depletion [%/h]

    • SOC - Battery state of charge [%]

    • Ibat - Battery current [A]

    • Vbat - Battery voltage [V]

    • Vgbat - Ground battery voltage [V]

Return type:

pandas.DataFrame

This function works by iteratively calculating the flight trajectory for a given segment of the flight, taking into account the specified flight conditions, and updating the aircraft’s state (altitude, speed, fuel, etc.) at each step of the iteration. The trajectory is returned as a DataFrame containing all relevant flight parameters.

pyBADA.TCL.constantSpeedROCD(AC, speedType, v, Hp_init, Hp_final, ROCDtarget, m_init, DeltaTemp, wS=0.0, turnMetrics={'bankAngle': 0.0, 'directionOfTurn': None, 'rateOfTurn': 0.0}, Lat=None, Lon=None, initialHeading={'constantHeading': None, 'magnetic': None, 'true': None}, reducedPower=None, directionOfTurn=None, magneticDeclinationGrid=None, **kwargs)[source]

Computes the time, fuel consumption, and other parameters required for an aircraft to climb or descend from a given initial altitude (Hp_init) to a final altitude (Hp_final) at a constant speed and rate of climb/descent (ROCD).

The function handles multiple BADA families (BADA3, BADA4, BADAH, BADAE), computing various parameters such as altitude, speed, fuel consumption, power, heading, and mass based on the aircraft’s performance characteristics. The function supports turn performance, optional heading (true or magnetic), and handling mass changes during the flight.

Parameters:
  • AC – Aircraft object {BADA3/4/H/E}

  • speedType – Type of speed to maintain during the flight {M, CAS, TAS}.

  • v – Speed to maintain during the flight - [kt] CAS/TAS or [-] MACH.

  • Hp_init – Initial pressure altitude at the start of the segment [ft].

  • Hp_final – Final pressure altitude at the end of the segment [ft].

  • ROCDtarget – Target rate of climb/descent [ft/min].

  • m_init – Initial aircraft mass at the start of the segment [kg].

  • DeltaTemp – Deviation from standard ISA temperature [K].

  • wS – Wind speed component along the longitudinal axis [kt]. Positive values for headwind, negative for tailwind. Default is 0.0.

  • turnMetrics

    Dictionary defining turn parameters:

    • rateOfTurn [deg/s]

    • bankAngle [deg]

    • directionOfTurn {LEFT/RIGHT}. Default is straight flight.

  • Lat – Geographical latitude of the starting point [deg]. Default is None.

  • Lon – Geographical longitude of the starting point [deg]. Default is None.

  • initialHeading

    Dictionary defining the initial heading (magnetic or true) and whether to fly a constant heading:

    • magnetic: Magnetic heading [deg].

    • true: True heading [deg].

    • constantHeading: Whether to fly along a constant heading (loxodrome). Default is None.

  • reducedPower – Boolean specifying whether to apply reduced power during the climb. Default is None.

  • directionOfTurn – Direction of the turn {LEFT, RIGHT}. Default is None.

  • magneticDeclinationGrid – Optional grid of magnetic declinations used to correct headings. Default is None.

  • kwargs

    Additional optional parameters:

    • Hp_step: Altitude step size [ft]. Default is 1000 for BADA3/4, 500 for BADAH/BADAE.

    • SOC_init: Initial state of charge for electric aircraft [%]. Default is 100 for BADAE.

    • speedBrakes: Dictionary specifying whether speed brakes are deployed and their drag coefficient {deployed: False, value: 0.03}.

    • ROCD_min: Minimum ROCD to identify the service ceiling [ft/min]. Default varies by aircraft type.

    • config: Default aerodynamic configuration. Values: TO, IC, CR, AP, LD. Default is None.

    • mass_const: Boolean specifying whether to keep the mass constant during the segment. Default is False.

    • m_iter: Number of iterations for the mass integration loop. Default is 5.

Returns:

A pandas DataFrame containing the flight trajectory with columns such as:

  • Hp - wAltitude [ft]

  • TAS - True Air Speed [kt]

  • CAS - Calibrated Air Speed [kt]

  • GS - Ground Speed [kt]

  • M - Mach number [-]

  • ROCD - Rate of Climb/Descent [ft/min]

  • ESF - Energy Share Factor [-]

  • FUEL - Fuel flow [kg/s]

  • FUELCONSUMED - Total fuel consumed [kg]

  • THR - Thrust force [N]

  • DRAG - Drag force [N]

  • time - Elapsed time [s]

  • dist - Distance flown [NM]

  • slope - Trajectory slope [deg]

  • mass - Aircraft mass [kg]

  • config - Aerodynamic configuration

  • LAT - Latitude [deg]

  • LON - Longitude [deg]

  • HDGTrue - True heading [deg]

  • HDGMagnetic - Magnetic heading [deg]

  • BankAngle - Bank angle [deg]

  • ROT - Rate of turn [deg/s]

  • Comment - Comments for each segment

  • For BADAH:
    • Preq - Required power [W]

    • Peng - Generated power [W]

    • Pav - Available power [W]

  • For BADAE (electric aircraft):
    • Pmec - Mechanical power [W]

    • Pelc - Electrical power [W]

    • Pbat - Power supplied by the battery [W]

    • SOCr - Rate of battery state of charge depletion [%/h]

    • SOC - Battery state of charge [%]

    • Ibat - Battery current [A]

    • Vbat - Battery voltage [V]

    • Vgbat - Ground battery voltage [V]

Return type:

pandas.DataFrame

Notes: - The function iteratively calculates flight parameters for each altitude step, adjusting fuel, power, and mass. - Magnetic heading and true heading can be adjusted using the magnetic declination grid if provided. - The function supports turns, and constant or changing headings based on input parameters.

pyBADA.TCL.constantSpeedROCD_time(AC, length, speedType, v, Hp_init, ROCDtarget, m_init, DeltaTemp, wS=0.0, turnMetrics={'bankAngle': 0.0, 'directionOfTurn': None, 'rateOfTurn': 0.0}, Lat=None, Lon=None, initialHeading={'constantHeading': None, 'magnetic': None, 'true': None}, reducedPower=None, directionOfTurn=None, magneticDeclinationGrid=None, **kwargs)[source]

Computes the time, fuel consumption, and performance parameters required for an aircraft to perform a climb or descent based on a set amount of time, while maintaining a constant speed and constant rate of climb/descent (ROCD).

The function supports various BADA families (BADA3, BADA4, BADAH, BADAE), with different handling for mass changes, aerodynamic configurations, and energy consumption. It calculates parameters such as fuel consumption, power requirements, speed, heading, and altitude changes over the specified duration.

Parameters:
  • AC – Aircraft object {BADA3/4/H/E}

  • length – The length of the segment to fly in time [s].

  • speedType – Type of speed to maintain during the flight {M, CAS, TAS}.

  • v – Speed to follow - [kt] CAS/TAS or [-] MACH.

  • Hp_init – Initial pressure altitude [ft].

  • ROCDtarget – Rate of climb or descent [ft/min].

  • m_init – Initial aircraft mass at the start of the segment [kg].

  • DeltaTemp – Deviation from standard ISA temperature [K].

  • wS – Wind speed component along the longitudinal axis [kt]. Default is 0.0.

  • turnMetrics

    Dictionary defining turn parameters:

    • rateOfTurn [deg/s]

    • bankAngle [deg]

    • directionOfTurn {LEFT/RIGHT}. Default is straight flight.

  • Lat – Geographical latitude at the start [deg]. Default is None.

  • Lon – Geographical longitude at the start [deg]. Default is None.

  • initialHeading

    Dictionary defining the initial heading (magnetic or true) and whether to fly a constant heading:

    • magnetic: Magnetic heading [deg].

    • true: True heading [deg].

    • constantHeading: Whether to fly along a constant heading (loxodrome). Default is None.

  • reducedPower – Boolean specifying whether to apply reduced power during the climb. Default is None.

  • directionOfTurn – Direction of the turn {LEFT, RIGHT}. Default is None.

  • magneticDeclinationGrid – Optional grid of magnetic declinations used to correct headings. Default is None.

  • kwargs

    Additional optional parameters:

    • step_length: Step size in seconds for time iteration. Default is 1 second.

    • SOC_init: Initial state of charge for electric aircraft [%]. Default is 100 for BADAE.

    • speedBrakes: Dictionary specifying whether speed brakes are deployed and their drag coefficient {deployed: False, value: 0.03}.

    • ROCD_min: Minimum ROCD to identify the service ceiling [ft/min]. Default varies by aircraft type.

    • config: Default aerodynamic configuration. Values: TO, IC, CR, AP, LD. Default is None.

    • mass_const: Boolean specifying whether to keep the mass constant during the segment. Default is False.

    • m_iter: Number of iterations for the mass integration loop. Default is 5.

Returns:

A pandas DataFrame containing the flight trajectory with columns such as:

  • Hp - wAltitude [ft]

  • TAS - True Air Speed [kt]

  • CAS - Calibrated Air Speed [kt]

  • GS - Ground Speed [kt]

  • M - Mach number [-]

  • ROCD - Rate of Climb/Descent [ft/min]

  • ESF - Energy Share Factor [-]

  • FUEL - Fuel flow [kg/s]

  • FUELCONSUMED - Total fuel consumed [kg]

  • THR - Thrust force [N]

  • DRAG - Drag force [N]

  • time - Elapsed time [s]

  • dist - Distance flown [NM]

  • slope - Trajectory slope [deg]

  • mass - Aircraft mass [kg]

  • config - Aerodynamic configuration

  • LAT - Latitude [deg]

  • LON - Longitude [deg]

  • HDGTrue - True heading [deg]

  • HDGMagnetic - Magnetic heading [deg]

  • BankAngle - Bank angle [deg]

  • ROT - Rate of turn [deg/s]

  • Comment - Comments for each segment

  • For BADAH:
    • Preq - Required power [W]

    • Peng - Generated power [W]

    • Pav - Available power [W]

  • For BADAE (electric aircraft):
    • Pmec - Mechanical power [W]

    • Pelc - Electrical power [W]

    • Pbat - Power supplied by the battery [W]

    • SOCr - Rate of battery state of charge depletion [%/h]

    • SOC - Battery state of charge [%]

    • Ibat - Battery current [A]

    • Vbat - Battery voltage [V]

    • Vgbat - Ground battery voltage [V]

Return type:

pandas.DataFrame

pyBADA.TCL.constantSpeedRating(AC, speedType, v, Hp_init, Hp_final, m_init, DeltaTemp, wS=0.0, turnMetrics={'bankAngle': 0.0, 'directionOfTurn': None, 'rateOfTurn': 0.0}, Lat=None, Lon=None, initialHeading={'constantHeading': None, 'magnetic': None, 'true': None}, reducedPower=None, directionOfTurn=None, expedite=False, magneticDeclinationGrid=None, initRating=None, **kwargs)[source]

Calculates time, fuel consumption, and other parameters required for an aircraft to perform a climb or descent from an initial altitude (Hp_init) to a final altitude (Hp_final) while maintaining a constant speed and engine rating.

It uses different models for BADA (Base of Aircraft Data) families (BADA3, BADA4, BADAH, BADAE) to compute key flight parameters such as fuel burn, rate of climb/descent (ROCD), thrust, drag, and energy requirements. The function also supports complex flight dynamics including turns, heading changes, and wind influences.

Parameters:
  • AC – Aircraft object {BADA3/4/H/E}.

  • speedType – Type of speed to maintain during the flight {M (Mach), CAS, TAS}.

  • v – Speed to follow - [kt] CAS/TAS or [-] MACH.

  • Hp_init – Initial pressure altitude [ft].

  • Hp_final – Final pressure altitude [ft].

  • m_init – Initial mass of the aircraft at the start of the segment [kg].

  • DeltaTemp – Deviation from the standard ISA temperature [K].

  • wS – Wind speed component along the longitudinal axis (affects ground speed) [kt]. Default is 0.0.

  • turnMetrics

    A dictionary defining the turn parameters:

    • rateOfTurn [deg/s]

    • bankAngle [deg]

    • directionOfTurn {LEFT/RIGHT}. Default is straight flight.

  • Lat – Initial latitude [deg]. Default is None.

  • Lon – Initial longitude [deg]. Default is None.

  • initialHeading

    A dictionary defining the initial heading (magnetic or true) and whether to fly a constant heading:

    • magnetic: Magnetic heading [deg].

    • true: True heading [deg].

    • constantHeading: Whether to maintain a constant heading. Default is None.

  • reducedPower – Boolean specifying if reduced power is applied during the climb. Default is None.

  • directionOfTurn – Direction of the turn {LEFT, RIGHT}. Default is None.

  • expedite – Boolean flag to expedite climb/descent. Default is False.

  • magneticDeclinationGrid – Optional grid of magnetic declination used to correct magnetic heading. Default is None.

  • kwargs

    Additional optional parameters:

    • Hp_step: Step size in altitude for the iterative calculation [ft]. Default is 1000 ft for BADA3/BADA4, 500 ft for BADAH/BADAE.

    • SOC_init: Initial battery state of charge for electric aircraft (BADAE) [%]. Default is 100.

    • speedBrakes: A dictionary specifying whether speed brakes are deployed and the additional drag coefficient {deployed: False, value: 0.03}.

    • ROCD_min: Minimum rate of climb/descent used to determine service ceiling [ft/min]. Default varies based on aircraft type.

    • config: Default aerodynamic configuration (TO, IC, CR, AP, LD). Default is None.

    • mass_const: Boolean indicating whether mass remains constant during the flight segment. Default is False.

    • m_iter: Number of iterations for the mass integration loop. Default is 5.

Returns:

A pandas DataFrame containing the flight trajectory with columns such as:

  • Hp - wAltitude [ft]

  • TAS - True Air Speed [kt]

  • CAS - Calibrated Air Speed [kt]

  • GS - Ground Speed [kt]

  • M - Mach number [-]

  • ROCD - Rate of Climb/Descent [ft/min]

  • ESF - Energy Share Factor [-]

  • FUEL - Fuel flow [kg/s]

  • FUELCONSUMED - Total fuel consumed [kg]

  • THR - Thrust force [N]

  • DRAG - Drag force [N]

  • time - Elapsed time [s]

  • dist - Distance flown [NM]

  • slope - Trajectory slope [deg]

  • mass - Aircraft mass [kg]

  • config - Aerodynamic configuration

  • LAT - Latitude [deg]

  • LON - Longitude [deg]

  • HDGTrue - True heading [deg]

  • HDGMagnetic - Magnetic heading [deg]

  • BankAngle - Bank angle [deg]

  • ROT - Rate of turn [deg/s]

  • Comment - Comments for each segment

  • For BADAH:
    • Preq - Required power [W]

    • Peng - Generated power [W]

    • Pav - Available power [W]

  • For BADAE (electric aircraft):
    • Pmec - Mechanical power [W]

    • Pelc - Electrical power [W]

    • Pbat - Power supplied by the battery [W]

    • SOCr - Rate of battery state of charge depletion [%/h]

    • SOC - Battery state of charge [%]

    • Ibat - Battery current [A]

    • Vbat - Battery voltage [V]

    • Vgbat - Ground battery voltage [V]

Return type:

pandas.DataFrame

pyBADA.TCL.constantSpeedRating_time(AC, length, speedType, v, Hp_init, phase, m_init, DeltaTemp, wS=0.0, turnMetrics={'bankAngle': 0.0, 'directionOfTurn': None, 'rateOfTurn': 0.0}, Lat=None, Lon=None, initialHeading={'constantHeading': None, 'magnetic': None, 'true': None}, reducedPower=None, directionOfTurn=None, expedite=False, magneticDeclinationGrid=None, initRating=None, **kwargs)[source]

Calculates the time, fuel consumption, and other flight parameters required for an aircraft to perform a climb or descent at constant speed and engine rating for a specified duration.

It uses different models for BADA (Base of Aircraft Data) families (BADA3, BADA4, BADAH, BADAE) to compute key parameters such as rate of climb/descent (ROCD), thrust, drag, fuel burn, and power requirements. The function also supports complex flight dynamics, including turns, heading changes, and the effect of wind.

Parameters:
  • AC – Aircraft object {BADA3/4/H/E}.

  • length – Duration of the flight segment [s].

  • speedType – Type of speed to maintain during the flight {M, CAS, TAS}.

  • v – Speed to follow - [kt] CAS/TAS or [-] MACH.

  • Hp_init – Initial pressure altitude [ft].

  • phase – Phase of flight (Climb or Descent).

  • m_init – Initial mass of the aircraft at the start of the segment [kg].

  • DeltaTemp – Deviation from the standard ISA temperature [K].

  • wS – Wind speed component along the longitudinal axis (affects ground speed) [kt]. Default is 0.0.

  • turnMetrics

    A dictionary defining the turn parameters:

    • rateOfTurn [deg/s]

    • bankAngle [deg]

    • directionOfTurn {LEFT/RIGHT}. Default is straight flight.

  • Lat – Initial latitude [deg]. Default is None.

  • Lon – Initial longitude [deg]. Default is None.

  • initialHeading

    A dictionary defining the initial heading (magnetic or true) and whether to fly a constant heading:

    • magnetic: Magnetic heading [deg].

    • true: True heading [deg].

    • constantHeading: Whether to maintain a constant heading. Default is None.

  • reducedPower – Boolean specifying if reduced power is applied during the climb. Default is None.

  • directionOfTurn – Direction of the turn {LEFT, RIGHT}. Default is None.

  • expedite – Boolean flag to expedite the climb/descent. Default is False.

  • magneticDeclinationGrid – Optional grid of magnetic declination used to correct magnetic heading. Default is None.

  • initRating – Initial engine rating settings. Default is None.

  • kwargs

    Additional optional parameters:

    • step_length: Step size in time for the iterative calculation [s]. Default is 1 s.

    • SOC_init: Initial battery state of charge for electric aircraft (BADAE) [%]. Default is 100.

    • speedBrakes: A dictionary specifying whether speed brakes are deployed and the additional drag coefficient {deployed: False, value: 0.03}.

    • ROCD_min: Minimum rate of climb/descent to determine service ceiling [ft/min]. Default varies by aircraft type.

    • config: Default aerodynamic configuration (TO, IC, CR, AP, LD). Default is None.

    • mass_const: Boolean indicating whether mass remains constant during the flight segment. Default is False.

    • m_iter: Number of iterations for the mass integration loop. Default is 5.

Returns:

A pandas DataFrame containing the flight trajectory with columns such as:

  • Hp - wAltitude [ft]

  • TAS - True Air Speed [kt]

  • CAS - Calibrated Air Speed [kt]

  • GS - Ground Speed [kt]

  • M - Mach number [-]

  • ROCD - Rate of Climb/Descent [ft/min]

  • ESF - Energy Share Factor [-]

  • FUEL - Fuel flow [kg/s]

  • FUELCONSUMED - Total fuel consumed [kg]

  • THR - Thrust force [N]

  • DRAG - Drag force [N]

  • time - Elapsed time [s]

  • dist - Distance flown [NM]

  • slope - Trajectory slope [deg]

  • mass - Aircraft mass [kg]

  • config - Aerodynamic configuration

  • LAT - Latitude [deg]

  • LON - Longitude [deg]

  • HDGTrue - True heading [deg]

  • HDGMagnetic - Magnetic heading [deg]

  • BankAngle - Bank angle [deg]

  • ROT - Rate of turn [deg/s]

  • Comment - Comments for each segment

  • For BADAH:
    • Preq - Required power [W]

    • Peng - Generated power [W]

    • Pav - Available power [W]

  • For BADAE (electric aircraft):
    • Pmec - Mechanical power [W]

    • Pelc - Electrical power [W]

    • Pbat - Power supplied by the battery [W]

    • SOCr - Rate of battery state of charge depletion [%/h]

    • SOC - Battery state of charge [%]

    • Ibat - Battery current [A]

    • Vbat - Battery voltage [V]

    • Vgbat - Ground battery voltage [V]

Return type:

pandas.DataFrame

pyBADA.TCL.constantSpeedSlope(AC, speedType, v, Hp_init, Hp_final, slopetarget, m_init, DeltaTemp, wS=0.0, turnMetrics={'bankAngle': 0.0, 'directionOfTurn': None, 'rateOfTurn': 0.0}, Lat=None, Lon=None, initialHeading={'constantHeading': None, 'magnetic': None, 'true': None}, reducedPower=None, directionOfTurn=None, magneticDeclinationGrid=None, **kwargs)[source]

Calculates time, fuel consumption, and other parameters required for an aircraft to perform a climb or descent from an initial altitude (Hp_init) to a final altitude (Hp_final) while maintaining a constant speed and a constant slope.

It uses different models for BADA (Base of Aircraft Data) families (BADA3, BADA4, BADAH, BADAE) to compute key flight parameters such as energy consumption, rate of climb/descent (ROCD), fuel burn, mass changes, and power requirements. The function also supports complex flight dynamics including turns, heading changes, and wind influences.

Parameters:
  • AC – Aircraft object {BADA3/4/H/E}.

  • speedType – Type of speed to maintain during the flight {M, CAS, TAS}.

  • v – Speed to follow - [kt] CAS/TAS or [-] MACH.

  • Hp_init – Initial pressure altitude [ft].

  • Hp_final – Final pressure altitude [ft].

  • slopetarget – Target slope (trajectory angle) to be maintained during climb/descent [deg].

  • m_init – Initial mass of the aircraft at the start of the segment [kg].

  • DeltaTemp – Deviation from the standard ISA temperature [K].

  • wS – Wind speed component along the longitudinal axis (affects ground speed) [kt]. Default is 0.0.

  • turnMetrics

    A dictionary defining the turn parameters:

    • rateOfTurn [deg/s]

    • bankAngle [deg]

    • directionOfTurn {LEFT/RIGHT}. Default is straight flight.

  • Lat – Initial latitude [deg]. Default is None.

  • Lon – Initial longitude [deg]. Default is None.

  • initialHeading

    A dictionary defining the initial heading (magnetic or true) and whether to fly a constant heading:

    • magnetic: Magnetic heading [deg].

    • true: True heading [deg].

    • constantHeading: Whether to maintain a constant heading. Default is None.

  • reducedPower – Boolean specifying if reduced power is applied during the climb. Default is None.

  • directionOfTurn – Direction of the turn {LEFT, RIGHT}. Default is None.

  • magneticDeclinationGrid – Optional grid of magnetic declination used to correct magnetic heading. Default is None.

  • kwargs

    Additional optional parameters:

    • Hp_step: Step size in altitude for the iterative calculation [ft]. Default is 1000 ft for BADA3/BADA4, 500 ft for BADAH/BADAE.

    • SOC_init: Initial battery state of charge for electric aircraft (BADAE) [%]. Default is 100.

    • speedBrakes: A dictionary specifying whether speed brakes are deployed and the additional drag coefficient {deployed: False, value: 0.03}.

    • ROCD_min: Minimum rate of climb/descent used to determine service ceiling [ft/min]. Default varies based on aircraft type.

    • config: Default aerodynamic configuration (TO, IC, CR, AP, LD). Default is None.

    • mass_const: Boolean indicating whether mass remains constant during the flight segment. Default is False.

    • m_iter: Number of iterations for the mass integration loop. Default is 5.

Returns:

A pandas DataFrame containing the flight trajectory with columns such as:

  • Hp - wAltitude [ft]

  • TAS - True Air Speed [kt]

  • CAS - Calibrated Air Speed [kt]

  • GS - Ground Speed [kt]

  • M - Mach number [-]

  • ROCD - Rate of Climb/Descent [ft/min]

  • ESF - Energy Share Factor [-]

  • FUEL - Fuel flow [kg/s]

  • FUELCONSUMED - Total fuel consumed [kg]

  • THR - Thrust force [N]

  • DRAG - Drag force [N]

  • time - Elapsed time [s]

  • dist - Distance flown [NM]

  • slope - Trajectory slope [deg]

  • mass - Aircraft mass [kg]

  • config - Aerodynamic configuration

  • LAT - Latitude [deg]

  • LON - Longitude [deg]

  • HDGTrue - True heading [deg]

  • HDGMagnetic - Magnetic heading [deg]

  • BankAngle - Bank angle [deg]

  • ROT - Rate of turn [deg/s]

  • Comment - Comments for each segment

  • For BADAH:
    • Preq - Required power [W]

    • Peng - Generated power [W]

    • Pav - Available power [W]

  • For BADAE (electric aircraft):
    • Pmec - Mechanical power [W]

    • Pelc - Electrical power [W]

    • Pbat - Power supplied by the battery [W]

    • SOCr - Rate of battery state of charge depletion [%/h]

    • SOC - Battery state of charge [%]

    • Ibat - Battery current [A]

    • Vbat - Battery voltage [V]

    • Vgbat - Ground battery voltage [V]

Return type:

pandas.DataFrame

pyBADA.TCL.constantSpeedSlope_time(AC, length, speedType, v, Hp_init, slopetarget, m_init, DeltaTemp, wS=0.0, turnMetrics={'bankAngle': 0.0, 'directionOfTurn': None, 'rateOfTurn': 0.0}, Lat=None, Lon=None, initialHeading={'constantHeading': None, 'magnetic': None, 'true': None}, reducedPower=None, directionOfTurn=None, magneticDeclinationGrid=None, **kwargs)[source]

Computes the time, fuel, and trajectory parameters required by an aircraft to climb or descend at constant speed and slope over a given duration.

This function models a trajectory with constant speed (either CAS, TAS, or Mach) and a specified slope (degrees). The aircraft’s dynamics are modeled based on BADA family data (BADA3, BADA4, BADAH, BADAE), supporting various aircraft types including electric models. It also accounts for turns, heading changes, and wind effects.

Parameters:
  • AC – Aircraft object {BADA3, BADA4, BADAH, BADAE}.

  • length – Total duration of the segment [s].

  • speedType – Speed type to follow during the trajectory {M, CAS, TAS}.

  • v – Speed to follow (in knots for CAS/TAS or as a Mach number) [kt] or [-] for Mach.

  • Hp_init – Initial pressure altitude [ft].

  • slopetarget – Desired slope (trajectory angle) to follow [deg].

  • m_init – Initial aircraft mass [kg].

  • DeltaTemp – Deviation from standard ISA temperature [K].

  • wS – Longitudinal wind speed component (affects ground speed) [kt]. Default is 0.0.

  • turnMetrics

    A dictionary defining the turn parameters:

    • rateOfTurn [deg/s]

    • bankAngle [deg]

    • directionOfTurn {LEFT/RIGHT}. Default is straight flight.

  • Lat – Initial latitude [deg]. Default is None.

  • Lon – Initial longitude [deg]. Default is None.

  • initialHeading

    A dictionary specifying the initial heading (magnetic or true) and whether to fly a constant heading:

    • magnetic: Magnetic heading [deg].

    • true: True heading [deg].

    • constantHeading: Whether to maintain a constant heading [True/False].

  • reducedPower – Boolean specifying if reduced power is applied during climb/descent. Default is None.

  • directionOfTurn – Direction of turn {LEFT, RIGHT}. Default is None.

  • magneticDeclinationGrid – Optional magnetic declination grid for correcting magnetic heading. Default is None.

  • kwargs

    Additional optional parameters:

    • step_length: Step length for trajectory calculation [s]. Default is 1 second.

    • Hp_step: Altitude step size for calculations [ft]. Default is 1000 ft for BADA3/BADA4, 500 ft for BADAH/BADAE.

    • SOC_init: Initial battery state of charge (for electric aircraft) [%]. Default is 100.

    • config: Default aerodynamic configuration {TO, IC, CR, AP, LD}. If not provided, configuration is calculated automatically.

    • speedBrakes: Dictionary specifying if speed brakes are deployed and additional drag coefficient {deployed: False, value: 0.03}.

    • ROCD_min: Minimum Rate of Climb/Descent to determine service ceiling [ft/min]. Defaults depend on aircraft type and engine.

    • mass_const: Boolean indicating whether mass remains constant during the flight. Default is False.

    • m_iter: Number of iterations for mass integration. Default is 5.

Returns:

A pandas DataFrame containing the flight trajectory with columns such as:

  • Hp - wAltitude [ft]

  • TAS - True Air Speed [kt]

  • CAS - Calibrated Air Speed [kt]

  • GS - Ground Speed [kt]

  • M - Mach number [-]

  • ROCD - Rate of Climb/Descent [ft/min]

  • ESF - Energy Share Factor [-]

  • FUEL - Fuel flow [kg/s]

  • FUELCONSUMED - Total fuel consumed [kg]

  • THR - Thrust force [N]

  • DRAG - Drag force [N]

  • time - Elapsed time [s]

  • dist - Distance flown [NM]

  • slope - Trajectory slope [deg]

  • mass - Aircraft mass [kg]

  • config - Aerodynamic configuration

  • LAT - Latitude [deg]

  • LON - Longitude [deg]

  • HDGTrue - True heading [deg]

  • HDGMagnetic - Magnetic heading [deg]

  • BankAngle - Bank angle [deg]

  • ROT - Rate of turn [deg/s]

  • Comment - Comments for each segment

  • For BADAH:
    • Preq - Required power [W]

    • Peng - Generated power [W]

    • Pav - Available power [W]

  • For BADAE (electric aircraft):
    • Pmec - Mechanical power [W]

    • Pelc - Electrical power [W]

    • Pbat - Power supplied by the battery [W]

    • SOCr - Rate of battery state of charge depletion [%/h]

    • SOC - Battery state of charge [%]

    • Ibat - Battery current [A]

    • Vbat - Battery voltage [V]

    • Vgbat - Ground battery voltage [V]

Return type:

pandas.DataFrame

class pyBADA.TCL.target(ROCDtarget: float = None, slopetarget: float = None, acctarget: float = None, ESFtarget: float = None)[source]

Bases: object

ESFtarget: float = None
ROCDtarget: float = None
acctarget: float = None
slopetarget: float = None