fastoad.models.performances.mission.segments.speed_change module

Classes for acceleration/deceleration segments.

class fastoad.models.performances.mission.segments.speed_change.SpeedChangeSegment(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 = 0.2, 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, thrust_rate: float = 1.0)[source]

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

Computes a flight path segment where speed is modified with no change in altitude.

The target must define a speed value among true_airspeed, equivalent_airspeed and mach.

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.


flight_points – list of all currently computed flight_points


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

get_gamma_and_acceleration(flight_point: fastoad.model_base.flight_point.FlightPoint) Tuple[float, float][source]

Computes slope angle (gamma) and acceleration.


flight_point – parameters after propulsion model has been called (i.e. mass, thrust and drag are available)


slope angle in radians and acceleration in m**2/s

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.