Hohmann transfer calculation result: dv1 (first burn delta-v), dv2 (second burn delta-v), transfer_time (half-period of transfer ellipse), true_anomaly_2 (true anomaly at second burn, typically π).
### SimulationState
### SimulationState
Top-level container: arrays of bodies/spacecraft/maneuvers (with counts and capacities), time, dt, config_name.
Top-level container: arrays of bodies/spacecraft/maneuvers (with counts and capacities), time, dt, config_name.
@ -137,6 +141,28 @@ True anomaly triggers must execute at precise orbital position:
**Wraparound handling**: When current_nu > 5.0 and future_nu <1.0,detect2π→0crossingatperiapsis.
**Wraparound handling**: When current_nu > 5.0 and future_nu <1.0,detect2π→0crossingatperiapsis.
### Hohmann Transfer
`calculate_hohmann_transfer()` computes optimal two-burn transfer between two circular orbits using the vis-viva equation. Transfer time equals half the period of the transfer ellipse.
## Rendezvous Module
Handles orbital rendezvous planning and execution via Hohmann transfers and phasing maneuvers.
**Hohmann Transfer Planning**:
- `calculate_required_separation_for_hohmann()` - computes ideal angular separation between chaser and target at first burn
- `calculate_wait_time_for_hohmann()` - determines wait time before starting transfer (positive = wait, negative = late)
- `calculate_next_hohmann_wait_time()` - like above but always returns non-negative by advancing to next phasing opportunity
- `calculate_relative_orbit_period()` - time between consecutive phasing opportunities
**Maneuver Creation**:
- `create_hohmann_departure_maneuver()` - adds prograde burn to enter transfer orbit (supports true anomaly or immediate trigger)
- `create_hohmann_arrival_maneuver()` - adds circularization burn to match target orbit (triggered at target radius)
**Verification**:
- `verify_hohmann_transfer_orbit()` - checks if current orbit matches expected Hohmann transfer parameters
- `validate_hohmann_transfer_parameters()` - validates transfer parameters before calculation
- `hohmann_transfer_complete()` - checks if transfer time has elapsed and spacecraft is at target radius
## Simulation Loop
## Simulation Loop
**Initialization**:
**Initialization**:
@ -147,12 +173,13 @@ True anomaly triggers must execute at precise orbital position:
5. Main loop begins
5. Main loop begins
**Main Loop Order**:
**Main Loop Order**:
1. update_bodies_physics() - SOI checks, drift detection, propagation