pub struct Flight { /* private fields */ }Expand description
A flown flight: what happened, and its metrics.
Heights are the rocket’s center of gravity’s, above the launch site: the rocket stands on
the rail at the start, so the first height is not zero. Speeds are relative to the ground.
Flight::summary has every metric; the methods below are the ones most asked for. A flight
serializes and reads back as a record; one read back isn’t flown again or checked.
Implementations§
Source§impl Flight
impl Flight
Sourcepub fn builder<'a>(
rocket: &'a Rocket,
environment: &'a Environment,
rail_length_m: f64,
) -> FlightBuilder<'a>
pub fn builder<'a>( rocket: &'a Rocket, environment: &'a Environment, rail_length_m: f64, ) -> FlightBuilder<'a>
A flight of rocket in environment from a vertical, frictionless rail rail_length_m
long, measured from the rocket’s aft end at the start to the rail’s top. Set the rest on
the builder; FlightBuilder::fly flies it.
Sourcepub fn summary(&self) -> &FlightSummary
pub fn summary(&self) -> &FlightSummary
Every metric of the flight: apogee, peaks, stability margins, landings.
Sourcepub fn result(&self) -> &FlightResult
pub fn result(&self) -> &FlightResult
The flight itself: its events, its end, and every body’s.
Sourcepub fn apogee_m(&self) -> Option<f64>
pub fn apogee_m(&self) -> Option<f64>
The apogee’s height above the launch site, m; None if the flight ended before it.
Sourcepub fn apogee_time_s(&self) -> Option<f64>
pub fn apogee_time_s(&self) -> Option<f64>
When the apogee came, s after launch.
Sourcepub fn max_speed_m_s(&self) -> Option<f64>
pub fn max_speed_m_s(&self) -> Option<f64>
The top speed, m/s.
Sourcepub fn rail_exit_speed_m_s(&self) -> Option<f64>
pub fn rail_exit_speed_m_s(&self) -> Option<f64>
The speed as the rocket left the rail, m/s.
Sourcepub fn landing(&self) -> Option<&Landing>
pub fn landing(&self) -> Option<&Landing>
Where and how fast the rocket landed; None if it never reached the ground.
Sourcepub fn envelope_flags(&self) -> Vec<EnvelopeFlag>
pub fn envelope_flags(&self) -> Vec<EnvelopeFlag>
Where the flight’s numbers deserve less trust: unstable under power (a static margin below
zero while a motor burns, so its apogee is not a prediction), and where it goes past what
hpr’s numbers have been checked for: faster than the fastest validated flight, at a high
angle of attack, outside the core band or beyond the envelope (hpr_sim::envelope).
Empty for a flight that raises none.
Sourcepub fn issue_warnings(&self) -> &[IssueWarning]
pub fn issue_warnings(&self) -> &[IssueWarning]
The known errors in hpr’s drag, a separated part’s drag and the stability margin this
flight meets, each by its issue number, with the parts whose shape meets its condition and
which way its numbers lean (hpr_sim::issues). A flight on a drag model or table of its
own (FlightBuilder::drag_model, FlightBuilder::drag_table), whose drag isn’t hpr’s,
meets none of hpr’s drag issues but keeps the separated parts’ (#179, #354), and the
stability ones unless its model has a normal-force table of its own. Empty for a flight that meets none, and for a record saved before the
warnings were kept.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Flight
impl<'de> Deserialize<'de> for Flight
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl StructuralPartialEq for Flight
Auto Trait Implementations§
impl Freeze for Flight
impl RefUnwindSafe for Flight
impl Send for Flight
impl Sync for Flight
impl Unpin for Flight
impl UnsafeUnpin for Flight
impl UnwindSafe for Flight
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more