- Remove TODO from simulation.cpp (interpolated burns now implemented)
- Update technical_reference.md: both trigger types now use sub-step
propagation to exact trigger time, not step boundary
- Update hohmann-rendezvous-quantization-fix.md: mark Option A as
resolved, remove outdated quantization fix suggestions
- Update propagation_refactor.md: resolve Issues 3 and 4, replace
interpolated time triggers TODO with code path unification TODO
Planning doc updates:
- Replace estimate table with actual measured values from DT sweep test
- Add 0.5s and 2.0s data points (69m and 228m respectively)
- Mark DT sweep tests as COMPLETED section
- Add analysis note about linear scaling with DT
New tests in test_maneuver_planning.cpp:
1. DT sweep: Hohmann transfer separation vs time step
- Runs full Hohmann transfer at DT = {0.1, 0.5, 1.0, 2.0, 5.0, 10.0}
- Verifies final separation matches expected ranges
- Confirms ecc < 0.01 for DT <= 1.0
2. DT sweep: quantization error is bounded by DT
- Tests 9 trigger offsets per DT value at DT = {1, 5, 10, 30}
- Verifies quantization error is always in [0, DT)
- Verifies execution time matches ceil-to-step-boundary
3. DT sweep: Hohmann arrival burn timing error
- Measures exact timing error at each DT
- Reports position error estimate (timing_error × velocity)
- Confirms timing error < DT
All 157 tests pass (240,742 assertions).
Previous: 154 tests, 240,445 assertions.
Mark Issues 1, 2, 5, 6 as RESOLVED. Mark Issue 3 as PARTIALLY RESOLVED.
Mark Issue 4 as UNRESOLVED (time-triggered quantization).
Update call chain diagram to show current merged structure.
Update call sites summary to show final 4 call sites (3 contexts).
Add remaining work section for interpolated time triggers and
parabolic/hyperbolic orbit support.
In check_maneuver_trigger() (true-anomaly branch), eliminate the
propagate_orbital_elements() look-ahead probe that was called every
frame for pending maneuvers. Replace with direct analytical computation
of dt_needed from mean anomaly delta.
Benefits:
- Eliminates ~24k redundant Kepler solves per Hohmann transfer wait
period (DT=10s, 244k s wait time)
- More precise: no discretization error from single-step propagation
- Simpler logic: removed angle_between check, wraparound detection
- Removes dead angle_between() helper function
Elliptical orbits only — added TODO for parabolic/hyperbolic support.
All 154 tests pass (240,445 assertions).
Update planning doc to reflect:
- File renames (rendezvous_hohmann -> rendezvous)
- test_maneuver_timing.cpp merged into test_maneuver_planning.cpp
- Old CW rendezvous module removed (eliminated 3 pre-existing failures)
- Current test results: 154/154 all passing
- Completed work section with full file list
- Remaining work section with optional future tasks
- 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 planning document detailing two separate issues causing
periapsis burns to execute at incorrect locations:
Issue 1: Omega = π instead of 0 for near-zero inclination orbits
- Unstable atan2 calculation in cartesian_to_orbital_elements()
- Occurs when n_mag > 1e-10 due to tiny h_vec.y from i ≈ 0
- Fix: Add inclination threshold (0.01 rad) before using atan2 path
Issue 2: True anomaly trigger fires early at wrong location
- angle_between() detects upcoming crossing, fires immediately
- Executes burn at current position instead of waiting for target angle
- Proposed fixes: Defer execution, interpolate, or remove future check
Also cleaned up:
- Removed temporary debug files (debug_test_burn.cpp, debug_trace.cpp)
- Removed debug output from src/orbital_mechanics.cpp
- Kept tests/test_omega_debug.cpp as it validates Issue 1 fix
See docs/planning/periapsis_burn_bug_analysis.md for full details.
Added user experience improvements:
- Keyboard shortcuts: ESC to cancel, ENTER to confirm
- Enhanced error messages with detailed descriptions
- Hohmann tab input validation
- Error message display in Hohmann tab
- Edge case handling for all input scenarios
- Clear error messages when tab switches
Keyboard shortcuts work for all dialog tabs and delete confirmation.
Comprehensive design for modal maneuver management dialog including:
- Three-tab interface (Create, Hohmann, Edit)
- Real-time orbital preview using preview_burn_result()
- Hohmann transfer calculator
- Enhanced maneuver list with quick actions
- Complete UIState extension with ManeuverDialogState
- Detailed implementation plan with 6 phases
- Edge case handling and visual design guidelines
Added 6 test files for Newton-Raphson solver and analytical propagation:
- test_cartesian_to_elements_basic.cpp: Tests state vector ↔ orbital elements conversion
- test_newton_raphson_convergence.cpp: Tests Newton-Raphson solver convergence behavior
- test_analytical_propagation_apsides.cpp: Tests propagation through orbital apsides
- test_analytical_propagation_timesteps.cpp: Tests propagation with various timesteps
- test_extreme_eccentricity.cpp: Tests near-parabolic and hyperbolic orbits
- test_precision_boundaries.cpp: Tests exact boundary value handling
Implemented core orbital mechanics functions:
- solve_kepler_equation(): Newton-Raphson solver with 1e-10 tolerance
- get_initial_trial_value(): Series expansion initial guess
- cartesian_to_orbital_elements(): State vectors to orbital elements conversion
- propagate_orbital_elements(): Analytical propagation using Kepler's equation
Updated test plan document with current progress and remaining tests.
Test status: 66 passed, 14 failed (out of 80 test cases)
- Failing tests are expected: implementation needs debugging
- Config validation issues fixed by adjusting orbital parameters
- Molniya position tests now pass with 3D rotation implementation
- Generic inclined orbit test passes with proper argument_of_periapsis
- Only orbital period test still fails (orbit tracker needs 3D fix)
- Add plan document for fixing update_orbit_tracker()
- Remove altitude convenience parameter from body and spacecraft config parsing
- Update test configs to use explicit semi_major_axis instead of altitude
- Remove buggy post-processing loop that added parent radius to all spacecraft
- Result: Semi-major axis now used as-is (correct behavior)
- Test results: Molniya position tests now pass (was failing by 1-11M meters)
- Documentation: Remove altitude references from technical reference
- Planning: Document bug fix decision and implementation details
Changes:
- src/config_loader.cpp: Remove altitude parsing and post-processing
- tests/test_maneuver_planning.toml: Use semi_major_axis = 6.771e6
- tests/test_maneuvers.toml: Use semi_major_axis = 6.771e6
- tests/test_orbit_rendering.toml: Use semi_major_axis = 6.771e6
- docs/technical_reference.md: Remove altitude documentation
- docs/planning/molniya-orbit-test-plan.md: Document bug fix approach
- Create test configuration for Molniya orbits with Earth as root body
- Implement test suite for highly inclined orbits:
* Position verification at multiple true anomalies
* Orbital period verification
* Generic inclined orbit test
* Inclination parameter preservation
- Document critical bug in spacecraft initialization:
* Config loader incorrectly adds parent radius to semi_major_axis
* Affects all spacecraft using semi_major_axis directly
* Causes significant position errors (1-11M meters)
* Molniya tests fail due to this bug, not test code