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.
Contents:
- Function Classes
FunctionFunction.set_inputs()Function.set_outputs()Function.set_source()Function.minFunction.maxFunction.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()
PiecewiseFunctionfuncify_method()reset_funcified_methods()
- Environment Class
EnvironmentEnvironment.ConstantsEnvironment.earth_radiusEnvironment.air_gas_constantEnvironment.GravityEnvironment.gravityEnvironment.latitudeEnvironment.longitudeEnvironment.datumEnvironment.initial_eastEnvironment.initial_northEnvironment.initial_utm_zoneEnvironment.initial_utm_letterEnvironment.initial_hemisphereEnvironment.initial_ewEnvironment.elevationEnvironment.dateEnvironment.local_dateEnvironment.timezoneEnvironment.elev_lon_arrayEnvironment.elev_lat_arrayEnvironment.elev_arrayEnvironment.topographic_profile_activatedEnvironment.max_expected_heightEnvironment.pressure_ISAEnvironment.temperature_ISAEnvironment.pressureEnvironment.temperatureEnvironment.speed_of_soundEnvironment.densityEnvironment.dynamic_viscosityEnvironment.wind_speedEnvironment.wind_directionEnvironment.wind_headingEnvironment.wind_velocity_xEnvironment.wind_velocity_yEnvironment.atmospheric_model_typeEnvironment.atmospheric_model_fileEnvironment.atmospheric_model_dictEnvironment.atmospheric_model_init_dateEnvironment.atmospheric_model_end_dateEnvironment.atmospheric_model_intervalEnvironment.atmospheric_model_init_latEnvironment.atmospheric_model_end_latEnvironment.atmospheric_model_init_lonEnvironment.atmospheric_model_end_lonEnvironment.lat_arrayEnvironment.lon_arrayEnvironment.lon_indexEnvironment.lat_indexEnvironment.geopotentialsEnvironment.wind_usEnvironment.wind_vsEnvironment.levelsEnvironment.temperaturesEnvironment.time_arrayEnvironment.heightEnvironment.level_ensembleEnvironment.height_ensembleEnvironment.temperature_ensembleEnvironment.wind_u_ensembleEnvironment.wind_v_ensembleEnvironment.wind_heading_ensembleEnvironment.wind_direction_ensembleEnvironment.wind_speed_ensembleEnvironment.num_ensemble_membersEnvironment.ensemble_memberEnvironment.set_date()Environment.set_location()Environment.set_gravity_model()Environment.somigliana_gravityEnvironment.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
EnvironmentAnalysisEnvironmentAnalysis.original_pressure_level_dataEnvironmentAnalysis.pressure_level_lat0EnvironmentAnalysis.pressure_level_lat1EnvironmentAnalysis.pressure_level_lon0EnvironmentAnalysis.pressure_level_lon1EnvironmentAnalysis.original_surface_dataEnvironmentAnalysis.original_elevationEnvironmentAnalysis.single_level_lat0EnvironmentAnalysis.single_level_lat1EnvironmentAnalysis.single_level_lon0EnvironmentAnalysis.single_level_lon1EnvironmentAnalysis.converted_pressure_level_dataEnvironmentAnalysis.converted_surface_dataEnvironmentAnalysis.process_data()EnvironmentAnalysis.hours()EnvironmentAnalysis.daysEnvironmentAnalysis.converted_elevationEnvironmentAnalysis.cloud_base_heightEnvironmentAnalysis.pressure_at_surface_listEnvironmentAnalysis.temperature_listEnvironmentAnalysis.max_temperature_listEnvironmentAnalysis.min_temperature_listEnvironmentAnalysis.wind_gust_listEnvironmentAnalysis.max_wind_gust_listEnvironmentAnalysis.precipitation_per_dayEnvironmentAnalysis.surface_10m_wind_speed_listEnvironmentAnalysis.max_surface_10m_wind_speed_listEnvironmentAnalysis.min_surface_10m_wind_speed_listEnvironmentAnalysis.surface_100m_wind_speed_listEnvironmentAnalysis.max_surface_100m_wind_speed_listEnvironmentAnalysis.min_surface_100m_wind_speed_listEnvironmentAnalysis.record_max_surface_100m_wind_speedEnvironmentAnalysis.record_min_surface_100m_wind_speedEnvironmentAnalysis.record_min_cloud_base_heightEnvironmentAnalysis.record_max_temperatureEnvironmentAnalysis.record_min_temperatureEnvironmentAnalysis.record_max_wind_gustEnvironmentAnalysis.record_max_surface_wind_speedEnvironmentAnalysis.record_min_surface_wind_speedEnvironmentAnalysis.record_max_surface_10m_wind_speedEnvironmentAnalysis.record_min_surface_10m_wind_speedEnvironmentAnalysis.average_surface_pressureEnvironmentAnalysis.std_surface_pressureEnvironmentAnalysis.average_cloud_base_heightEnvironmentAnalysis.average_max_temperatureEnvironmentAnalysis.average_min_temperatureEnvironmentAnalysis.average_max_wind_gustEnvironmentAnalysis.average_max_surface_10m_wind_speedEnvironmentAnalysis.average_min_surface_10m_wind_speedEnvironmentAnalysis.average_max_surface_100m_wind_speedEnvironmentAnalysis.average_min_surface_100m_wind_speedEnvironmentAnalysis.percentage_of_days_with_no_cloud_coverageEnvironmentAnalysis.percentage_of_days_with_precipitationEnvironmentAnalysis.temperature_by_hourEnvironmentAnalysis.average_temperature_by_hourEnvironmentAnalysis.std_temperature_by_hourEnvironmentAnalysis.surface_10m_wind_speed_by_hourEnvironmentAnalysis.average_surface_10m_wind_speed_by_hourEnvironmentAnalysis.std_surface_10m_wind_speed_by_hourEnvironmentAnalysis.surface_100m_wind_speed_by_hourEnvironmentAnalysis.average_surface_100m_wind_speed_by_hourEnvironmentAnalysis.std_surface_100m_wind_speed_by_hourEnvironmentAnalysis.surface_wind_speed_by_hourEnvironmentAnalysis.surface_wind_direction_by_hourEnvironmentAnalysis.altitude_AGL_rangeEnvironmentAnalysis.altitude_listEnvironmentAnalysis.pressure_at_1000ft_listEnvironmentAnalysis.pressure_at_10000ft_listEnvironmentAnalysis.pressure_at_30000ft_listEnvironmentAnalysis.average_temperature_profile_by_hourEnvironmentAnalysis.average_pressure_profile_by_hourEnvironmentAnalysis.average_wind_speed_profile_by_hourEnvironmentAnalysis.average_wind_velocity_x_profile_by_hourEnvironmentAnalysis.average_wind_velocity_y_profile_by_hourEnvironmentAnalysis.average_wind_heading_profile_by_hourEnvironmentAnalysis.wind_speed_profiles_listEnvironmentAnalysis.pressure_profiles_listEnvironmentAnalysis.temperature_profiles_listEnvironmentAnalysis.max_average_temperature_at_altitudeEnvironmentAnalysis.min_average_temperature_at_altitudeEnvironmentAnalysis.max_average_wind_speed_at_altitudeEnvironmentAnalysis.average_pressure_at_1000ftEnvironmentAnalysis.std_pressure_at_1000ftEnvironmentAnalysis.average_pressure_at_10000ftEnvironmentAnalysis.std_pressure_at_10000ftEnvironmentAnalysis.average_pressure_at_30000ftEnvironmentAnalysis.std_pressure_at_30000ftEnvironmentAnalysis.info()EnvironmentAnalysis.all_info()EnvironmentAnalysis.export_mean_profiles()EnvironmentAnalysis.load()EnvironmentAnalysis.save()
- Motor Classes
- SolidMotor Class
Motor.coordinate_system_orientationMotor.nozzle_radiusMotor.nozzle_positionMotor.throat_radiusMotor.grain_numberMotor.grains_center_of_mass_positionMotor.grain_separationMotor.grain_densityMotor.grain_outer_radiusMotor.grain_initial_inner_radiusMotor.grain_initial_heightMotor.grainInitialVolumeMotor.grain_inner_radiusMotor.grain_heightMotor.grainInitialMassMotor.dry_massMotor.propellant_initial_massMotor.total_massMotor.propellant_massMotor.total_mass_flow_rateMotor.center_of_massMotor.center_of_propellant_massMotor.I_11Motor.I_22Motor.I_33Motor.I_12Motor.I_13Motor.I_23Motor.propellant_I_11Motor.propellant_I_22Motor.propellant_I_33Motor.propellant_I_12Motor.propellant_I_13Motor.propellant_I_23Motor.thrustMotor.total_impulseMotor.max_thrustMotor.max_thrust_timeMotor.average_thrustMotor.burn_timeMotor.burn_start_timeMotor.burn_out_timeMotor.burn_durationMotor.exhaust_velocityMotor.burn_areaMotor.KnMotor.burn_rateMotor.interpolate
- Fluid Class
- Tank and TankGeometry classes
- LiquidMotor Class
Motor.coordinate_system_orientationMotor.nozzle_radiusMotor.nozzle_positionMotor.positioned_tanksMotor.dry_massMotor.propellant_initial_massMotor.total_massMotor.propellant_massMotor.total_mass_flow_rateMotor.center_of_massMotor.center_of_propellant_massMotor.I_11Motor.I_22Motor.I_33Motor.I_12Motor.I_13Motor.I_23Motor.propellant_I_11Motor.propellant_I_22Motor.propellant_I_33Motor.propellant_I_12Motor.propellant_I_13Motor.propellant_I_23Motor.thrustMotor.total_impulseMotor.max_thrustMotor.max_thrust_timeMotor.average_thrustMotor.burn_timeMotor.burn_start_timeMotor.burn_out_timeMotor.burn_durationMotor.exhaust_velocity
- HybridMotor Class
Motor.coordinate_system_orientationMotor.nozzle_radiusMotor.nozzle_positionMotor.throat_radiusMotor.solidMotor.liquidMotor.dry_massMotor.propellant_initial_massMotor.total_massMotor.propellant_massMotor.total_mass_flow_rateMotor.center_of_massMotor.center_of_propellant_massMotor.I_11Motor.I_22Motor.I_33Motor.I_12Motor.I_13Motor.I_23Motor.propellant_I_11Motor.propellant_I_22Motor.propellant_I_33Motor.propellant_I_12Motor.propellant_I_13Motor.propellant_I_23Motor.thrustMotor.total_impulseMotor.max_thrustMotor.max_thrust_timeMotor.average_thrustMotor.burn_timeMotor.burn_start_timeMotor.burn_out_timeMotor.burn_durationMotor.exhaust_velocityMotor.burn_areaMotor.KnMotor.burn_rateMotor.interpolate
- GenericMotor Class
- EmptyMotor Class
- SolidMotor Class
- AeroSurface Classes
- NoseCone Class
- TrapezoidalFins Class
Fins.nFins.rocket_radiusFins.airfoilFins.cant_angleFins.changing_attribute_dictFins.cant_angle_radFins.root_chordFins.tip_chordFins.spanFins.nameFins.sweep_lengthFins.sweep_angleFins.dFins.ref_areaFins.AfFins.ARFins.gamma_cFins.YmaFins.roll_geometrical_constantFins.tauFins.lift_interference_factorFins.cpFins.cpxFins.cpyFins.cpzFins.clFins.clalpha
- EllipticalFins Class
Fins.nFins.rocket_radiusFins.airfoilFins.cant_angleFins.changing_attribute_dictFins.cant_angle_radFins.root_chordFins.spanFins.nameFins.sweep_lengthFins.sweep_angleFins.dFins.ref_areaFins.AfFins.ARFins.gamma_cFins.YmaFins.roll_geometrical_constantFins.tauFins.lift_interference_factorFins.cpFins.cpxFins.cpyFins.cpzFins.clFins.clalpha
- Tail Class
- RailButtons Class
- Components Class
- Rocket Class
RocketRocket.radiusRocket.areaRocket.center_of_dry_mass_positionRocket.coordinate_system_orientationRocket.massRocket.center_of_massRocket.reduced_massRocket.total_massRocket.thrust_to_weightRocket.cp_eccentricity_xRocket.cp_eccentricity_yRocket.thrust_eccentricity_yRocket.thrust_eccentricity_xRocket.aerodynamic_surfacesRocket.cp_positionRocket.static_marginRocket.power_off_dragRocket.power_on_dragRocket.rail_buttonsRocket.motorRocket.motor_positionRocket.center_of_propellant_positionRocket.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
ParachuteParachute.nameParachute.cd_sParachute.triggerParachute.sampling_rateParachute.lagParachute.noiseBiasParachute.noiseDeviationParachute.noiseCorrParachute.noiseSignalParachute.noisyPressureSignalParachute.cleanPressureSignalParachute.noiseSignalFunctionParachute.noisyPressureSignalFunctionParachute.cleanPressureSignalFunction
- Flight Class
FlightFlight.envFlight.rocketFlight.parachutesFlight.frontal_surface_windFlight.lateral_surface_windFlight.FlightPhasesFlight.TimeNodesFlight.time_iteratorFlight.rail_lengthFlight.effective_1rlFlight.effective2rlFlight.nameFlight.udot_rail1()Flight.udot_rail2()Flight.u_dot()Flight.u_dot_generalized()Flight.u_dot_parachute()Flight.solution_arrayFlight.timeFlight.xFlight.yFlight.zFlight.vxFlight.vyFlight.vzFlight.e0Flight.e1Flight.e2Flight.e3Flight.w1Flight.w2Flight.w3Flight.axFlight.ayFlight.azFlight.alpha1Flight.alpha2Flight.alpha3Flight.R1Flight.R2Flight.R3Flight.M1Flight.M2Flight.M3Flight.pressureFlight.densityFlight.dynamic_viscosityFlight.speed_of_soundFlight.wind_velocity_xFlight.wind_velocity_yFlight.speedFlight.max_speed_timeFlight.max_speedFlight.accelerationFlight.max_accelerationFlight.max_acceleration_timeFlight.horizontal_speedFlight.path_angleFlight.attitude_vector_xFlight.attitude_vector_yFlight.attitude_vector_zFlight.attitude_angleFlight.lateral_attitude_angleFlight.psiFlight.phiFlight.thetaFlight.stream_velocity_xFlight.stream_velocity_yFlight.stream_velocity_zFlight.free_stream_speedFlight.apogee_freestream_speedFlight.mach_numberFlight.max_mach_number_timeFlight.max_mach_numberFlight.reynolds_numberFlight.max_reynolds_number_timeFlight.max_reynolds_numberFlight.dynamic_pressureFlight.max_dynamic_pressure_timeFlight.max_dynamic_pressureFlight.max_total_pressure_timeFlight.max_total_pressureFlight.aerodynamic_liftFlight.aerodynamic_dragFlight.aerodynamic_bending_momentFlight.aerodynamic_spin_momentFlight.translational_energyFlight.kinetic_energyFlight.potential_energyFlight.total_energyFlight.thrust_powerFlight.drag_powerFlight.angle_of_attackFlight.omega1_frequency_responseFlight.omega2_frequency_responseFlight.omega3_frequency_responseFlight.attitude_frequency_responseFlight.static_marginFlight.rail_button1_normal_forceFlight.rail_button1_shear_forceFlight.rail_button2_normal_forceFlight.rail_button2_shear_forceFlight.max_rail_button1_normal_forceFlight.max_rail_button1_shear_forceFlight.max_rail_button2_normal_forceFlight.max_rail_button2_shear_forceFlight.driftFlight.bearingFlight.latitudeFlight.longitudeFlight.retrieve_acceleration_arraysFlight.retrieve_temporary_values_arraysFlight.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