fastoad.models.performances.mission.segments.base module

Base classes for simulating flight segments.

class fastoad.models.performances.mission.segments.base.AbstractSegment(*, target: fastoad.base.flight_point.FlightPoint, propulsion: fastoad.models.propulsion.propulsion.IPropulsion, reference_area: float, polar: fastoad.models.performances.mission.polar.Polar, **kwargs)[source]

Bases: fastoad.models.performances.mission.base.IFlightPart, fastoad.base.dict.DynamicAttributeDict

Base class for flight path segment.

Behaviour can be modified using following instance attributes (can be set at instantiation using corresponding keyword arguments):

Variables
  • time_step – used time step for computation (actual time step can be lower at some particular times of the flight path).

  • engine_setting – the EngineSetting value associated to the segment. Can be used in the propulsion model.

  • altitude_bounds – minimum and maximum authorized altitude values. If computed altitude gets beyond these limits, computation will be interrupted and a warning message will be issued in logger.

  • mach_bounds – minimum and maximum authorized mach values. If computed Mach gets beyond these limits, computation will be interrupted and a warning message will be issued in logger.

  • maximum_mach – if defined, this maximum Mach number will be enforced at each time step, whatever the speed specifications.

  • name – the name of the current flight sequence.

Only keyword arguments are accepted.

Parameters
  • target – the target flight point, defined for any relevant parameter

  • propulsion – the propulsion model

  • reference_area – the reference area for aerodynamic forces

  • polar – the aerodynamic polar

property altitude_bounds
complete_flight_point(flight_point: fastoad.base.flight_point.FlightPoint)[source]

Computes data for provided flight point.

Assumes that it is already defined for time, altitude, mass, ground distance and speed (TAS, EAS, or Mach).

Parameters

flight_point – the flight point that will be completed in-place

compute_from(start: fastoad.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 are given by FlightPoint.labels

compute_next_flight_point(flight_points: List[fastoad.base.flight_point.FlightPoint], time_step: float)fastoad.base.flight_point.FlightPoint[source]

Computes time, altitude, speed, mass and ground distance of next flight point.

Parameters
  • flight_points – previous flight points

  • time_step – time step for computing next point

Returns

the computed next flight point

property engine_setting
classmethod get_attribute_keys()
Returns

list of attributes paired to dict key.

property mach_bounds
property maximum_mach
property name
property time_step
class fastoad.models.performances.mission.segments.base.FixedDurationSegment(*, target: fastoad.base.flight_point.FlightPoint, propulsion: fastoad.models.propulsion.propulsion.IPropulsion, reference_area: float, polar: fastoad.models.performances.mission.polar.Polar, **kwargs)[source]

Bases: fastoad.models.performances.mission.segments.base.AbstractSegment, abc.ABC

Class for computing phases where duration is fixed.

Target duration is provide as target.time. When using compute_from(), if start.time is not 0, end time will be start.time + target.time.

Only keyword arguments are accepted.

Parameters
  • target – the target flight point, defined for any relevant parameter

  • propulsion – the propulsion model

  • reference_area – the reference area for aerodynamic forces

  • polar – the aerodynamic polar

compute_from(start: fastoad.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 are given by FlightPoint.labels

class fastoad.models.performances.mission.segments.base.ManualThrustSegment(*, target: fastoad.base.flight_point.FlightPoint, propulsion: fastoad.models.propulsion.propulsion.IPropulsion, reference_area: float, polar: fastoad.models.performances.mission.polar.Polar, **kwargs)[source]

Bases: fastoad.models.performances.mission.segments.base.AbstractSegment, abc.ABC

Base class for computing flight segment where thrust rate is imposed.

Variables

thrust_rate – used thrust rate. Can be set at instantiation using a keyword argument.

Only keyword arguments are accepted.

Parameters
  • target – the target flight point, defined for any relevant parameter

  • propulsion – the propulsion model

  • reference_area – the reference area for aerodynamic forces

  • polar – the aerodynamic polar

classmethod get_attribute_keys()
Returns

list of attributes paired to dict key.

property thrust_rate
class fastoad.models.performances.mission.segments.base.RegulatedThrustSegment(*args, **kwargs)[source]

Bases: fastoad.models.performances.mission.segments.base.AbstractSegment, abc.ABC

Base class for computing flight segment where thrust rate is adjusted on drag.

Only keyword arguments are accepted.

Parameters
  • target – the target flight point, defined for any relevant parameter

  • propulsion – the propulsion model

  • reference_area – the reference area for aerodynamic forces

  • polar – the aerodynamic polar

classmethod get_attribute_keys()
Returns

list of attributes paired to dict key.

property time_step