compute_timeline

Function compute_timeline 

Source
pub fn compute_timeline(
    name: &str,
    initial_total_kg: f64,
    initial_dry_kg: f64,
    events: &[MassEvent],
) -> MassTimeline
Expand description

Generate a mass timeline from an initial state and ordered events.

For each event:

  • FuelBurn: applies Tsiolkovsky equation, reduces propellant
  • ContainerJettison: reduces dry mass
  • DamageEvent: reduces dry mass (structural loss)
  • Resupply: adds to propellant (or dry mass depending on context)

Returns a MassTimeline with snapshots before and after each event.