Post-Capture Orbit Stabilization
Problem
After cross-SOI capture, non-brachistochrone strategies route to circularize, which targets the final orbit directly via apse-targeted vis-viva burns capped at ~100 m/s/tick. When the capture orbit is radically larger than the target (e.g., 43,000 km periapsis vs 2,900 km target SMA at Luna), this is extremely slow: orbital periods at high altitude are 100+ hours, and many orbits are needed to converge.
Solution: Stabilize Phase
A new stabilize phase rapidly lowers the orbit to an intermediate altitude using a higher Dv cap, then hands off to circularize for fine orbit matching.
Phase Flow
capture -> stabilize -> circularize -> phase -> approach
Brachistochrone strategy skips stabilize (routes directly from capture to brachistochrone).
Algorithm
The stabilize phase uses the same vis-viva apse-window pattern as circularize but targets an intermediate orbit with a higher Dv cap.
Steps
- Guard: no orbital elements - transition to circularize (let it handle fallback)
- Guard: hyperbolic orbit (e >= 1.0) - transition to circularize (has its own fallback)
- Compute stabilize target:
stab_ra_target = max(STABILIZE_APOAPSIS_FACTOR * target_a, safe_pe_r * 2) - Exit check: apoapsis <= stab_ra_target AND periapsis >= safe altitude AND bound orbit - transition to circularize
- Guard: max ticks exceeded - transition to circularize (safety valve)
- Emergency: periapsis below body surface - full prograde thrust
- Near periapsis + low periapsis: prograde to raise orbit energy (protect against surface impact)
- SOI escape guard: apoapsis > SOI radius - retrograde at any apse to prevent escape
- Near periapsis + high apoapsis: retrograde vis-viva burn to lower apoapsis toward target
- Near apoapsis + high apoapsis: retrograde vis-viva burn to lower periapsis (protecting safe altitude)
- Apply burn: cap Dv at STABILIZE_DV_CAP, compute ICRF direction from RTN, apply steering
Burn Windows
Burns only occur near apsides (within STABILIZE_APSE_HALF_WIDTH degrees of periapsis or apoapsis). The ship coasts between apse windows.
- Near periapsis: vis-viva burn targets a transfer orbit with the desired apoapsis
- Near apoapsis: vis-viva burn targets a transfer orbit with the desired periapsis
Constants
| Constant | Value | Description |
|---|---|---|
STABILIZE_APOAPSIS_FACTOR |
3.0 | Exit when ra <= this x target SMA |
STABILIZE_DV_CAP |
500.0 m/s | Per-tick Dv cap (5x circularize max) |
STABILIZE_APSE_HALF_WIDTH |
30.0 deg | Burn window half-width around each apse |
STABILIZE_MAX_TICKS |
2000 | Safety valve (~33 min at 1x time scale) |
Exit Criteria
Stabilize transitions to circularize when ALL of:
- Apoapsis <= STABILIZE_APOAPSIS_FACTOR x target SMA
- Periapsis >= safe orbit altitude for the body
- Orbit is bound (e < 1.0)
Or unconditionally after STABILIZE_MAX_TICKS ticks (safety valve).
Edge Cases
- Hyperbolic orbit: immediately hand off to circularize (which has retrograde fallback)
- Missing orbital elements: immediately hand off to circularize
- Periapsis below surface: emergency prograde burn regardless of apse window
- Apoapsis beyond SOI: retrograde at any apse to prevent escape
- Already within exit criteria: immediate transition to circularize (no-op stabilize)