- Move RendezvousState and RendezvousTarget from rendezvous_types.h to orbital_objects.h
- Remove rendezvous_types.h entirely
- Simplify rendezvous.h to depend on orbital_objects.h
- Delete spacecraft.h and spacecraft.cpp (consolidated into orbital_objects.h)
- Update all include paths across codebase
- All tests pass (4 pre-existing failures unchanged)
- Add scheduled_dt field to Maneuver struct for precise timing
- Propagate spacecraft to exact trigger position before burn execution
- Handle 2π→0 wraparound in trigger crossing detection
- Add spacecraft tracking to prevent double-propagation in same frame
- Fix test configs and tolerances for new behavior
All 143 tests passing.
Added test cases that reveal the bug where periapsis burns execute
at apoapsis instead of periapsis after the first burn.
Changes:
- Modified tests/test_periapsis_burn.toml to include second spacecraft
(TestSatelliteCrossing) starting at true_anomaly = 1.57
- Replaced test "Prograde burn at periapsis raises apoapsis" with
"Two periapsis burns execute at same location" to verify sequential
periapsis burns one orbit apart both fire at correct location
- Added test "Periapsis burn fires when crossing periapsis" to verify burn
triggers when spacecraft crosses periapsis from 90 degrees
Both new tests fail as expected, confirming the bug exists in
cartesian_to_orbital_elements() where argument_of_periapsis is
calculated as π instead of 0 after a burn.
Test status: 4 periapsis tests fail (capturing bug)
Swap order in update_simulation() to check maneuvers before physics update.
This ensures triggers fire at the correct position instead of after the
spacecraft has moved past the trigger point.
Also fix test config to avoid interference between time-based and true
anomaly triggers.
Documents a bug where true anomaly triggers set to 0 (periapsis) don't
execute because the spacecraft moves past periapsis before the trigger
check happens. The trigger check occurs after physics propagation in the
simulation update order.
- test_periapsis_burn.cpp: Three test cases demonstrating expected behavior
1. Verify periapsis distance is preserved after prograde burn (fails - shows bug)
2. Verify apoapsis raises and periapsis stays same (skipped - depends on fix)
3. Verify burn location equals new periapsis (skipped - depends on fix)
- test_periapsis_burn.toml: Test configuration with elliptical orbit satellite
starting at periapsis with a true anomaly trigger at 0