A physics-based orbital mechanics simulation featuring satellite collision detection, debris generation, and user-controlled spacecraft.
This simulation models various satellites and spacecraft in Earth orbit, including GPS constellations, the Hubble Space Telescope, Dragon spacecraft, Starlink satellites, and the historic Sputnik. Players control a Dreamchaser spacecraft to interact with these objects in a realistic orbital environment with gravitational physics.
- GPS Constellation: 6-satellite constellation with realistic orbital parameters
- Hubble Space Telescope: Space telescope with specialized destruction mechanics
- Dragon Spacecraft: SpaceX crew vehicle with modular design
- Starlink Satellites: Modern satellite constellation
- Sputnik: Historic satellite with simple destruction pattern
- Dreamchaser: User-controlled spacecraft with thrust and rotation capabilities
- Realistic gravitational simulation using Earth's gravity model
- 2-step numerical integration for accurate orbital mechanics
- Collision detection with pixel-to-meter conversion (128,000 meters per pixel)
- Debris fragment generation with realistic velocity kicks
Each satellite type has unique destruction patterns:
- GPS: Creates 5 components (center, left, right, 2 fragments)
- Hubble: Breaks into 4 specialized parts (telescope, computer, left, right)
- Dragon: 3-part breakdown (center, left, right) plus fragments
- Starlink: 2-part breakdown (body, array)
- Sputnik: Simple 4-fragment destruction
- Down Arrow: Apply thrust in current direction
- Left Arrow: Rotate counterclockwise
- Right Arrow: Rotate clockwise
- Spacebar: Fire projectiles
Satellite: Abstract base class for all space objectsFragment: Debris pieces created from destroyed satellitesProjectile: High-velocity objects with limited lifetime (70 frames)
- Earth radius: 6,378,000 meters
- Earth gravity: 9.80665 m/s²
- Time step: 48.0 time units
The project includes comprehensive unit tests for all components:
- Satellite Tests: Individual satellite behavior and destruction
- Physics Tests: Movement, gravity, and collision detection
- Component Tests: Position, velocity, angle, and acceleration classes
Run tests using the included test framework that inherits from UnitTest base class.
This is a Visual Studio C++ project configured with OpenGL dependencies.
- Visual Studio with C++ support
- OpenGL libraries (included via NuGet packages)
- Windows environment
- Open
Lab07.vcxprojin Visual Studio - Restore NuGet packages
- Build and run the project
Roger Galan & Jessen Forbush
This simulation demonstrates realistic orbital mechanics with educational value for understanding satellite behavior, collision dynamics, and space debris generation. The physics engine uses accurate gravitational calculations and provides a foundation for studying orbital mechanics concepts. The comprehensive test suite ensures reliability of all physics calculations and entity behaviors.
Build > Configuration Manager > Release
Build > Build Solution
Open Inno Setup program.
Create new setup script with wizard
point to the exe file in x64/Release
include Release folder just in case
Run setup script.
Add setup compiler.exe to Github Release