fastoad.models.performances.mission.base module
Base classes for mission computation.
- class fastoad.models.performances.mission.base.IFlightPart(name: str = '')[source]
Bases:
abc.ABC
,fastoad.model_base.datacls.BaseDataClass
Base class for all flight parts.
- abstract compute_from(start: fastoad.model_base.flight_point.FlightPoint) pandas.core.frame.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: Optional[fastoad.model_base.flight_point.FlightPoint] = None)[source]
Bases:
fastoad.models.performances.mission.base.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
- part_flight_points: List[pandas.core.frame.DataFrame]
- compute_from(start: fastoad.model_base.flight_point.FlightPoint) pandas.core.frame.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: Optional[fastoad.model_base.flight_point.FlightPoint]
Target of the last element of current sequence.
- append(flight_part: fastoad.models.performances.mission.base.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) Optional[type] [source]
Provides the element implementation for provided name.
- Parameters
keyword –
- Returns
the element implementation
- Raises
FastUnknownMissionElementError – if element has not been declared.