Skip to content

Repository files navigation

English · 中文 · Polski · Español · 日本語 · 한국어 · Русский · Français · Deutsch

Rocket Landing & Flight Dynamics Simulator

This project is a high-fidelity 2D/3D flight simulation environment for a heavy-lift rocket inspired by modern reusable launch vehicles.
At its core, it features a custom rigid-body physics engine with fluid-structure interaction (FSI) to model fuel slosh and variable mass distribution during flight.

The simulator implements full 6-DOF rocket dynamics, including thrust vector control (TVC) and quaternion-based orientation to ensure stable rotational behavior.

A built-in telemetry and visualization system provides real-time observation of the rocket’s trajectory, orientation, fuel levels, and gimbal states through 3D and 2D schematic views.

The project is designed as a physically consistent simulation environment specifically built for developing, testing, and benchmarking new control algorithms, with a particular focus on Guidance, Navigation, and Control (GNC) research and experimentation. It is also well suited as an environment for training machine learning (ML) and reinforcement learning (RL) models.

Rocket Control Dashboard

Rocket Plant architecture

The simulation architecture is modular, separating the vehicle's physical components into specialized subsystems linked through physical feedback loops.

rocket_plant

Functional Blocks

  • Propulsion Dynamics: Processes gimbal orientation ($\mathbf{u}_{\delta}$) and thrust magnitude ($\mathbf{u}_{T}$) into thrust forces $\mathbf{F}_{thr}$ and moments $\mathbf{M}_{thr}$, accounting for TVC actuator response. The model distinguishes between thrust generated by gimbaled engines (used for active Thrust Vector Control) and thrust from static engines.

  • Grid Fin Dynamics: Models the steering response of the fins. It converts deflection angles ($\mathbf{u}_{\sigma}$) into aerodynamic control moments $\mathbf{M}_{aero}$ based on the current flight state and local air density $\rho(h)$ as a function of altitude.

  • Body Aero & Damping: Calculates passive airframe forces (drag, lift) and rotational damping. It outputs $\mathbf{F}_{drag}$ and $\mathbf{M}_{damp}$ as functions of velocity, angular rate, and altitude-dependent air density.

  • Coupled Slosh Dynamics: Models the impact of moving fuel inside tanks. Based on the rocket’s state and accelerations, it dynamically updates total mass $m(t)$, CoG position $\mathbf{r}_{CoG}$, and the inertia tensor $\mathbf{I}$, while generating slosh-induced forces and moments.

  • Dynamics (6-DOF): The core solver for rigid-body equations of motion. It sums all forces ($\sum \mathbf{F}$) and moments ($\sum \mathbf{M}$) to calculate linear acceleration $\mathbf{a}$ and angular acceleration $\boldsymbol{\alpha}$ using Euler's equations.

  • Kinematics: Handles state vector integration. It integrates accelerations into velocity and position, and updates orientation $\mathbf{q}$ using quaternions to prevent gimbal lock.

State Vector Definition

The state vector $\mathbf{x}$ provided as the plant output for the feedback loop is defined as:

$$\mathbf{x} = [ \mathbf{p}, \mathbf{v}, \mathbf{q}, \boldsymbol{\omega} ]^T \in \mathbb{R}^{13}$$

Where:

  • $\mathbf{p} = [x, y, z]^T$: Linear position in the (World Frame).
  • $\mathbf{v} = [v_x, v_y, v_z]^T$: Linear velocity in the (World Frame).
  • $\mathbf{q} = [q_w, q_x, q_y, q_z]^T$: Orientation quaternion (World-to-Body transformation).
  • $\boldsymbol{\omega} = [\omega_x, \omega_y, \omega_z]^T$: Angular velocity in the Body Frame.

Simple Start

Install the dependencies and the package from pyproject.toml:

pip install -e .

Alternatively, install the dependencies directly:

pip install pygame numpy matplotlib

Run the simulation:

python -m src.rocket_control.mission.simulation

Citation

If this repository has helped you during your research, feel free to cite it:

APA Style

Brzustowicz, S. (2026). Rocket-Control: High-fidelity rocket landing & flight dynamics simulator (Version 1.0.0) [Source code]. https://github.com/sebastianbrzustowicz/Rocket-Control

BibTeX

@software{brzustowicz_rocket_control_2026,
  author = {Sebastian Brzustowicz},
  title = {Rocket-Control: High-fidelity rocket landing & flight dynamics simulator},
  url = {https://github.com/sebastianbrzustowicz/Rocket-Control},
  version = {1.0.0},
  year = {2026}
}

Tip

You can also use the "Cite this repository" button in the sidebar to automatically copy these citations or download the raw metadata file.

License

Rocket-Control Source-Available License (No AI Use).
See the LICENSE file for full terms and restrictions.

Author

Sebastian Brzustowicz <Se.Brzustowicz@gmail.com>

About

Python. High-fidelity simulation environment for rocket flight dynamics and control - ideal for ML/RL training and GNC research.

Topics

Resources

Contributing

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages