Skip to main content

Module flight

Module flight 

Source
Expand description

A flight from ignition to the ground: the pad, the rail and free flight, their events, and how the flight ends.

Simulation::run integrates the rigid-body equations (crate::dynamics) phase by phase:

  • Pad: the state holds still until the force along the rail exceeds friction (liftoff).
  • Rail: one degree of freedom along the rail until the last guide leaves its top (rail exit, crate::rail). If the rocket stops on the rail it falls back to the pad phase.
  • Free: six degrees of freedom until the ground.
  • Descent: once a recovery device deploys, a point mass under the open devices’ drag area (crate::recovery), with the attitude frozen where it deployed.

Every ignition, thrust-curve knot and burnout is a stop time, so no step straddles a change in the thrust’s slope or the start or end of a burn, and each interval knows which motors burn. Each motor burns on its own clock from its ignition (hpr_design::Ignition).

Staging. A Separation whose nose body still has a motor to burn is powered: that body, the sustainer, flies on in six degrees of freedom on its own stages’ aerodynamics and mass, and the aft body, the booster, descends to its landing as a point mass (FlightResult::bodies). The state is the nose tip’s, which the sustainer keeps, so it carries straight across the split (the decision record on staging, ADR-074). Liftoff, rail exit, apogee (the center of mass’s height rate crossing zero), ground contact (its ellipsoidal height reaching the site’s) and user events are located by the integrator’s event finder.

A flight ends on the ground (Termination::GroundHit), with no liftoff by the last burnout (Termination::NoLiftoff), stalled back onto the pad (Termination::StalledOnRail), at the time cap (Termination::TimeCap) or at the step limit (Termination::StepLimit). Anything else that stops it is an error. With no recovery device the flight is ballistic to the ground.

Method: docs/physics/flight.md and docs/physics/recovery.md.

Structs§

FlightEvent
An event and the flight’s sample at it.
FlightResult
A finished flight.
FlightSettings
How a flight is integrated and when it gives up.
Simulation
A rocket, its surroundings, its rail and its settings, ready to fly.
UserEvent
A user event: function(sample) crossing zero in direction during free flight. It is recorded and the flight continues.

Enums§

EventKind
What happened.
Termination
Why a flight ended (Loft lesson L25: every way of stopping is named).