fastoad.models.performances.mission.segments.cruise module

Classes for simulating cruise segments.

class fastoad.models.performances.mission.segments.cruise.CruiseSegment(target: fastoad.model_base.flight_point.FlightPoint, propulsion: fastoad.model_base.propulsion.IPropulsion, polar: fastoad.models.performances.mission.polar.Polar, reference_area: float, time_step: float = 60.0, engine_setting: fastoad.constants.EngineSetting = EngineSetting.CLIMB, altitude_bounds: tuple = (- 500.0, 40000.0), mach_bounds: tuple = (0.0, 5.0), name: str = '', interrupt_if_getting_further_from_target: bool = True)[source]

Bases: fastoad.models.performances.mission.segments.base.RegulatedThrustSegment

Class for computing cruise flight segment at constant altitude and speed.

Mach is considered constant, equal to Mach at starting point. Altitude is constant. Target is a specified ground_distance. The target definition indicates the ground_distance to be covered during the segment, independently of the initial value.

compute_from(start: fastoad.model_base.flight_point.FlightPoint) pandas.core.frame.DataFrame[source]

Computes the flight path segment from provided start point.

Computation ends when target is attained, or if the computation stops getting closer to target. For instance, a climb computation with too low thrust will only return one flight point, that is the provided start point.

Parameters

start – the initial flight point, defined for altitude, mass and speed (true_airspeed, equivalent_airspeed or mach). Can also be defined for time and/or ground_distance.

Returns

a pandas DataFrame where columns names match fields of FlightPoint()

get_distance_to_target(flight_points: List[fastoad.model_base.flight_point.FlightPoint]) float[source]

Computes a “distance” from last flight point to target.

Computed does not need to have a real meaning. The important point is that it must be signed so that algorithm knows on which “side” of the target we are. And of course, it should be 0. if flight point is on target.

Parameters

flight_points – list of all currently computed flight_points

Returns

  1. if target is attained, a non-null value otherwise

target: FlightPoint

A FlightPoint instance that provides parameter values that should all be reached at the end of compute_from(). Possible parameters depend on the current segment. A parameter can also be set to CONSTANT_VALUE to tell that initial value should be kept during all segment.

propulsion: IPropulsion

A IPropulsion instance that will be called at each time step.

polar: Polar

The Polar instance that will provide drag data.

reference_area: float

The reference area, in m**2.

class fastoad.models.performances.mission.segments.cruise.OptimalCruiseSegment(target: fastoad.model_base.flight_point.FlightPoint, propulsion: fastoad.model_base.propulsion.IPropulsion, polar: fastoad.models.performances.mission.polar.Polar, reference_area: float, time_step: float = 60.0, engine_setting: fastoad.constants.EngineSetting = EngineSetting.CLIMB, altitude_bounds: tuple = (- 500.0, 40000.0), mach_bounds: tuple = (0.0, 5.0), name: str = '', interrupt_if_getting_further_from_target: bool = True)[source]

Bases: fastoad.models.performances.mission.segments.cruise.CruiseSegment

Class for computing cruise flight segment at maximum lift/drag ratio.

Altitude is set at every point to get the optimum CL according to current mass. Target is a specified ground_distance. The target definition indicates the ground_distance to be covered during the segment, independently of the initial value. Target should also specify a speed parameter set to “constant”, among mach, true_airspeed and equivalent_airspeed. If not, Mach will be assumed constant.

compute_from(start: fastoad.model_base.flight_point.FlightPoint) pandas.core.frame.DataFrame[source]

Computes the flight path segment from provided start point.

Computation ends when target is attained, or if the computation stops getting closer to target. For instance, a climb computation with too low thrust will only return one flight point, that is the provided start point.

Parameters

start – the initial flight point, defined for altitude, mass and speed (true_airspeed, equivalent_airspeed or mach). Can also be defined for time and/or ground_distance.

Returns

a pandas DataFrame where columns names match fields of FlightPoint()

target: FlightPoint

A FlightPoint instance that provides parameter values that should all be reached at the end of compute_from(). Possible parameters depend on the current segment. A parameter can also be set to CONSTANT_VALUE to tell that initial value should be kept during all segment.

propulsion: IPropulsion

A IPropulsion instance that will be called at each time step.

polar: Polar

The Polar instance that will provide drag data.

