fastoad.models.performances.mission.base module
Base classes for mission computation.
- class fastoad.models.performances.mission.base.IFlightPart(name: str = '')[source]
Bases:
ABC
,BaseDataClass
Base class for all flight parts.
- target: FlightPoint
- abstract compute_from(start: FlightPoint) DataFrame [source]
Computes a flight sequence from 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 column names match fields of
FlightPoint
- class fastoad.models.performances.mission.base.FlightSequence(name: str = '', _target: FlightPoint = None)[source]
Bases:
IFlightPart
Defines and computes a flight sequence.
Use .extend() method to add a list of parts in the sequence.
- consumed_mass_before_input_weight: float = 0.0
Consumed mass between sequence start and target mass, if any defined
- compute_from(start: FlightPoint) DataFrame [source]
Computes a flight sequence from 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 column names match fields of
FlightPoint
- property target: FlightPoint | None
Target of the last element of current sequence.
- append(flight_part: IFlightPart)[source]
Append flight part to the end of the sequence.
- class fastoad.models.performances.mission.base.RegisterElement(keyword='')[source]
Bases:
object
Base class for decorators that can associate a class with a keyword.
When subclassing, the argument ‘base_class’ allow to specify a class that should be a parent of all registered classes. A specific check will be done at register time.
>>> class RegisterFeature(RegisterElement, base_class=AbstractFeature) >>> ...
Then the newly created class may be used as decorator like:
>>> @RegisterFeature("identifier_foo") >>> class FooFeature(AbstractFeature): >>> ...
Then the registered class can be obtained by:
>>> my_class = RegisterFeature.get_class("identifier_foo")
- classmethod get_class(keyword: str) type | None [source]
Provides the element implementation for provided name.
- Parameters:
keyword –
- Returns:
the element implementation
- Raises:
FastUnknownMissionElementError – if element has not been declared.