This project simulates the angle control of a rocket using a simple PID (Proportional-Derivative) controller. The simulation models how the rocket's angle changes over time in response to thrust and gimbal adjustments, and visualizes the results using plots.
- Models a rocket's angular motion based on physics equations.
- Uses a basic PID controller to adjust the gimbal angle and keep the rocket at the desired orientation.
- Plots the rocket's angle and gimbal angle over time for visualization.
- Python 3.x
- matplotlib
- Clone or download this repository.
- Create and activate a virtual environment (recommended):
python3 -m venv venv source venv/bin/activate - Install dependencies:
pip install -r requirements.txt
- Run the simulation:
python main.py
A plot window will appear showing the rocket's angle and the gimbal angle over time.
Feel free to modify the parameters in main.py to experiment with different rocket behaviors or controller settings!