reference_area: float

The reference area, in m**2.

class fastoad.models.performances.mission.segments.cruise.ClimbAndCruiseSegment(target: fastoad.model_base.flight_point.FlightPoint, propulsion: fastoad.model_base.propulsion.IPropulsion, polar: fastoad.models.performances.mission.polar.Polar, reference_area: float, time_step: float = 60.0, engine_setting: fastoad.constants.EngineSetting = EngineSetting.CLIMB, altitude_bounds: tuple = (- 500.0, 40000.0), mach_bounds: tuple = (0.0, 5.0), name: str = '', interrupt_if_getting_further_from_target: bool = True, climb_segment: Optional[fastoad.models.performances.mission.segments.altitude_change.AltitudeChangeSegment] = None, maximum_flight_level: float = 500.0)[source]

Bases: fastoad.models.performances.mission.segments.cruise.CruiseSegment

Class for computing cruise flight segment at constant altitude.

Target is a specified ground_distance. The target definition indicates the ground_distance to be covered during the segment, independently of the initial value. Target should also specify a speed parameter set to “constant”, among mach, true_airspeed and equivalent_airspeed. If not, Mach will be assumed constant.

Target altitude can also be set to OPTIMAL_FLIGHT_LEVEL. In that case, the cruise will be preceded by a climb segment and climb_segment must be set at instantiation.

(Target ground distance will be achieved by the sum of ground distances covered during climb and cruise)

In this case, climb will be done up to the IFR Flight Level (as multiple of 100 feet) that ensures minimum mass decrease, while being at most equal to maximum_flight_level.

climb_segment: fastoad.models.performances.mission.segments.altitude_change.AltitudeChangeSegment = None

The AltitudeChangeSegment that can be used if a preliminary climb is needed (its target will be ignored).

maximum_flight_level: float = 500.0

The maximum allowed flight level (i.e. multiple of 100 feet).

compute_from(start: fastoad.model_base.flight_point.FlightPoint) pandas.core.frame.DataFrame[source]

Computes the flight path segment from provided start point.

Computation ends when target is attained, or if the computation stops getting closer to target. For instance, a climb computation with too low thrust will only return one flight point, that is the provided start point.

Parameters

start – the initial flight point, defined for altitude, mass and speed (true_airspeed, equivalent_airspeed or mach). Can also be defined for time and/or ground_distance.

Returns

a pandas DataFrame where columns names match fields of FlightPoint()

class fastoad.models.performances.mission.segments.cruise.BreguetCruiseSegment(target: fastoad.model_base.flight_point.FlightPoint, propulsion: fastoad.model_base.propulsion.IPropulsion, polar: fastoad.models.performances.mission.polar.Polar, reference_area: float = 1.0, time_step: float = 60.0, engine_setting: fastoad.constants.EngineSetting = EngineSetting.CLIMB, altitude_bounds: tuple = (- 500.0, 40000.0), mach_bounds: tuple = (0.0, 5.0), name: str = '', interrupt_if_getting_further_from_target: bool = True, use_max_lift_drag_ratio: bool = False, climb_and_descent_distance: float = 0.0)[source]

Bases: fastoad.models.performances.mission.segments.cruise.CruiseSegment

Class for computing cruise flight segment at constant altitude using Breguet-Leduc formula.

As formula relies on SFC, the propulsion model must be able to fill FlightPoint.sfc when FlightPoint.thrust is provided.

use_max_lift_drag_ratio: bool = False

if True, max lift/drag ratio will be used instead of the one computed with polar using CL deduced from mass and altitude. In this case, reference_area parameter will be unused

reference_area: float = 1.0

The reference area, in m**2. Used only if use_max_lift_drag_ratio is False.

climb_and_descent_distance: float = 0.0
compute_from(start: fastoad.model_base.flight_point.FlightPoint) pandas.core.frame.DataFrame[source]

Computes the flight path segment from provided start point.

Computation ends when target is attained, or if the computation stops getting closer to target. For instance, a climb computation with too low thrust will only return one flight point, that is the provided start point.

Parameters

start – the initial flight point, defined for altitude, mass and speed (true_airspeed, equivalent_airspeed or mach). Can also be defined for time and/or ground_distance.

Returns

a pandas DataFrame where columns names match fields of FlightPoint()