RocketPy is a next-generation trajectory simulation solution for High-Power Rocketry. It provides a comprehensive 6-Degrees-of-Freedom (6-DOF) simulation environment, accounting for variable mass effects, sophisticated atmospheric modeling, and aerodynamic interactions.
RocketPy is designed around a modular, object-oriented architecture where physical components are represented by discrete Python classes. These objects are composed into a simulation pipeline that mimics the physical assembly and launch of a rocket.
The standard workflow involves the sequential instantiation and nesting of four primary classes:
The following diagram illustrates how code entities relate to the physical simulation concepts.
Simulation Entity Mapping
Sources: README.md23-66, rocketpy/simulation/flight.py42-63, rocketpy/rocket/rocket.py36-55
LSODA integrator README.md30-34, rocketpy/simulation/flight.py30-37.SolidMotor, LiquidMotor, and HybridMotor, including variable density fluids and complex tank geometries README.md48-51, CHANGELOG.md97-98.This diagram maps specific subsystems to their primary implementation files and classes within the rocketpy/ directory.
Subsystem Code Map
Sources: rocketpy/mathutils/function.py54-150, rocketpy/simulation/flight.py42-170, rocketpy/rocket/rocket.py36-150
To explore specific parts of the codebase in detail, refer to the following sections:
Covers the installation process via pip or conda, dependency management (core, env-analysis, monte-carlo) in pyproject.toml, and running your first simulation.
Provides a technical breakdown of the data flow between Environment, Motor, Rocket, and Flight. Explains how the 6-DOF equations are initialized and solved, including the management of flight phases and time nodes.
Function class rocketpy/mathutils/function.py54-150 is the backbone of the library, providing advanced interpolation (Akima, Spline, RBF) and algebraic operator overloading.NoseCone, Fins, Tail, and AirBrakes using Barrowman or custom lift/drag curves rocketpy/rocket/rocket.py15-26.MonteCarlo and confidence interval estimation CHANGELOG.md64-65.Sources: README.md23-86 rocketpy/simulation/flight.py30-170 rocketpy/rocket/rocket.py36-150 rocketpy/mathutils/function.py54-150 pyproject.toml1-71 CHANGELOG.md53-106 docs/user/installation.rst1-160