BoosterLandingSim is a physics-based simulator designed to model the vertical landing of a reusable launch vehicle first stage โ similar in principle to SpaceX's Falcon 9 booster return.
This project provides a realistic yet modular framework for testing descent profiles, optimizing engine burns, and understanding the physical constraints associated with powered descent and landing in planetary atmospheres.
With the emergence of reusable rockets, simulating the controlled descent and landing of booster stages has become an important area of research in aerospace engineering and orbital mechanics. This project aims to:
- Understand and model the forces acting on a descending rocket stage
- Explore different landing strategies
- Develop numerical tools for trajectory simulation and optimization
- Serve as a platform for educational or research projects
The simulation is based on a 2D vertical motion model (can be extended to 3D later) using Newtonian mechanics and includes the following forces:
The gravitational force is given by:
Where:
-
$m$ is the current mass of the booster -
$\vec{g}$ is the gravitational acceleration vector (pointing downwards)
Thrust is applied in the direction of the engine nozzle:
$$ \vec{F}T = T(t) \cdot \vec{u}{\text{thrust}} $$
Where:
-
$T(t)$ is the time-dependent thrust -
$\vec{u}_{\text{thrust}}$ is the thrust unit vector
Drag force is modeled using a quadratic drag law:
Where:
-
$\rho$ is the atmospheric density -
$v$ is the magnitude of the velocity vector -
$C_D$ is the drag coefficient -
$A$ is the cross-sectional area -
$\hat{v}$ is the unit vector in the direction of velocity
The system's equations of motion (assuming 1D vertical motion) are:
- Velocity evolution:
- Position evolution:
- Mass loss due to fuel consumption:
Where:
-
$I_{sp}$ is the specific impulse of the engine -
$g_0$ is the standard gravity
- Numerical integration of motion equations (e.g. Runge Kutta 4th order or adaptive step solvers)
- Configurable rocket parameters (mass, thrust profile, drag)
- Atmospheric models (constant or altitude-dependent density)
- Basic control laws for ignition timing and throttle
- Optional visualizations (e.g. Matplotlib plots, animation GIFs)
- Altitude vs. Time
- Velocity vs. Time
- Acceleration, Thrust, and Drag profiles
- Trajectory animation (GIF/MP4)
- Fuel mass vs. time
- 2D/3D simulation with lateral motion
- PID or machine learning-based guidance system
- Optimal control for fuel-efficient landings
- Terrain and landing pad modeling
- Falcon 9 or Starship parameter presets
git clone https://github.com/TristanVrg/BoosterLandingSim.git
cd BoosterLandingSim
pip install -r requirements.txt
python simulator.py