3 Commits

Author SHA1 Message Date
377dc68795 Fix: periodic SOI rescan when no crossing found in look-ahead window
- SEARCH_ORBITS increased from 5 to 10
- Added last_scan_end tracking: when sim_time passes the end of the
  current scan window with no crossing pending, automatically rescans
  the next SEARCH_ORBITS ahead
- Title bar now shows 'rescan in Xs' instead of just 'No upcoming SOI
  crossing', making the system's state visible
- Fixes bug #3: asteroid entering SOI undetected because the scan
  window had expired
2026-05-21 20:51:01 +02:00
e2c706ecb0 Fix: recompute sun-frame trail and SOI crossings after flyby
After SOI exit the asteroid has new orbital elements (gravity assist).
Previously the old trail and crossing predictions were never updated,
causing three bugs:
  1. Old trajectory still drawn after exit
  2. Next SOI entry time based on stale orbit
  3. Subsequent SOI entries never triggered

Now on exit: recompute trail, rescans for future SOI crossings,
and resets the crossing index.
2026-05-21 20:35:17 +02:00
655f1c9af6 Initial commit: Keplerian orbital mechanics with patched-conics SOI transitions
- orbital_elements.py: elliptical + hyperbolic orbit support
- orbit_drawer.py: orbit point generation with SOI truncation
- soi_calculator.py: SOI crossing time calculator
- frame_transition.py: reference frame switching
- test_orbital.py: 147 assertions, all passing
- visual_test.py: pygame flyby visualization
2026-05-21 20:31:17 +02:00