- Move all configs from tests/configs/ to tests/
- Rename configs to match test filenames (test_NAME.toml)
- Remove unused configs (earth_mars_simple, simple_root_transition, interplanetary_transfer)
- Combine earth_circular and mars_circular into test_orbital_period.toml
- Duplicate earth_circular.toml as test_energy.toml
- Remove invalid parent test case from test_invalid_parent_assignment.cpp
- Update all test files to reference new config paths
- Delete tests/configs/ directory
Core Changes:
- Remove new_parent != -1 check in update_simulation()
- Add special handling for root body transitions (parent_index = -1)
- Bodies can now transition to/from Sun (root)
- Proper coordinate transformation for body->root and root->body transitions
Implementation:
- Old parent = -1: local = global (no transformation needed)
- New parent = -1: global = local (no transformation needed)
- find_dominant_body() already handles -1 returns correctly
Testing:
- Add test_root_body_transitions.cpp with 2 test cases
- Test 1: Earth to Sun transition (validates Sun involvement)
- Test 2: Round-trip Earth -> Sun -> Mars -> Sun (multi-leg)
- Create manual_root_transition.toml config
- All 6 assertions passing
Results:
✅ Satellites can transition to/from Sun
✅ Multi-leg transitions work (Earth→Sun→Mars→Sun)
✅ Root body transitions validated
✅ Tests pass for patched conics scenarios
Files Modified:
- src/simulation.cpp (root body transition handling)
Files Created:
- tests/test_root_body_transitions.cpp (2 test cases)
- tests/configs/manual_root_transition.toml
- tests/configs/simple_root_transition.toml
- tests/configs/interplanetary_transfer.toml
Phase 1 Status: COMPLETE ✅
Next: Phase 2 - Adaptive Hysteresis