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.
- Merge initial conditions check into single SCENARIO
- Tighten energy check to relative error (1e-10) vs KE
- Replace qualitative checks with quantitative WithinAbs assertions
- Use named tolerance constants throughout fixture
- Update precalc_parabolic_orbit.py to output SI units (m, m/s)
- Precalculate expected values with full precision from Python
- Python and C++ produce identical results in SI units
- Add semi_latus_rectum support in sim_engine.py for parabolic orbits
- 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
- Added orbital_mechanics module with orbital_elements_to_cartesian()
- Updated initialize_orbital_objects() to use orbital mechanics
- Added validate_initial_positions() for post-initialization checking
- Fixed test files to use global_position/global_velocity
- Updated config loader to support spacecraft altitude parameter
- Fixed orbital_mechanics.cpp velocity calculation bug (removed duplicate scaling)
- Updated Makefile to include orbital_mechanics.o in test build
- Renamed simulation.h OrbitalMetrics to OrbitalAnalysis to avoid conflict
- Added docs/parabolic_union_implementation.md for parabolic orbit support plan
Note: Test configs still need manual fix for orbit table TOML syntax
Merge spacecraft management into simulation module:
- Move Spacecraft struct from maneuver.h to spacecraft.h
- Add spacecraft array to SimulationState (spacecraft, craft_count, max_craft)
- Remove separate SpacecraftState struct and related functions
- Update create_simulation() to require max_craft parameter
- Move spacecraft update logic into update_simulation()
- Make load_spacecraft_config() internal helper, called by load_system_config()
- Update all test files to use new API with 3-parameter create_simulation()
- Handle max_craft=0 case gracefully (no spacecraft allocation)
Test results: 26/27 passing (1 pre-existing SOI test unrelated to changes)
- Update velocity calculation to handle e=1.0 (parabolic orbits)
using escape velocity formula v² = 2GM/r instead of vis-viva
- Add parabolic comet test configuration
- Add test cases for parabolic orbit energy and escape trajectory
Claude