vibe coding an orbital mechanics simulation to try out claude code
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cinnaboot
ce35c618d6
Implement maneuver planning system with config-based scheduled burns
Add maneuver planning and execution system to SimulationState:
**Data Structures:**
- Add TriggerType enum (TIME, TRUE_ANOMALY)
- Add Maneuver struct with burn parameters, trigger conditions, execution state
- Add maneuver array to SimulationState (maneuvers, maneuver_count, max_maneuvers)
- Update create_simulation() to accept max_maneuvers parameter
**Config File Format:**
- [[maneuvers]] sections with name, spacecraft_name, trigger_type, trigger_value, direction, delta_v
- Validate spacecraft_name exists and maneuver names are unique
- Parse trigger_type string -> enum
- Parse direction string -> BurnDirection enum
**Execution System:**
- check_maneuver_trigger() evaluates TIME and TRUE_ANOMALY conditions
- TIME trigger: sim->time >= trigger_value
- TRUE_ANOMALY trigger: calculate orbital true anomaly from position/velocity
- execute_maneuver() applies delta-v using apply_impulsive_burn()
- Maneuvers execute in update_simulation() after spacecraft physics
- Global coordinates computed AFTER maneuvers to preserve burn effects
**Test Coverage (5 tests, 26 assertions):**
- Maneuver loading from config
- Time-based trigger executes at correct time
- True anomaly trigger executes at correct angle
- Maneuvers only execute once
- Duplicate maneuver names fail config load
**API Changes:**
- create_simulation(int max_bodies, int max_craft, int max_maneuvers, double time_step)
- Updated all existing test files to use new signature
Test results: 5/5 maneuver tests passing
Documentation: docs/maneuver_planning_plan.md with full design specification
|
6 months ago |
| .. |
|
config_loader.cpp
|
Implement maneuver planning system with config-based scheduled burns
|
6 months ago |
|
config_loader.h
|
Refactor: Integrate spacecraft into SimulationState
|
6 months ago |
|
main.cpp
|
Implement maneuver planning system with config-based scheduled burns
|
6 months ago |
|
maneuver.cpp
|
Implement maneuver planning system with config-based scheduled burns
|
6 months ago |
|
maneuver.h
|
Implement maneuver planning system with config-based scheduled burns
|
6 months ago |
|
mission_planning_old.cpp
|
Add local frame spacecraft maneuvering interface
|
6 months ago |
|
mission_planning_old.h
|
Add local frame spacecraft maneuvering interface
|
6 months ago |
|
physics.cpp
|
Add local frame spacecraft maneuvering interface
|
6 months ago |
|
physics.h
|
Add local frame spacecraft maneuvering interface
|
6 months ago |
|
renderer.cpp
|
display local position and velocity for children of bodies
|
6 months ago |
|
renderer.h
|
Store and display config file name in simulation state
|
6 months ago |
|
simulation.cpp
|
Implement maneuver planning system with config-based scheduled burns
|
6 months ago |
|
simulation.h
|
Implement maneuver planning system with config-based scheduled burns
|
6 months ago |
|
spacecraft.cpp
|
Refactor: Integrate spacecraft into SimulationState
|
6 months ago |
|
spacecraft.h
|
Refactor: Integrate spacecraft into SimulationState
|
6 months ago |
|
test_utilities.cpp
|
Add moon orbit test suite and fix solar system config
|
6 months ago |
|
test_utilities.h
|
Add moon orbit test suite and fix solar system config
|
6 months ago |