fastoad.models.performances.mission.segments.registered.transition module
Class for very simple transition in some flight phases.
- class fastoad.models.performances.mission.segments.registered.transition.DummyTransitionSegment(name: str = '', target: ~fastoad.model_base.flight_point.FlightPoint = <object object>, isa_offset: float = 0.0, mass_ratio: float = 1.0, reserve_mass_ratio: float = 0.0, fuel_is_consumed: bool = True)[source]
Bases:
AbstractFlightSegmentComputes a transient flight part in a very quick and dummy way.
compute_from()will return only 2 or 3 flight points.The second flight point is the end of transition. Its parameters are equal to those provided in
target.There is an exception if target does not specify any mass (i.e. self.target.mass == 0). Then the mass of the second flight point is the start mass multiplied by
mass_ratio.If
reserve_mass_ratiois non-zero, a third flight point is added, with parameters equal to flight_point(2), except for mass where:mass(2) - reserve_mass_ratio * mass(3) = mass(3).
In different words, mass(3) would be the Zero Fuel Weight (ZFW) and reserve can be expressed as a percentage of ZFW.
- mass_ratio: float = 1.0
The ratio (aircraft mass at END of segment)/(aircraft mass at START of segment)
- reserve_mass_ratio: float = 0.0
The ratio (fuel mass)/(aircraft mass at END of segment) that will be consumed at end of segment.
- fuel_is_consumed: bool = True
If False, the mass variation during the segment is not considered as a fuel consumption. (True by default
- 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
- CONSTANT_VALUE = 'constant'
Using this value will tell to keep the associated parameter constant.
- complete_flight_point(flight_point: FlightPoint)
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
- static complete_flight_point_from(flight_point: FlightPoint, source: FlightPoint)
Sets undefined values in flight_point using the ones from source.
The particular case of speeds is taken into account: if at least one speed parameter is defined, all other speed parameters are considered defined, because they will be deduced when needed.
- Parameters:
flight_point –
source –
- compute_from(start: FlightPoint) DataFrame
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.
Important
When subclasssing, if you need to overload
compute_from(), you should consider overridingcompute_from_start_to_target()instead. Therefore, you will take benefit of the preprocessing of start and target flight points that is done incompute_from().- 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
- static consume_fuel(flight_point: FlightPoint, previous: FlightPoint, fuel_consumption: float = None, mass_ratio: float = None)
This method should be used whenever fuel consumption has to be stored.
It ensures that “mass” and “consumed_fuel” fields will be kept consistent.
Mass can be modified using the ‘fuel_consumption” argument, or the ‘mass_ratio’ argument. One of them should be provided.
- Parameters:
flight_point – the FlightPoint instance where “mass” and “consumed_fuel” fields will get new values
previous – FlightPoint instance that will be the base for the computation
fuel_consumption – consumed fuel, in kg, between ‘previous’ and ‘flight_point’. Positive when fuel is consumed.
mass_ratio – the ratio flight_point.mass/previous.mass
- 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.