Add BurnResult dataclass to sim_engine.py (matches C++ struct).
Update update_spacecraft() to capture pre-burn state vectors before
applying delta-v, matching C++ BurnResult behavior.
Update precalc_periapsis_burn.py to output burn_result values
(pre-burn position, velocity, true_anomaly) for each burn event.
Verification: Python and C++ agree to within ~50 microns floating-point noise.
Add BurnResult struct (position, velocity, true_anomaly) to Maneuver.
Capture pre-burn state in update_spacecraft_physics() before applying
delta-v, enabling tests to assert exact burn-time periapsis location
and true anomaly with tight tolerances (R_TOL, ANG_TOL) instead of
propagation-level tolerances inflated by post-burn state drift.
Refactor test_periapsis_burn.cpp to use burn_result:
- Burn radius now asserts exactly at periapsis (R_TOL)
- True anomaly now asserts exactly 0 (ANG_TOL)
- Both sequential burns confirmed at same periapsis location
- 822 assertions passing (up from 813)
Phase A: Extend sim_engine.py with maneuver trigger detection
- Add TriggerType enum, Maneuver dataclass
- Implement check_maneuver_trigger() matching C++ sub-step logic
- Integrate maneuver execution into update_spacecraft()
- Add maneuvers_from_config() for TOML parsing
- Create precalc_periapsis_burn.py for expected value generation
Phase B: Refactor test_periapsis_burn.cpp
- Merge 4 TEST_CASEs into 1 SCENARIO with 5 SECTIONs
- Shared fixture setup in SCENARIO body
- Replace Approx() with WithinAbs() using named tolerance constants
- Use precalculated expected values for quantitative assertions
- Integer comparisons use REQUIRE() not WithinAbs()
- Add BurnResult plan comment for future burn-time state capture
TOML config converted to TOML 1.0 inline table syntax.
It was a duplicate of the true_anomaly calculation already performed
by cartesian_to_orbital_elements(). Added a note in old_tests for
future refactor suggesting the replacement usage.
- Rewrite precalc_moon_orbits.py to output orbit params as dotted keys
(orbit.semi_major_axis = ...) instead of nested tables, conforming
to TOML 1.0 spec for Python compatibility
- Add print_cpp_expected_values() helper to script output
- Add new test_moon_orbits.cpp replacing old_tests version:
* MoonData struct now carries int parent_index instead of pointer
* Eliminate opaque pointer arithmetic for parent index comparison
* Collect failures in vector during sim loops, assert once at end
(reduces assertions from 763,230 to 43 per test)
- Add test_moon_orbits.toml generated from precalc script
- Merge 5 SCENARIOs into 1 with shared fixture
- Reorganize 23 SECTIONs by test type (geometry → vis-viva → period → timestep → long-term)
- Add 2 missing timestep tests (apogee radius, velocity comparison)
- Replace all qualitative checks (a > b) with WithinAbs against precalculated values
- Use named tolerance constants everywhere — zero hardcoded numbers in WithinAbs
- Add VEL_CHANGE_SMALL_DT fixture constant
- Refactor precalc script to load from TOML via Simulator class
- Output matches new test ordering
Consolidate 9 TEST_CASEs into 5 SCENARIOs with 22 SECTIONs:
- Load orbital parameters from TOML config instead of hardcoded constants
- Use precomputed expected values via precalc_analytical_propagation.py
- Apply tight tolerance constants (REL_TOL, ANG_TOL, R_TOL, V_TOL)
- Remove decorative comment blocks and redundant SCENARIO title comments
- Fix propagate_orbital_elements/orbital_elements_to_cartesian API usage
(both take parent_mass, not mu)
- Add destroy_simulation cleanup to each SCENARIO
New files: precalc_analytical_propagation.py, test_analytical_propagation.toml
Move all shared tolerance constants to src/test_utilities.h with inline
comments. Update all test files to use header constants instead of local
definitions. Add DRIFT_TOL for parabolic orbit energy checks.
Key changes:
- test_utilities.h: consolidated constants with inline descriptions,
removed per-test doc comments, added DRIFT_TOL=1e-12
- test_cartesian_to_elements_advanced.cpp: use header E_TOL, ANG_TOL,
A_TOL; local A_TOL_LARGE=2e-4 for |a|=1e11 vis-viva error cases
- test_parabolic_orbit.cpp: use V_TOL, E_TOL, REL_TOL, R_TOL, DRIFT_TOL;
add precalculated initial velocity check; remove FIXME ratio test
- test_cartesian_to_elements_basic.cpp, test_extreme_eccentricity.cpp,
test_extreme_orientation_mixed.cpp, test_extreme_timescales.cpp:
migrate remaining local constants to header
- continue.md: update tolerance reference table to match header
- scripts/precalc_parabolic_orbit.py: remove velocity sampling loop
(no longer used by C++ test)
All 624 tests pass.