Skip to main content

FlightSummary

Struct FlightSummary 

Source
pub struct FlightSummary {
Show 19 fields pub termination: Termination, pub launch_height_m: Option<f64>, pub rail_exit_speed_m_s: Option<Peak>, pub apogee: Option<Apogee>, pub max_speed_m_s: Option<Peak>, pub max_mach: Option<Peak>, pub max_dynamic_pressure_pa: Option<Peak>, pub max_acceleration_m_s2: Option<Peak>, pub max_descent_acceleration_m_s2: Option<Peak>, pub body_max_descent_acceleration_m_s2: Vec<BodyPeak>, pub max_deployment_airspeed_m_s: Option<Peak>, pub min_static_margin_cal: Option<Peak>, pub min_flight_margin_cal: Option<Peak>, pub min_powered_static_margin_cal: Option<Peak>, pub max_powered_moment_slope_per_rad: Option<Peak>, pub rail_exit_stability: Option<Stability>, pub max_angle_of_attack_rad: Option<Peak>, pub landing: Option<Landing>, pub body_landings: Vec<Landing>,
}
Expand description

The metrics of one flight. Every field that may not have happened is an Option.

Fields§

§termination: Termination

Why the flight ended.

§launch_height_m: Option<f64>

The center of mass’s height above the launch site as the rocket stood at launch, m. None for a flight started in the air (Simulation::run_free).

§rail_exit_speed_m_s: Option<Peak>

The speed as the last rail guide left the rail, m/s, with its time and height.

§apogee: Option<Apogee>

The apogee of the center of mass. A stack that comes apart at a separation before its apogee (Termination::Separated) has the apogee of the part that keeps the nose, body 0, when that part reaches it whole. There is none when an ejection (crate::Ejection) parts the stack before its apogee, or parts body 0 after the split and before body 0’s apogee: from the charge on, body 0 is only what the charge leaves at the nose (the piece ahead of the parted joint, often the nose cone alone, or the airframe without a payload it let out), and its apogee is not the rocket’s. An ejection at an apogee or after it keeps that apogee.

§max_speed_m_s: Option<Peak>

The largest speed of the center of mass relative to the ground after liftoff, m/s.

§max_mach: Option<Peak>

The largest Mach number after liftoff.

§max_dynamic_pressure_pa: Option<Peak>

The largest dynamic pressure after liftoff (“max q”), Pa.

§max_acceleration_m_s2: Option<Peak>

The largest acceleration of the nose tip (the body origin) relative to the launch frame from liftoff until a recovery device opens, m/s²: the boost and the coast, from the equations of motion.

§max_descent_acceleration_m_s2: Option<Peak>

The largest specific force under the recovery devices, m/s²: the opening shock, the opening load over the mass, (drag + thrust)/m (Sample::specific_force_enu_m_s2), which follows the inflation model, kept apart from the boost’s. Gravity is not in it: with no motor burning, the mass times this is the opening force. Once a canopy reaches its steady fall it reads about 1 g, so it is at least that unless the flight reaches the ground first or comes apart at an ejection (crate::Ejection). When the stack comes apart at a separation with nothing left to burn (Termination::Separated), the part that keeps the nose, body 0, flies on as a point mass, and the drag of its own devices over its mass counts too (BodyStep::specific_force_enu_m_s2), whether they open before the split or after, until an ejection parts it. No other body’s load counts: never the part dropped aft at a separation, and no piece from an ejection of the stack or of body 0 on, where body 0 is the ejection’s lead piece (a nose cone pushed off is the nose cone alone). Each of those has its own in Self::body_max_descent_acceleration_m_s2.

§body_max_descent_acceleration_m_s2: Vec<BodyPeak>

Each separated body’s own opening shock, m/s², in body order: the largest specific force under that body’s own devices over its whole flight as a point mass. That is the drag of its open devices over its mass, ½ ρ v² (C_D S) / m (ρ the air’s density, v the body’s airspeed, C_D S its open devices’ drag area, m its mass; BodyStep::specific_force_enu_m_s2), found inside its steps as the flight’s is.

The mass is the body’s at that instant. A body that lets a piece go at an ejection keeps its number (crate::BodyFlight::body), so its figure is the largest from before the piece left or after, each over the mass it then had. Body 0’s can therefore be larger than the flight’s (Self::max_descent_acceleration_m_s2), which stops counting body 0 at such an ejection.

