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 |
| .. |
|
earth_circular.toml
|
Migrate config system from space-separated to TOML format
|
6 months ago |
|
earth_mars_simple.toml
|
removed unused velocity from test config
|
6 months ago |
|
hyperbolic_comet.toml
|
Add hyperbolic orbit test case and configuration
|
6 months ago |
|
interplanetary_transfer.toml
|
Phase 1: Enable root body transitions for patched conics
|
6 months ago |
|
maneuver_sequence.toml
|
Implement maneuver planning system with config-based scheduled burns
|
6 months ago |
|
manual_root_transition.toml
|
Phase 1: Enable root body transitions for patched conics
|
6 months ago |
|
mars_circular.toml
|
Migrate config system from space-separated to TOML format
|
6 months ago |
|
mutual_soi_close.toml
|
Add test suite for invalid parent assignment bugs
|
6 months ago |
|
parabolic_comet.toml
|
Add parabolic orbit support and test case
|
6 months ago |
|
simple_root_transition.toml
|
Phase 1: Enable root body transitions for patched conics
|
6 months ago |
|
soi_transition.toml
|
Add simplified SOI transition test case
|
6 months ago |
|
solar_system.toml
|
Fix Titan moon orbital stability
|
6 months ago |
|
spacecraft_test.toml
|
Add local frame spacecraft maneuvering interface
|
6 months ago |