fastoad.models.performances.mission.segments.time_step_base module
Base classes for time-step segments
- class fastoad.models.performances.mission.segments.time_step_base.AbstractTimeStepFlightSegment(name: str = '', target: ~fastoad.model_base.flight_point.FlightPoint = <object object>, isa_offset: float = 0.0, propulsion: ~fastoad.model_base.propulsion.IPropulsion = <object object>, polar: ~fastoad.models.performances.mission.polar.Polar = <object object>, polar_modifier: ~fastoad.models.performances.mission.polar_modifier.AbstractPolarModifier = <factory>, reference_area: float = <object object>, time_step: float = 0.2, maximum_CL: float = None, altitude_bounds: tuple = (-500.0, 40000.0), mach_bounds: tuple = (-1e-06, 5.0), interrupt_if_getting_further_from_target: bool = True, engine_setting: ~fastoad.constants.EngineSetting = EngineSetting.CLIMB)[source]
Bases:
AbstractFlightSegment,ABCBase class for time step computation flight segments.
This class implements the time computation. For this computation to work, subclasses must implement abstract methods
get_distance_to_target(),get_gamma_and_acceleration()andcompute_propulsion().compute_next_alpha()also has to be overloaded if angle of attack should be different of 0.- propulsion: IPropulsion = <object object>
A IPropulsion instance that will be called at each time step.
- polar_modifier: AbstractPolarModifier
- time_step: float = 0.2
Used time step for computation (actual time step can be lower at some particular times of the flight path).
- altitude_bounds: tuple = (-500.0, 40000.0)
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: tuple = (-1e-06, 5.0)
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.
- interrupt_if_getting_further_from_target: bool = True
If True, computation will be interrupted if a parameter stops getting closer to target between two iterations (which can mean the provided thrust rate is not adapted).
- engine_setting: EngineSetting = 2
The EngineSetting value associated to the segment. Can be used in the propulsion model.
- abstract get_distance_to_target(flight_points: List[FlightPoint], target: 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.
- Parameters:
flight_points – list of all currently computed flight_points
target – segment target (will not contain relative values)
- Returns:
if target is attained, a non-null value otherwise
- abstract compute_lift(flight_point: FlightPoint, reference_force: float, polar: Polar)[source]
Fills values for CL, and lift in provided flight_point.
- Parameters:
flight_point –
reference_force – CL = lift / reference_force
polar – unused here, but can be used when overloading this method
- abstract compute_propulsion(flight_point: FlightPoint)[source]
Computes propulsion data.
Provided flight point is modified in place.
Generally, this method should end with:
self.propulsion.compute_flight_points(flight_point)
- Parameters:
flight_point –
- abstract get_gamma_and_acceleration(flight_point: FlightPoint) Tuple[float, float][source]
Computes slope angle (gamma) and acceleration.
- Parameters:
flight_point – parameters after propulsion model has been called (i.e. mass, thrust and drag are available)
- Returns:
slope angle in radians and acceleration in m**2/s
- get_next_alpha(previous_point: FlightPoint, time_step: float) float[source]
Determine the next angle of attack.
- Parameters:
previous_point – the flight point from which next alpha is computed
time_step – the duration between computed flight point and previous_point
- complete_flight_point(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_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
- compute_next_flight_point(flight_points: List[FlightPoint], time_step: float) 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
- CONSTANT_VALUE = 'constant'
Using this value will tell to keep the associated parameter constant.
- 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.
- class fastoad.models.performances.mission.segments.time_step_base.AbstractManualThrustSegment(name: str = '', target: ~fastoad.model_base.flight_point.FlightPoint = <object object>, isa_offset: float = 0.0, propulsion: ~fastoad.model_base.propulsion.IPropulsion = <object object>, polar: ~fastoad.models.performances.mission.polar.Polar = <object object>, polar_modifier: ~fastoad.models.performances.mission.polar_modifier.AbstractPolarModifier = <factory>, reference_area: float = <object object>, time_step: float = 0.2, maximum_CL: float = None, altitude_bounds: tuple = (-500.0, 40000.0), mach_bounds: tuple = (-1e-06, 5.0), interrupt_if_getting_further_from_target: bool = True, engine_setting: ~fastoad.constants.EngineSetting = EngineSetting.CLIMB, thrust_rate: float = 1.0)[source]
Bases:
AbstractTimeStepFlightSegment,ABCBase 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.
- compute_propulsion(flight_point: FlightPoint)[source]
Computes propulsion data.
Provided flight point is modified in place.
Generally, this method should end with:
self.propulsion.compute_flight_points(flight_point)
- Parameters:
flight_point –
- CONSTANT_VALUE = 'constant'
Using this value will tell to keep the associated parameter constant.
- altitude_bounds: tuple = (-500.0, 40000.0)
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.
- 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
- compute_from_start_to_target(start: FlightPoint, target: FlightPoint) DataFrame
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
- abstract compute_lift(flight_point: FlightPoint, reference_force: float, polar: Polar)
Fills values for CL, and lift in provided flight_point.
- Parameters:
flight_point –
reference_force – CL = lift / reference_force
polar – unused here, but can be used when overloading this method
- compute_next_flight_point(flight_points: List[FlightPoint], time_step: float) FlightPoint
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
- 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
- engine_setting: EngineSetting = 2
The EngineSetting value associated to the segment. Can be used in the propulsion model.
- abstract get_distance_to_target(flight_points: List[FlightPoint], target: FlightPoint) float
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.
- Parameters:
flight_points – list of all currently computed flight_points
target – segment target (will not contain relative values)
- Returns:
if target is attained, a non-null value otherwise
- abstract get_gamma_and_acceleration(flight_point: FlightPoint) Tuple[float, float]
Computes slope angle (gamma) and acceleration.
- Parameters:
flight_point – parameters after propulsion model has been called (i.e. mass, thrust and drag are available)
- Returns:
slope angle in radians and acceleration in m**2/s
- get_next_alpha(previous_point: FlightPoint, time_step: float) float
Determine the next angle of attack.
- Parameters:
previous_point – the flight point from which next alpha is computed
time_step – the duration between computed flight point and previous_point
- interrupt_if_getting_further_from_target: bool = True
If True, computation will be interrupted if a parameter stops getting closer to target between two iterations (which can mean the provided thrust rate is not adapted).
- mach_bounds: tuple = (-1e-06, 5.0)
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.
- propulsion: IPropulsion = <object object>
A IPropulsion instance that will be called at each time step.
- 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.
- time_step: float = 0.2
Used time step for computation (actual time step can be lower at some particular times of the flight path).
- polar_modifier: AbstractPolarModifier
- class fastoad.models.performances.mission.segments.time_step_base.AbstractRegulatedThrustSegment(name: str = '', target: ~fastoad.model_base.flight_point.FlightPoint = <object object>, isa_offset: float = 0.0, propulsion: ~fastoad.model_base.propulsion.IPropulsion = <object object>, polar: ~fastoad.models.performances.mission.polar.Polar = <object object>, polar_modifier: ~fastoad.models.performances.mission.polar_modifier.AbstractPolarModifier = <factory>, reference_area: float = <object object>, time_step: float = 60.0, maximum_CL: float = None, altitude_bounds: tuple = (-500.0, 40000.0), mach_bounds: tuple = (-1e-06, 5.0), interrupt_if_getting_further_from_target: bool = True, engine_setting: ~fastoad.constants.EngineSetting = EngineSetting.CLIMB)[source]
Bases:
AbstractTimeStepFlightSegment,ABCBase class for computing flight segment where thrust rate is adjusted on drag.
- time_step: float = 60.0
Used time step for computation (actual time step can be lower at some particular times of the flight path).
- compute_propulsion(flight_point: FlightPoint)[source]
Computes propulsion data.
Provided flight point is modified in place.
Generally, this method should end with:
self.propulsion.compute_flight_points(flight_point)
- Parameters:
flight_point –
- get_gamma_and_acceleration(flight_point: FlightPoint) Tuple[float, float][source]
Computes slope angle (gamma) and acceleration.
- Parameters:
flight_point – parameters after propulsion model has been called (i.e. mass, thrust and drag are available)
- Returns:
slope angle in radians and acceleration in m**2/s
- CONSTANT_VALUE = 'constant'
Using this value will tell to keep the associated parameter constant.
- altitude_bounds: tuple = (-500.0, 40000.0)
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.
- 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
- compute_from_start_to_target(start: FlightPoint, target: FlightPoint) DataFrame
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
- abstract compute_lift(flight_point: FlightPoint, reference_force: float, polar: Polar)
Fills values for CL, and lift in provided flight_point.
- Parameters:
flight_point –
reference_force – CL = lift / reference_force
polar – unused here, but can be used when overloading this method
- compute_next_flight_point(flight_points: List[FlightPoint], time_step: float) FlightPoint
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
- 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
- engine_setting: EngineSetting = 2
The EngineSetting value associated to the segment. Can be used in the propulsion model.
- abstract get_distance_to_target(flight_points: List[FlightPoint], target: FlightPoint) float
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.
- Parameters:
flight_points – list of all currently computed flight_points
target – segment target (will not contain relative values)
- Returns:
if target is attained, a non-null value otherwise
- get_next_alpha(previous_point: FlightPoint, time_step: float) float
Determine the next angle of attack.
- Parameters:
previous_point – the flight point from which next alpha is computed
time_step – the duration between computed flight point and previous_point
- interrupt_if_getting_further_from_target: bool = True
If True, computation will be interrupted if a parameter stops getting closer to target between two iterations (which can mean the provided thrust rate is not adapted).
- mach_bounds: tuple = (-1e-06, 5.0)
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.
- propulsion: IPropulsion = <object object>
A IPropulsion instance that will be called at each time step.
- 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.
- polar_modifier: AbstractPolarModifier
- class fastoad.models.performances.mission.segments.time_step_base.AbstractFixedDurationSegment(name: str = '', target: ~fastoad.model_base.flight_point.FlightPoint = <object object>, isa_offset: float = 0.0, propulsion: ~fastoad.model_base.propulsion.IPropulsion = <object object>, polar: ~fastoad.models.performances.mission.polar.Polar = <object object>, polar_modifier: ~fastoad.models.performances.mission.polar_modifier.AbstractPolarModifier = <factory>, reference_area: float = <object object>, time_step: float = 60.0, maximum_CL: float = None, altitude_bounds: tuple = (-500.0, 40000.0), mach_bounds: tuple = (-1e-06, 5.0), interrupt_if_getting_further_from_target: bool = True, engine_setting: ~fastoad.constants.EngineSetting = EngineSetting.CLIMB)[source]
Bases:
AbstractTimeStepFlightSegment,ABCBase class for computing a fixed-duration segment.
- time_step: float = 60.0
Used time step for computation (actual time step can be lower at some particular times of the flight path).
- get_distance_to_target(flight_points: List[FlightPoint], target: 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.
- Parameters:
flight_points – list of all currently computed flight_points
target – segment target (will not contain relative values)
- Returns:
if target is attained, a non-null value otherwise
- CONSTANT_VALUE = 'constant'
Using this value will tell to keep the associated parameter constant.
- altitude_bounds: tuple = (-500.0, 40000.0)
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.
- 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
- compute_from_start_to_target(start: FlightPoint, target: FlightPoint) DataFrame
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
- abstract compute_lift(flight_point: FlightPoint, reference_force: float, polar: Polar)
Fills values for CL, and lift in provided flight_point.
- Parameters:
flight_point –
reference_force – CL = lift / reference_force
polar – unused here, but can be used when overloading this method
- compute_next_flight_point(flight_points: List[FlightPoint], time_step: float) FlightPoint
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
- abstract compute_propulsion(flight_point: FlightPoint)
Computes propulsion data.
Provided flight point is modified in place.
Generally, this method should end with:
self.propulsion.compute_flight_points(flight_point)
- Parameters:
flight_point –
- 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
- engine_setting: EngineSetting = 2
The EngineSetting value associated to the segment. Can be used in the propulsion model.
- abstract get_gamma_and_acceleration(flight_point: FlightPoint) Tuple[float, float]
Computes slope angle (gamma) and acceleration.
- Parameters:
flight_point – parameters after propulsion model has been called (i.e. mass, thrust and drag are available)
- Returns:
slope angle in radians and acceleration in m**2/s
- get_next_alpha(previous_point: FlightPoint, time_step: float) float
Determine the next angle of attack.
- Parameters:
previous_point – the flight point from which next alpha is computed
time_step – the duration between computed flight point and previous_point
- interrupt_if_getting_further_from_target: bool = True
If True, computation will be interrupted if a parameter stops getting closer to target between two iterations (which can mean the provided thrust rate is not adapted).
- mach_bounds: tuple = (-1e-06, 5.0)
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.
- propulsion: IPropulsion = <object object>
A IPropulsion instance that will be called at each time step.
- 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.
- polar_modifier: AbstractPolarModifier
- class fastoad.models.performances.mission.segments.time_step_base.AbstractLiftFromWeightSegment(name: str = '', target: ~fastoad.model_base.flight_point.FlightPoint = <object object>, isa_offset: float = 0.0, propulsion: ~fastoad.model_base.propulsion.IPropulsion = <object object>, polar: ~fastoad.models.performances.mission.polar.Polar = <object object>, polar_modifier: ~fastoad.models.performances.mission.polar_modifier.AbstractPolarModifier = <factory>, reference_area: float = <object object>, time_step: float = 0.2, maximum_CL: float = None, altitude_bounds: tuple = (-500.0, 40000.0), mach_bounds: tuple = (-1e-06, 5.0), interrupt_if_getting_further_from_target: bool = True, engine_setting: ~fastoad.constants.EngineSetting = EngineSetting.CLIMB, load_factor: float = 1.0)[source]
Bases:
AbstractTimeStepFlightSegment,ABCClass for computing segments where lift is computed from aircraft weight.
- compute_lift(flight_point: FlightPoint, reference_force: float, polar: Polar)[source]
Fills values for CL, and lift in provided flight_point.
- Parameters:
flight_point –
reference_force – CL = lift / reference_force
polar – unused here, but can be used when overloading this method
- CONSTANT_VALUE = 'constant'
Using this value will tell to keep the associated parameter constant.
- altitude_bounds: tuple = (-500.0, 40000.0)
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.
- 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
- compute_from_start_to_target(start: FlightPoint, target: FlightPoint) DataFrame
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
- compute_next_flight_point(flight_points: List[FlightPoint], time_step: float) FlightPoint
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
- abstract compute_propulsion(flight_point: FlightPoint)
Computes propulsion data.
Provided flight point is modified in place.
Generally, this method should end with:
self.propulsion.compute_flight_points(flight_point)
- Parameters:
flight_point –
- 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
- engine_setting: EngineSetting = 2
The EngineSetting value associated to the segment. Can be used in the propulsion model.
- abstract get_distance_to_target(flight_points: List[FlightPoint], target: FlightPoint) float
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.
- Parameters:
flight_points – list of all currently computed flight_points
target – segment target (will not contain relative values)
- Returns:
if target is attained, a non-null value otherwise
- abstract get_gamma_and_acceleration(flight_point: FlightPoint) Tuple[float, float]
Computes slope angle (gamma) and acceleration.
- Parameters:
flight_point – parameters after propulsion model has been called (i.e. mass, thrust and drag are available)
- Returns:
slope angle in radians and acceleration in m**2/s
- get_next_alpha(previous_point: FlightPoint, time_step: float) float
Determine the next angle of attack.
- Parameters:
previous_point – the flight point from which next alpha is computed
time_step – the duration between computed flight point and previous_point
- interrupt_if_getting_further_from_target: bool = True
If True, computation will be interrupted if a parameter stops getting closer to target between two iterations (which can mean the provided thrust rate is not adapted).
- mach_bounds: tuple = (-1e-06, 5.0)
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.
- propulsion: IPropulsion = <object object>
A IPropulsion instance that will be called at each time step.
- 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.
- time_step: float = 0.2
Used time step for computation (actual time step can be lower at some particular times of the flight path).
- polar_modifier: AbstractPolarModifier
- class fastoad.models.performances.mission.segments.time_step_base.AbstractLiftFromAoASegment(name: str = '', target: ~fastoad.model_base.flight_point.FlightPoint = <object object>, isa_offset: float = 0.0, propulsion: ~fastoad.model_base.propulsion.IPropulsion = <object object>, polar: ~fastoad.models.performances.mission.polar.Polar = <object object>, polar_modifier: ~fastoad.models.performances.mission.polar_modifier.AbstractPolarModifier = <factory>, reference_area: float = <object object>, time_step: float = 0.2, maximum_CL: float = None, altitude_bounds: tuple = (-500.0, 40000.0), mach_bounds: tuple = (-1e-06, 5.0), interrupt_if_getting_further_from_target: bool = True, engine_setting: ~fastoad.constants.EngineSetting = EngineSetting.CLIMB)[source]
Bases:
AbstractTimeStepFlightSegment,ABCClass for computing segments where lift is computed from aircraft angle of attack.
- compute_lift(flight_point: FlightPoint, reference_force: float, polar: Polar)[source]
Fills values for CL, and lift in provided flight_point.
- Parameters:
flight_point –
reference_force – CL = lift / reference_force
polar – unused here, but can be used when overloading this method
- CONSTANT_VALUE = 'constant'
Using this value will tell to keep the associated parameter constant.
- altitude_bounds: tuple = (-500.0, 40000.0)
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.
- 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
- compute_from_start_to_target(start: FlightPoint, target: FlightPoint) DataFrame
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
- compute_next_flight_point(flight_points: List[FlightPoint], time_step: float) FlightPoint
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
- abstract compute_propulsion(flight_point: FlightPoint)
Computes propulsion data.
Provided flight point is modified in place.
Generally, this method should end with:
self.propulsion.compute_flight_points(flight_point)
- Parameters:
flight_point –
- 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
- engine_setting: EngineSetting = 2
The EngineSetting value associated to the segment. Can be used in the propulsion model.
- abstract get_distance_to_target(flight_points: List[FlightPoint], target: FlightPoint) float
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.
- Parameters:
flight_points – list of all currently computed flight_points
target – segment target (will not contain relative values)
- Returns:
if target is attained, a non-null value otherwise
- abstract get_gamma_and_acceleration(flight_point: FlightPoint) Tuple[float, float]
Computes slope angle (gamma) and acceleration.
- Parameters:
flight_point – parameters after propulsion model has been called (i.e. mass, thrust and drag are available)
- Returns:
slope angle in radians and acceleration in m**2/s
- get_next_alpha(previous_point: FlightPoint, time_step: float) float
Determine the next angle of attack.
- Parameters:
previous_point – the flight point from which next alpha is computed
time_step – the duration between computed flight point and previous_point
- interrupt_if_getting_further_from_target: bool = True
If True, computation will be interrupted if a parameter stops getting closer to target between two iterations (which can mean the provided thrust rate is not adapted).
- mach_bounds: tuple = (-1e-06, 5.0)
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.
- propulsion: IPropulsion = <object object>
A IPropulsion instance that will be called at each time step.
- 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.
- time_step: float = 0.2
Used time step for computation (actual time step can be lower at some particular times of the flight path).
- polar_modifier: AbstractPolarModifier
- class fastoad.models.performances.mission.segments.time_step_base.AbstractTakeOffSegment(name: str = '', target: ~fastoad.model_base.flight_point.FlightPoint = <object object>, isa_offset: float = 0.0, propulsion: ~fastoad.model_base.propulsion.IPropulsion = <object object>, polar: ~fastoad.models.performances.mission.polar.Polar = <object object>, polar_modifier: ~fastoad.models.performances.mission.polar_modifier.AbstractPolarModifier = <factory>, reference_area: float = <object object>, time_step: float = 0.1, maximum_CL: float = None, altitude_bounds: tuple = (-500.0, 40000.0), mach_bounds: tuple = (-1e-06, 5.0), interrupt_if_getting_further_from_target: bool = True, engine_setting: ~fastoad.constants.EngineSetting = EngineSetting.CLIMB, thrust_rate: float = 1.0)[source]
Bases:
AbstractManualThrustSegment,AbstractLiftFromAoASegment,ABCClass for computing takeoff segment.
- time_step: float = 0.1
Used time step for computation (actual time step can be lower at some particular times of the flight path).
- 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
- get_gamma_and_acceleration(flight_point: FlightPoint)[source]
Redefinition : computes slope angle derivative (gamma_dot) and x-acceleration. Replaces CL, CD, lift dan drag values (for ground effect and accelerated flight)
- Parameters:
flight_point – parameters after propulsion model has been called (i.e. mass, thrust and drag are available)
- CONSTANT_VALUE = 'constant'
Using this value will tell to keep the associated parameter constant.
- altitude_bounds: tuple = (-500.0, 40000.0)
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.
- 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
- compute_lift(flight_point: FlightPoint, reference_force: float, polar: Polar)
Fills values for CL, and lift in provided flight_point.
- Parameters:
flight_point –
reference_force – CL = lift / reference_force
polar – unused here, but can be used when overloading this method
- compute_next_flight_point(flight_points: List[FlightPoint], time_step: float) FlightPoint
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
- compute_propulsion(flight_point: FlightPoint)
Computes propulsion data.
Provided flight point is modified in place.
Generally, this method should end with:
self.propulsion.compute_flight_points(flight_point)
- Parameters:
flight_point –
- 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
- engine_setting: EngineSetting = 2
The EngineSetting value associated to the segment. Can be used in the propulsion model.
- abstract get_distance_to_target(flight_points: List[FlightPoint], target: FlightPoint) float
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.
- Parameters:
flight_points – list of all currently computed flight_points
target – segment target (will not contain relative values)
- Returns:
if target is attained, a non-null value otherwise
- get_next_alpha(previous_point: FlightPoint, time_step: float) float
Determine the next angle of attack.
- Parameters:
previous_point – the flight point from which next alpha is computed
time_step – the duration between computed flight point and previous_point
- interrupt_if_getting_further_from_target: bool = True
If True, computation will be interrupted if a parameter stops getting closer to target between two iterations (which can mean the provided thrust rate is not adapted).
- mach_bounds: tuple = (-1e-06, 5.0)
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.
- propulsion: IPropulsion = <object object>
A IPropulsion instance that will be called at each time step.
- 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.
- polar_modifier: AbstractPolarModifier
- class fastoad.models.performances.mission.segments.time_step_base.AbstractGroundSegment(name: str = '', target: ~fastoad.model_base.flight_point.FlightPoint = <object object>, isa_offset: float = 0.0, propulsion: ~fastoad.model_base.propulsion.IPropulsion = <object object>, polar: ~fastoad.models.performances.mission.polar.Polar = <object object>, polar_modifier: ~fastoad.models.performances.mission.polar_modifier.AbstractPolarModifier = <factory>, reference_area: float = <object object>, time_step: float = 0.1, maximum_CL: float = None, altitude_bounds: tuple = (-500.0, 40000.0), mach_bounds: tuple = (-1e-06, 5.0), interrupt_if_getting_further_from_target: bool = True, engine_setting: ~fastoad.constants.EngineSetting = EngineSetting.CLIMB, thrust_rate: float = 1.0, wheels_friction: float = 0.03)[source]
Bases:
AbstractTakeOffSegment,ABCClass for computing accelerated segments on the ground with wheel friction.
- get_gamma_and_acceleration(flight_point: FlightPoint)[source]
For ground segment, gamma is assumed always 0 and wheel friction (with or without brake) is added to drag
- CONSTANT_VALUE = 'constant'
Using this value will tell to keep the associated parameter constant.
- altitude_bounds: tuple = (-500.0, 40000.0)
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.
- 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
- compute_from_start_to_target(start: FlightPoint, target: FlightPoint) DataFrame
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
- compute_lift(flight_point: FlightPoint, reference_force: float, polar: Polar)
Fills values for CL, and lift in provided flight_point.
- Parameters:
flight_point –
reference_force – CL = lift / reference_force
polar – unused here, but can be used when overloading this method
- compute_next_flight_point(flight_points: List[FlightPoint], time_step: float) FlightPoint
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
- compute_propulsion(flight_point: FlightPoint)
Computes propulsion data.
Provided flight point is modified in place.
Generally, this method should end with:
self.propulsion.compute_flight_points(flight_point)
- Parameters:
flight_point –
- 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
- engine_setting: EngineSetting = 2
The EngineSetting value associated to the segment. Can be used in the propulsion model.
- abstract get_distance_to_target(flight_points: List[FlightPoint], target: FlightPoint) float
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.
- Parameters:
flight_points – list of all currently computed flight_points
target – segment target (will not contain relative values)
- Returns:
if target is attained, a non-null value otherwise
- get_next_alpha(previous_point: FlightPoint, time_step: float) float
Determine the next angle of attack.
- Parameters:
previous_point – the flight point from which next alpha is computed
time_step – the duration between computed flight point and previous_point
- interrupt_if_getting_further_from_target: bool = True
If True, computation will be interrupted if a parameter stops getting closer to target between two iterations (which can mean the provided thrust rate is not adapted).
- mach_bounds: tuple = (-1e-06, 5.0)
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.
- propulsion: IPropulsion = <object object>
A IPropulsion instance that will be called at each time step.
- 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.
- time_step: float = 0.1
Used time step for computation (actual time step can be lower at some particular times of the flight path).
- polar_modifier: AbstractPolarModifier
- class fastoad.models.performances.mission.segments.time_step_base.FlightSegment(*args, **kwargs)[source]
Bases:
AbstractTimeStepFlightSegment,ABCBase class for time step computation flight segments.
This class implements the time computation. For this computation to work, subclasses must implement abstract methods
get_get_distance_to_target(),get_gamma_and_acceleration()andcompute_propulsion().- CONSTANT_VALUE = 'constant'
Using this value will tell to keep the associated parameter constant.
- altitude_bounds: tuple = (-500.0, 40000.0)
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.
- 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
- compute_from_start_to_target(start: FlightPoint, target: FlightPoint) DataFrame
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
- abstract compute_lift(flight_point: FlightPoint, reference_force: float, polar: Polar)
Fills values for CL, and lift in provided flight_point.
- Parameters:
flight_point –
reference_force – CL = lift / reference_force
polar – unused here, but can be used when overloading this method
- compute_next_flight_point(flight_points: List[FlightPoint], time_step: float) FlightPoint
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
- abstract compute_propulsion(flight_point: FlightPoint)
Computes propulsion data.
Provided flight point is modified in place.
Generally, this method should end with:
self.propulsion.compute_flight_points(flight_point)
- Parameters:
flight_point –
- 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
- engine_setting: EngineSetting = 2
The EngineSetting value associated to the segment. Can be used in the propulsion model.
- abstract get_distance_to_target(flight_points: List[FlightPoint], target: FlightPoint) float
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.
- Parameters:
flight_points – list of all currently computed flight_points
target – segment target (will not contain relative values)
- Returns:
if target is attained, a non-null value otherwise
- abstract get_gamma_and_acceleration(flight_point: FlightPoint) Tuple[float, float]
Computes slope angle (gamma) and acceleration.
- Parameters:
flight_point – parameters after propulsion model has been called (i.e. mass, thrust and drag are available)
- Returns:
slope angle in radians and acceleration in m**2/s
- get_next_alpha(previous_point: FlightPoint, time_step: float) float
Determine the next angle of attack.
- Parameters:
previous_point – the flight point from which next alpha is computed
time_step – the duration between computed flight point and previous_point
- interrupt_if_getting_further_from_target: bool = True
If True, computation will be interrupted if a parameter stops getting closer to target between two iterations (which can mean the provided thrust rate is not adapted).
- mach_bounds: tuple = (-1e-06, 5.0)
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.
- propulsion: IPropulsion = <object object>
A IPropulsion instance that will be called at each time step.
- 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.
- time_step: float = 0.2
Used time step for computation (actual time step can be lower at some particular times of the flight path).
- polar_modifier: AbstractPolarModifier