Stochastic Flight#

class rocketpy.stochastic.StochasticFlight[source]#

A Stochastic Flight class that inherits from StochasticModel.

See also

Stochastic Model

Variables:
  • flight (Flight) – The Flight object to be used as a base for the Stochastic flight.

  • rail_length (int, float, tuple, list) – The rail length of the flight.

  • inclination (int, float, tuple, list) – The inclination of the launch rail.

  • heading (int, float, tuple, list) – The heading of the launch rail.

  • initial_solution (tuple, list) – The initial solution of the flight. This is a tuple of 14 elements that represent the initial conditions of the flight. This attribute can not be randomized.

  • terminate_on_apogee (bool) – Whether or not the flight should terminate on apogee. This attribute can not be randomized.

  • time_overshoot (bool) – If False, the simulation will run at the time step defined by the controller sampling rate. Be aware that this will make the simulation run much slower.

__init__(flight, rail_length=None, inclination=None, heading=None, initial_solution=None, terminate_on_apogee=None, time_overshoot=None)[source]#

Initializes the Stochastic Flight class.

See also

Stochastic Model

Parameters:
  • flight (Flight) – The Flight object to be used as a base for the Stochastic flight.

  • rail_length (int, float, tuple, list, optional) – The rail length of the flight.

  • inclination (int, float, tuple, list, optional) – The inclination of the launch rail.

  • heading (int, float, tuple, list, optional) – The heading of the launch rail.

  • initial_solution (tuple, list, optional) – The initial solution of the flight. This is a tuple of 14 elements that represent the initial conditions of the flight. This attribute can not be randomized.

  • terminate_on_apogee (bool, optional) – Whether or not the flight should terminate on apogee. This attribute can not be randomized.

  • time_overshoot (bool) – If False, the simulation will run at the time step defined by the controller sampling rate. Be aware that this will make the simulation run much slower.

_randomize_rail_length()[source]#

Randomizes the rail length of the flight.

_randomize_inclination()[source]#

Randomizes the inclination of the flight.

_randomize_heading()[source]#

Randomizes the heading of the flight.

create_object()[source]#

Creates and returns a Flight object from the randomly generated input arguments.

Returns:

flight – Flight object with the randomly generated input arguments.

Return type:

Flight