Welcome to RocketPy’s code documentation!#
RocketPy’s code is fairly well documented. The code is structured into 5 main classes:
Function: a helper class to facilitate mathematical manipulation, interpolation and plotting of data resulting from experiments or simulation.
Environment: a class that takes care of atmospheric properties and other environment related variables pertinent to flight simulation.
SolidMotor: a class to model solid rocket motors and process them to be assigned to a rocket.
Rocket: a class that holds all properties related to a rocket, such as its inertia properties, motor, aerodynamic surfaces and parachutes.
Flight: the class that takes the rocket and the environment and actually perform the flight simulation, post-processing the results.
The following image shows how the four main classes interact with each other:
For details about each class, see below.
- Function Classes
Function
Function.set_inputs()
Function.set_outputs()
Function.set_source()
Function.min
Function.max
Function.set_interpolation()
Function.set_extrapolation()
Function.set_get_value_opt()
Function.set_discrete()
Function.set_discrete_based_on_model()
Function.reset()
Function.get_inputs()
Function.get_outputs()
Function.get_source()
Function.get_image_dim()
Function.get_domain_dim()
Function.get_interpolation_method()
Function.get_extrapolation_method()
Function.get_value()
Function.get_value_opt_deprecated()
Function.get_value_opt2()
Function.to_frequency_domain()
Function.plot()
Function.plot1D()
Function.plot2D()
Function.compare_plots()
Function.integral()
Function.differentiate()
Function.identityFunction()
Function.derivativeFunction()
Function.integral_function()
Function.isbijective()
Function.is_strictly_bijective()
Function.inverse_function()
Function.find_input()
Function.average()
Function.average_function()
Function.compose()
PiecewiseFunction
funcify_method()
reset_funcified_methods()
- Environment Class
Environment
Environment.Constants
Environment.earth_radius
Environment.air_gas_constant
Environment.Gravity
Environment.gravity
Environment.latitude
Environment.longitude
Environment.datum
Environment.initial_east
Environment.initial_north
Environment.initial_utm_zone
Environment.initial_utm_letter
Environment.initial_hemisphere
Environment.initial_ew
Environment.elevation
Environment.date
Environment.local_date
Environment.timezone
Environment.elev_lon_array
Environment.elev_lat_array
Environment.elev_array
Environment.topographic_profile_activated
Environment.max_expected_height
Environment.pressure_ISA
Environment.temperature_ISA
Environment.pressure
Environment.temperature
Environment.speed_of_sound
Environment.density
Environment.dynamic_viscosity
Environment.wind_speed
Environment.wind_direction
Environment.wind_heading
Environment.wind_velocity_x
Environment.wind_velocity_y
Environment.atmospheric_model_type
Environment.atmospheric_model_file
Environment.atmospheric_model_dict
Environment.atmospheric_model_init_date
Environment.atmospheric_model_end_date
Environment.atmospheric_model_interval
Environment.atmospheric_model_init_lat
Environment.atmospheric_model_end_lat
Environment.atmospheric_model_init_lon
Environment.atmospheric_model_end_lon
Environment.lat_array
Environment.lon_array
Environment.lon_index
Environment.lat_index
Environment.geopotentials
Environment.wind_us
Environment.wind_vs
Environment.levels
Environment.temperatures
Environment.time_array
Environment.height
Environment.level_ensemble
Environment.height_ensemble
Environment.temperature_ensemble
Environment.wind_u_ensemble
Environment.wind_v_ensemble
Environment.wind_heading_ensemble
Environment.wind_direction_ensemble
Environment.wind_speed_ensemble
Environment.num_ensemble_members
Environment.ensemble_member
Environment.set_date()
Environment.set_location()
Environment.set_gravity_model()
Environment.somigliana_gravity
Environment.set_elevation()
Environment.get_elevation_from_topographic_profile()
Environment.set_atmospheric_model()
Environment.process_standard_atmosphere()
Environment.process_custom_atmosphere()
Environment.process_windy_atmosphere()
Environment.process_wyoming_sounding()
Environment.process_noaaruc_sounding()
Environment.select_ensemble_member()
Environment.load_international_standard_atmosphere()
Environment.calculate_density_profile()
Environment.calculate_speed_of_sound_profile()
Environment.calculate_dynamic_viscosity()
Environment.add_wind_gust()
Environment.info()
Environment.all_info()
Environment.all_plot_info_returned()
Environment.all_info_returned()
Environment.export_environment()
Environment.set_earth_geometry()
Environment.geodesic_to_utm()
Environment.utm_to_geodesic()
Environment.calculate_earth_radius()
Environment.decimal_degrees_to_arc_seconds()
- Environment Analysis Class
EnvironmentAnalysis
EnvironmentAnalysis.original_pressure_level_data
EnvironmentAnalysis.pressure_level_lat0
EnvironmentAnalysis.pressure_level_lat1
EnvironmentAnalysis.pressure_level_lon0
EnvironmentAnalysis.pressure_level_lon1
EnvironmentAnalysis.original_surface_data
EnvironmentAnalysis.original_elevation
EnvironmentAnalysis.single_level_lat0
EnvironmentAnalysis.single_level_lat1
EnvironmentAnalysis.single_level_lon0
EnvironmentAnalysis.single_level_lon1
EnvironmentAnalysis.converted_pressure_level_data
EnvironmentAnalysis.converted_surface_data
EnvironmentAnalysis.process_data()
EnvironmentAnalysis.hours()
EnvironmentAnalysis.days
EnvironmentAnalysis.converted_elevation
EnvironmentAnalysis.cloud_base_height
EnvironmentAnalysis.pressure_at_surface_list
EnvironmentAnalysis.temperature_list
EnvironmentAnalysis.max_temperature_list
EnvironmentAnalysis.min_temperature_list
EnvironmentAnalysis.wind_gust_list
EnvironmentAnalysis.max_wind_gust_list
EnvironmentAnalysis.precipitation_per_day
EnvironmentAnalysis.surface_10m_wind_speed_list
EnvironmentAnalysis.max_surface_10m_wind_speed_list
EnvironmentAnalysis.min_surface_10m_wind_speed_list
EnvironmentAnalysis.surface_100m_wind_speed_list
EnvironmentAnalysis.max_surface_100m_wind_speed_list
EnvironmentAnalysis.min_surface_100m_wind_speed_list
EnvironmentAnalysis.record_max_surface_100m_wind_speed
EnvironmentAnalysis.record_min_surface_100m_wind_speed
EnvironmentAnalysis.record_min_cloud_base_height
EnvironmentAnalysis.record_max_temperature
EnvironmentAnalysis.record_min_temperature
EnvironmentAnalysis.record_max_wind_gust
EnvironmentAnalysis.record_max_surface_wind_speed
EnvironmentAnalysis.record_min_surface_wind_speed
EnvironmentAnalysis.record_max_surface_10m_wind_speed
EnvironmentAnalysis.record_min_surface_10m_wind_speed
EnvironmentAnalysis.average_surface_pressure
EnvironmentAnalysis.std_surface_pressure
EnvironmentAnalysis.average_cloud_base_height
EnvironmentAnalysis.average_max_temperature
EnvironmentAnalysis.average_min_temperature
EnvironmentAnalysis.average_max_wind_gust
EnvironmentAnalysis.average_max_surface_10m_wind_speed
EnvironmentAnalysis.average_min_surface_10m_wind_speed
EnvironmentAnalysis.average_max_surface_100m_wind_speed
EnvironmentAnalysis.average_min_surface_100m_wind_speed
EnvironmentAnalysis.percentage_of_days_with_no_cloud_coverage
EnvironmentAnalysis.percentage_of_days_with_precipitation
EnvironmentAnalysis.temperature_by_hour
EnvironmentAnalysis.average_temperature_by_hour
EnvironmentAnalysis.std_temperature_by_hour
EnvironmentAnalysis.surface_10m_wind_speed_by_hour
EnvironmentAnalysis.average_surface_10m_wind_speed_by_hour
EnvironmentAnalysis.std_surface_10m_wind_speed_by_hour
EnvironmentAnalysis.surface_100m_wind_speed_by_hour
EnvironmentAnalysis.average_surface_100m_wind_speed_by_hour
EnvironmentAnalysis.std_surface_100m_wind_speed_by_hour
EnvironmentAnalysis.surface_wind_speed_by_hour
EnvironmentAnalysis.surface_wind_direction_by_hour
EnvironmentAnalysis.altitude_AGL_range
EnvironmentAnalysis.altitude_list
EnvironmentAnalysis.pressure_at_1000ft_list
EnvironmentAnalysis.pressure_at_10000ft_list
EnvironmentAnalysis.pressure_at_30000ft_list
EnvironmentAnalysis.average_temperature_profile_by_hour
EnvironmentAnalysis.average_pressure_profile_by_hour
EnvironmentAnalysis.average_wind_speed_profile_by_hour
EnvironmentAnalysis.average_wind_velocity_x_profile_by_hour
EnvironmentAnalysis.average_wind_velocity_y_profile_by_hour
EnvironmentAnalysis.average_wind_heading_profile_by_hour
EnvironmentAnalysis.wind_speed_profiles_list
EnvironmentAnalysis.pressure_profiles_list
EnvironmentAnalysis.temperature_profiles_list
EnvironmentAnalysis.max_average_temperature_at_altitude
EnvironmentAnalysis.min_average_temperature_at_altitude
EnvironmentAnalysis.max_average_wind_speed_at_altitude
EnvironmentAnalysis.average_pressure_at_1000ft
EnvironmentAnalysis.std_pressure_at_1000ft
EnvironmentAnalysis.average_pressure_at_10000ft
EnvironmentAnalysis.std_pressure_at_10000ft
EnvironmentAnalysis.average_pressure_at_30000ft
EnvironmentAnalysis.std_pressure_at_30000ft
EnvironmentAnalysis.info()
EnvironmentAnalysis.all_info()
EnvironmentAnalysis.export_mean_profiles()
EnvironmentAnalysis.load()
EnvironmentAnalysis.save()
- Motor Classes
- SolidMotor Class
Motor.coordinate_system_orientation
Motor.nozzle_radius
Motor.nozzle_position
Motor.throat_radius
Motor.grain_number
Motor.grains_center_of_mass_position
Motor.grain_separation
Motor.grain_density
Motor.grain_outer_radius
Motor.grain_initial_inner_radius
Motor.grain_initial_height
Motor.grainInitialVolume
Motor.grain_inner_radius
Motor.grain_height
Motor.grainInitialMass
Motor.dry_mass
Motor.propellant_initial_mass
Motor.total_mass
Motor.propellant_mass
Motor.total_mass_flow_rate
Motor.center_of_mass
Motor.center_of_propellant_mass
Motor.I_11
Motor.I_22
Motor.I_33
Motor.I_12
Motor.I_13
Motor.I_23
Motor.propellant_I_11
Motor.propellant_I_22
Motor.propellant_I_33
Motor.propellant_I_12
Motor.propellant_I_13
Motor.propellant_I_23
Motor.thrust
Motor.total_impulse
Motor.max_thrust
Motor.max_thrust_time
Motor.average_thrust
Motor.burn_time
Motor.burn_start_time
Motor.burn_out_time
Motor.burn_duration
Motor.exhaust_velocity
Motor.burn_area
Motor.Kn
Motor.burn_rate
Motor.interpolate
- Fluid Class
- Tank and TankGeometry classes
- LiquidMotor Class
Motor.coordinate_system_orientation
Motor.nozzle_radius
Motor.nozzle_position
Motor.positioned_tanks
Motor.dry_mass
Motor.propellant_initial_mass
Motor.total_mass
Motor.propellant_mass
Motor.total_mass_flow_rate
Motor.center_of_mass
Motor.center_of_propellant_mass
Motor.I_11
Motor.I_22
Motor.I_33
Motor.I_12
Motor.I_13
Motor.I_23
Motor.propellant_I_11
Motor.propellant_I_22
Motor.propellant_I_33
Motor.propellant_I_12
Motor.propellant_I_13
Motor.propellant_I_23
Motor.thrust
Motor.total_impulse
Motor.max_thrust
Motor.max_thrust_time
Motor.average_thrust
Motor.burn_time
Motor.burn_start_time
Motor.burn_out_time
Motor.burn_duration
Motor.exhaust_velocity
- HybridMotor Class
Motor.coordinate_system_orientation
Motor.nozzle_radius
Motor.nozzle_position
Motor.throat_radius
Motor.solid
Motor.liquid
Motor.dry_mass
Motor.propellant_initial_mass
Motor.total_mass
Motor.propellant_mass
Motor.total_mass_flow_rate
Motor.center_of_mass
Motor.center_of_propellant_mass
Motor.I_11
Motor.I_22
Motor.I_33
Motor.I_12
Motor.I_13
Motor.I_23
Motor.propellant_I_11
Motor.propellant_I_22
Motor.propellant_I_33
Motor.propellant_I_12
Motor.propellant_I_13
Motor.propellant_I_23
Motor.thrust
Motor.total_impulse
Motor.max_thrust
Motor.max_thrust_time
Motor.average_thrust
Motor.burn_time
Motor.burn_start_time
Motor.burn_out_time
Motor.burn_duration
Motor.exhaust_velocity
Motor.burn_area
Motor.Kn
Motor.burn_rate
Motor.interpolate
- GenericMotor Class
- EmptyMotor Class
- SolidMotor Class
- AeroSurface Classes
- NoseCone Class
- TrapezoidalFins Class
Fins.n
Fins.rocket_radius
Fins.airfoil
Fins.cant_angle
Fins.changing_attribute_dict
Fins.cant_angle_rad
Fins.root_chord
Fins.tip_chord
Fins.span
Fins.name
Fins.sweep_length
Fins.sweep_angle
Fins.d
Fins.ref_area
Fins.Af
Fins.AR
Fins.gamma_c
Fins.Yma
Fins.roll_geometrical_constant
Fins.tau
Fins.lift_interference_factor
Fins.cp
Fins.cpx
Fins.cpy
Fins.cpz
Fins.cl
Fins.clalpha
- EllipticalFins Class
Fins.n
Fins.rocket_radius
Fins.airfoil
Fins.cant_angle
Fins.changing_attribute_dict
Fins.cant_angle_rad
Fins.root_chord
Fins.span
Fins.name
Fins.sweep_length
Fins.sweep_angle
Fins.d
Fins.ref_area
Fins.Af
Fins.AR
Fins.gamma_c
Fins.Yma
Fins.roll_geometrical_constant
Fins.tau
Fins.lift_interference_factor
Fins.cp
Fins.cpx
Fins.cpy
Fins.cpz
Fins.cl
Fins.clalpha
- Tail Class
- RailButtons Class
- Components Class
- Rocket Class
Rocket
Rocket.radius
Rocket.area
Rocket.center_of_dry_mass_position
Rocket.coordinate_system_orientation
Rocket.mass
Rocket.center_of_mass
Rocket.reduced_mass
Rocket.total_mass
Rocket.thrust_to_weight
Rocket.cp_eccentricity_x
Rocket.cp_eccentricity_y
Rocket.thrust_eccentricity_y
Rocket.thrust_eccentricity_x
Rocket.aerodynamic_surfaces
Rocket.cp_position
Rocket.static_margin
Rocket.power_off_drag
Rocket.power_on_drag
Rocket.rail_buttons
Rocket.motor
Rocket.motor_position
Rocket.center_of_propellant_position
Rocket.evaluate_total_mass()
Rocket.evaluate_dry_mass()
Rocket.evaluate_center_of_mass()
Rocket.evaluate_center_of_dry_mass()
Rocket.evaluate_reduced_mass()
Rocket.evaluate_thrust_to_weight()
Rocket.evaluate_static_margin()
Rocket.evaluate_dry_inertias()
Rocket.evaluate_inertias()
Rocket.add_motor()
Rocket.add_surfaces()
Rocket.add_tail()
Rocket.add_nose()
Rocket.add_fins()
Rocket.add_trapezoidal_fins()
Rocket.add_elliptical_fins()
Rocket.add_parachute()
Rocket.set_rail_buttons()
Rocket.add_cm_eccentricity()
Rocket.add_cp_eccentricity()
Rocket.add_thrust_eccentricity()
Rocket.info()
Rocket.all_info()
Rocket.add_fin()
- Parachute Class
Parachute
Parachute.name
Parachute.cd_s
Parachute.trigger
Parachute.sampling_rate
Parachute.lag
Parachute.noiseBias
Parachute.noiseDeviation
Parachute.noiseCorr
Parachute.noiseSignal
Parachute.noisyPressureSignal
Parachute.cleanPressureSignal
Parachute.noiseSignalFunction
Parachute.noisyPressureSignalFunction
Parachute.cleanPressureSignalFunction
- Flight Class
Flight
Flight.env
Flight.rocket
Flight.parachutes
Flight.frontal_surface_wind
Flight.lateral_surface_wind
Flight.FlightPhases
Flight.TimeNodes
Flight.time_iterator
Flight.rail_length
Flight.effective_1rl
Flight.effective2rl
Flight.name
Flight.udot_rail1()
Flight.udot_rail2()
Flight.u_dot()
Flight.u_dot_generalized()
Flight.u_dot_parachute()
Flight.solution_array
Flight.time
Flight.x
Flight.y
Flight.z
Flight.vx
Flight.vy
Flight.vz
Flight.e0
Flight.e1
Flight.e2
Flight.e3
Flight.w1
Flight.w2
Flight.w3
Flight.ax
Flight.ay
Flight.az
Flight.alpha1
Flight.alpha2
Flight.alpha3
Flight.R1
Flight.R2
Flight.R3
Flight.M1
Flight.M2
Flight.M3
Flight.pressure
Flight.density
Flight.dynamic_viscosity
Flight.speed_of_sound
Flight.wind_velocity_x
Flight.wind_velocity_y
Flight.speed
Flight.max_speed_time
Flight.max_speed
Flight.acceleration
Flight.max_acceleration
Flight.max_acceleration_time
Flight.horizontal_speed
Flight.path_angle
Flight.attitude_vector_x
Flight.attitude_vector_y
Flight.attitude_vector_z
Flight.attitude_angle
Flight.lateral_attitude_angle
Flight.psi
Flight.phi
Flight.theta
Flight.stream_velocity_x
Flight.stream_velocity_y
Flight.stream_velocity_z
Flight.free_stream_speed
Flight.apogee_freestream_speed
Flight.mach_number
Flight.max_mach_number_time
Flight.max_mach_number
Flight.reynolds_number
Flight.max_reynolds_number_time
Flight.max_reynolds_number
Flight.dynamic_pressure
Flight.max_dynamic_pressure_time
Flight.max_dynamic_pressure
Flight.max_total_pressure_time
Flight.max_total_pressure
Flight.aerodynamic_lift
Flight.aerodynamic_drag
Flight.aerodynamic_bending_moment
Flight.aerodynamic_spin_moment
Flight.translational_energy
Flight.kinetic_energy
Flight.potential_energy
Flight.total_energy
Flight.thrust_power
Flight.drag_power
Flight.angle_of_attack
Flight.omega1_frequency_response
Flight.omega2_frequency_response
Flight.omega3_frequency_response
Flight.attitude_frequency_response
Flight.static_margin
Flight.rail_button1_normal_force
Flight.rail_button1_shear_force
Flight.rail_button2_normal_force
Flight.rail_button2_shear_force
Flight.max_rail_button1_normal_force
Flight.max_rail_button1_shear_force
Flight.max_rail_button2_normal_force
Flight.max_rail_button2_shear_force
Flight.drift
Flight.bearing
Flight.latitude
Flight.longitude
Flight.retrieve_acceleration_arrays
Flight.retrieve_temporary_values_arrays
Flight.post_process()
Flight.info()
Flight.calculate_stall_wind_velocity()
Flight.export_pressures()
Flight.export_data()
Flight.export_kml()
Flight.all_info()
Flight.animate()
- Utils functions