Browse Source
Modified physics integration to operate in local coordinate frames. Parent bodies are treated as origin in child's reference frame. Changes: - rk4_step() now integrates local_position/local_velocity - evaluate_acceleration() calculates gravity with parent at origin - update_simulation() computes global coords FROM local after integration - Added compute_global_coordinates() after root and child updates Results: - Earth Moon orbital stability test: NOW PASSING! (was failing) - Moon drift reduced significantly (improved numerical precision) - Test improvements: 3 failures → 2 failures (7/9 passing) - Still failing: Io (Jupiter) and Titan (Saturn) - likely need tuning Implements hierarchical_frames_plan.md Phase 2main
2 changed files with 18 additions and 8 deletions
Loading…
Reference in new issue