A realistic CubeSat attitude and orbital control simulator built with Pygame, NumPy, and PID controllers. Features interactive 3D visualization, orbital mechanics simulation around multiple planets (Earth, Mars, Jupiter, etc.), live telemetry, attitude graphs, and PID-based stabilization.
Key Physics:
- Gravitational orbital dynamics (Newtonian gravity)
- PID attitude control (roll, pitch, yaw)
- Orbital thrust correction for stable circular orbits
(Add your screenshot/video here)
- Multi-Planet Support: Simulate around Earth, Mars, Jupiter, Venus, Saturn
- Real-time 3D CubeSat Visualization: Projected cube with rotation, orbital trail
- PID Controllers: Independent roll/pitch/yaw stabilization with configurable gains
- Orbital Mechanics: Gravity, thrust correction, orbit decay/escape detection
- Interactive GUI:
- Login screen (Demo: Username
Dinith, Password2002) - Live attitude graphs (Roll/Pitch/Yaw)
- Scrollable telemetry panels (position, velocity, attitude history)
- Off-attitude warning log
- Controls: Play/Pause/Stop/Reset, speed adjustment, keyboard disturbances
- Login screen (Demo: Username
- Auto-Stabilize: One-click recovery from unstable attitudes/orbits
- Responsive UI: Resizable window, planet details popups
- Python 3.10+
- Windows Users: Install Microsoft C++ Build Tools for Pygame
pip install pygame numpy simple-pidpython system.py- Login: Use
Dinith/2002 - Select Planet: "Change Planet" → Pick Earth/Mars/etc.
- Start Simulation: Click "Start/Resume"
- Controls:
Action Key/Button Disturb Attitude Arrow Keys Speed ± Slow/Fast buttons Stabilize "Auto-Stabilize" (when unstable) Toggle Panels History/Sat/Warnings - Monitor: Watch telemetry, graphs, warnings
- Pygame Install Fail (Windows): Install C++ Build Tools → Restart terminal → Retry
pip install pygame - Import Errors: See TODO.md for status
- Verify deps:
python -c "import pygame, numpy, simple_pid; print('OK')"
- Main file: system.py
- Edit PID gains in
AttitudeController/OrbitalController - Add planets to
PLANET_MODELS
See TODO.md for dependency fixes and enhancements.
Fork → PR with blackboxai/ branch prefix.
MIT License - see LICENSE (create if needed)
Author: Dinith (CubeSat Team)
Repo: DM-GITHUB/CubeSat