A tumble (crate::DeviceDrag::tumbling_stages) is a device like any other. A part that tumbles from a fast split has the tumble’s drag there, which can be above its canopy’s opening later; that drag is far outside the tumble’s fit, so it is no bound either way. A canopy that opens after such a tumble likely reads low: the tumble slows the part more than a real booster slows (docs/physics/recovery.md).

A body that never had a device of its own open has no entry, and what a body’s devices did while it was still part of the stack is the flight’s, not here. Empty when nothing came apart, and in a summary written before this field was.

§max_deployment_airspeed_m_s: Option<Peak>

The largest airspeed at which a recovery device opened, m/s, with when and where: the speed the opening load follows, as q = ½ρv². When the stack comes apart with nothing left to burn, the devices the part that keeps the nose opens in its own flight count too. Over the ground the speed can be more or less by the wind’s.

§min_static_margin_cal: Option<Peak>

The smallest static margin from the rail exit to apogee or the first deployment, calibers, where it is defined, found inside steps as a peak is. After a powered separation the sustainer’s margins count its own diameter.

§min_flight_margin_cal: Option<Peak>

The smallest flight margin over the same span, calibers, found the same way. RocketPy’s min_stability_margin takes its least over the whole flight, so it can differ.

§min_powered_static_margin_cal: Option<Peak>

The smallest static margin over the same span while a motor burns, calibers, found the same way: below zero, the rocket is unstable under power (EnvelopeFlag::UnstableUnderPower; #335). A step counts when the thrust at its middle is positive. Every ignition, thrust-curve knot and burnout ends a step, so a motor’s thrust then holds through the step, and a step that ends at a burnout counts up to that instant. A NaN margin at a step’s start, middle or end while a motor burns is kept, and then nothing replaces it, so it can’t hide the flag; a NaN thrust counts as burning. None when no motor burns in the span, the margin is nowhere defined while one does, and in a summary written before this field was.

§max_powered_moment_slope_per_rad: Option<Peak>

The largest static pitch-moment slope C_mα per radian (Margin::pitch_moment_slope_per_rad, C_mα = −(Σ C_Nα,i x_i − C_Nα x_cg) / d) over the same span while a motor burns, taken only at instants where the static margin is undefined: above zero, the air turns the rocket away from its path, so it is unstable under power although HPR Sim can give no margin (EnvelopeFlag::UnstableWithoutMargin). The margin is undefined where the net normal-force slope is not positive, or is too small against Σ |C_Nα,i| for the quotient to mean anything (MARGIN_CONDITION_LIMIT); the moment slope stays finite there and still says which way the air turns the rocket. Taken at the start, middle and end of each step where a motor burns, counted as for min_powered_static_margin_cal, not searched between. A NaN slope is kept, and then nothing replaces it. None when the margin is defined at every such instant, no motor burns in the span, and in a summary written before this field was.

§rail_exit_stability: Option<Stability>

The stability as the last rail guide left the rail.

§max_angle_of_attack_rad: Option<Peak>

The largest angle of attack more than HIGH_ANGLE_GRACE_S after the rail exit (or the start of a flight begun in the air), until apogee or the first deployment, rad. Only instants where a 15° angle would give a normal force of at least HIGH_ANGLE_MIN_FORCE_SHARE of the rocket’s weight count: as the path turns over near apogee the angle swings past 15° on an ordinary flight, with too little air to move it (the envelope flags’ decision record). Taken at each step’s start, middle and end, not searched between. None when no instant counted, and in a summary written before this field was.

§landing: Option<Landing>

Where the flight itself landed: the stack, or after a powered separation the sustainer.

§body_landings: Vec<Landing>

Where each separated body landed, in body order; a body that didn’t land is left out.

Implementations§

Source§

impl FlightSummary

Source

pub fn envelope_flags(&self) -> Vec<EnvelopeFlag>

The operating envelope’s flags this flight raises, in EnvelopeFlag’s order.

Source

pub fn ground_hit_speed_m_s(&self) -> Option<f64>

The flight’s own ground-hit speed, m/s, if it landed.

Source

pub fn nose_landing(&self) -> Option<&Landing>

Where the part that keeps the nose landed, as Self::apogee is its apogee: the flight’s own landing (Self::landing), or, after the stack comes apart with nothing left to burn (Termination::Separated, which leaves Self::landing empty), part 0’s from Self::body_landings.

Trait Implementations§

Source§

impl Clone for FlightSummary

Source§

fn clone(&self) -> FlightSummary

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FlightSummary

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for FlightSummary

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for FlightSummary

Source§

fn eq(&self, other: &FlightSummary) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for FlightSummary

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for FlightSummary

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.