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

Classes for simulating cruise segments.

class fastoad.models.performances.mission.segments.registered.cruise.CruiseSegment(name: str = '', target: FlightPoint = <object object>, isa_offset: float = 0.0, propulsion: IPropulsion = <object object>, polar: Polar = <object object>, polar_modifier: AbstractPolarModifier = <factory>, reference_area: float = <object object>, time_step: float = 60.0, maximum_CL: float = None, altitude_bounds: tuple = (-500.0, 40000.0), mach_bounds: tuple = (-1e-06, 5.0), interrupt_if_getting_further_from_target: bool = True, engine_setting: EngineSetting = <EngineSetting.CLIMB: 2>, load_factor: float = 1.0, slope_angle: float = 0.0, upper_thrust_rate_limit: float = 1.0, lower_thrust_rate_limit: float = 0.0, thrust_rate_out_of_bound: str = 'limit')[source]

Bases: AbstractRegulatedThrustSegment, AbstractLiftFromWeightSegment

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.

time_step: float = 60.0

Used time step for computation (actual time step can be lower at some particular times of the flight path).

slope_angle: float = 0.0
get_distance_to_target(flight_points: list[FlightPoint], target: 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

  • target – segment target (will not contain relative values)

Returns:

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

property target: FlightPoint

The base class of the class hierarchy.

When called, it accepts no arguments and returns a new featureless instance that has no instance attributes and cannot be given any.

class fastoad.models.performances.mission.segments.registered.cruise.OptimalCruiseSegment(name: str = '', target: FlightPoint = <object object>, isa_offset: float = 0.0, propulsion: IPropulsion = <object object>, polar: Polar = <object object>, polar_modifier: AbstractPolarModifier = <factory>, reference_area: float = <object object>, time_step: float = 60.0, maximum_CL: float = None, altitude_bounds: tuple = (-500.0, 40000.0), mach_bounds: tuple = (-1e-06, 5.0), interrupt_if_getting_further_from_target: bool = True, engine_setting: EngineSetting = <EngineSetting.CLIMB: 2>, load_factor: float = 1.0, slope_angle: float = 0.0, upper_thrust_rate_limit: float = 1.0, lower_thrust_rate_limit: float = 0.0, thrust_rate_out_of_bound: str = 'limit', maximum_altitude: float | None = None, maximum_flight_level: float = 500.0)[source]

Bases: 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.

Important: The segment computes the optimal altitude at the start point and sets it immediately. If the previous segment ended at a different altitude, there will be an instantaneous altitude change (no climb segment). To avoid this “teleportation”, Consider adding a climb segment with the keyword ‘optimal_altitude’ as target before optimal cruise.

Note: Maximum altitude enforcement is done in compute_from_start_to_target and _compute_next_altitude rather than overriding _check_values, since _check_values only validates but does not modify flight point values.

maximum_altitude: float | None = None

Maximum allowed altitude in meters for the optimal cruise. When the optimal altitude exceeds this value, the aircraft will stay at this maximum altitude and CL will be reduced accordingly. If None, no meter-based altitude cap is applied (only maximum_flight_level applies).

maximum_flight_level: float = 500.0

The maximum allowed flight level (i.e. multiple of 100 feet). This sets an altitude cap at maximum_flight_level * 100 ft. When the optimal altitude exceeds this limit, the aircraft will stay at the capped altitude and CL will be reduced. Both this and maximum_altitude can be set; the most restrictive (lowest) cap will be applied.

compute_from_start_to_target(start: FlightPoint, target: FlightPoint) DataFrame[source]

Here should come the implementation for computing flight points between start and target flight points.

Parameters:
  • start

  • target – Definition of segment target

Returns:

a pandas DataFrame where column names match fields of FlightPoint

property target: FlightPoint

The base class of the class hierarchy.

When called, it accepts no arguments and returns a new featureless instance that has no instance attributes and cannot be given any.

class fastoad.models.performances.mission.segments.registered.cruise.ClimbAndCruiseSegment(name: str = '', target: FlightPoint = <object object>, isa_offset: float = 0.0, propulsion: IPropulsion = <object object>, polar: Polar = <object object>, polar_modifier: AbstractPolarModifier = <factory>, reference_area: float = <object object>, time_step: float = 60.0, maximum_CL: float = None, altitude_bounds: tuple = (-500.0, 40000.0), mach_bounds: tuple = (-1e-06, 5.0), interrupt_if_getting_further_from_target: bool = True, engine_setting: EngineSetting = <EngineSetting.CLIMB: 2>, load_factor: float = 1.0, slope_angle: float = 0.0, upper_thrust_rate_limit: float = 1.0, lower_thrust_rate_limit: float = 0.0, thrust_rate_out_of_bound: str = 'limit', climb_segment: AltitudeChangeSegment | None = None, maximum_flight_level: float = 500.0)[source]

Bases: 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. The climb_segment is automatically populated when this segment is used inside a route; it only needs to be explicitly set if you want to modify the climb behavior or when using the class directly without a route.

(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: AltitudeChangeSegment | None = None

The AltitudeChangeSegment that can be used if a preliminary climb is needed (its target will be ignored). Note: When this segment is used inside a route, the climb_segment is automatically populated. This attribute only needs to be explicitly set if you want to modify the climb segment behavior or when using the class directly without a route.

maximum_flight_level: float = 500.0

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

compute_from_start_to_target(start: FlightPoint, target: FlightPoint) DataFrame[source]

Here should come the implementation for computing flight points between start and target flight points.

Parameters:
  • start

  • target – Definition of segment target

Returns:

a pandas DataFrame where column names match fields of FlightPoint

is_next_flight_level_exceeding_maximum_cl(altitude_next_flight_level: float, flight_point: FlightPoint) bool[source]

Returns true if the CL at the next flight level is higher than the maximum_CL

Parameters:
  • altitude_next_flight_level – the altitude of the next flight level in m

  • flight_point – the current flight point

property target: FlightPoint

The base class of the class hierarchy.

When called, it accepts no arguments and returns a new featureless instance that has no instance attributes and cannot be given any.

class fastoad.models.performances.mission.segments.registered.cruise.BreguetCruiseSegment(name: str = '', target: FlightPoint = <object object>, isa_offset: float = 0.0, propulsion: IPropulsion = <object object>, polar: Polar = <object object>, polar_modifier: AbstractPolarModifier = <factory>, reference_area: float = 1.0, time_step: float = 60.0, maximum_CL: float = None, altitude_bounds: tuple = (-500.0, 40000.0), mach_bounds: tuple = (-1e-06, 5.0), interrupt_if_getting_further_from_target: bool = True, engine_setting: EngineSetting = <EngineSetting.CLIMB: 2>, load_factor: float = 1.0, slope_angle: float = 0.0, upper_thrust_rate_limit: float = 1.0, lower_thrust_rate_limit: float = 0.0, thrust_rate_out_of_bound: str = 'limit', use_max_lift_drag_ratio: bool = False)[source]

Bases: 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.

compute_from_start_to_target(start: FlightPoint, target: FlightPoint) DataFrame[source]

Here should come the implementation for computing flight points between start and target flight points.

Parameters:
  • start

  • target – Definition of segment target

Returns:

a pandas DataFrame where column names match fields of FlightPoint

property target: FlightPoint

The base class of the class hierarchy.

When called, it accepts no arguments and returns a new featureless instance that has no instance attributes and cannot be given any.