pub struct MassHistory { /* private fields */ }Expand description
A mass and center of mass against flight time, flown in place of the design’s (the
module says what stays HPR Sim’s). It serializes as its times_s, mass_kg and
cg_aft_of_nose_m and is checked again when read.
Implementations§
Source§impl MassHistory
impl MassHistory
Sourcepub fn new(
times_s: Vec<f64>,
mass_kg: Vec<f64>,
cg_aft_of_nose_m: Vec<f64>,
) -> Result<Self, SimError>
pub fn new( times_s: Vec<f64>, mass_kg: Vec<f64>, cg_aft_of_nose_m: Vec<f64>, ) -> Result<Self, SimError>
The mass mass_kg[i] and center of mass cg_aft_of_nose_m[i], m aft of the nose tip, at
flight time times_s[i].
§Errors
SimError::History if the lists differ in length or are empty, a number isn’t finite,
the times don’t rise, the first comes after launch (0), or a mass isn’t positive.
Sourcepub fn cg_aft_of_nose_m(&self, t_s: f64) -> f64
pub fn cg_aft_of_nose_m(&self, t_s: f64) -> f64
The center of mass at flight time t_s, m aft of the nose tip.
Trait Implementations§
Source§impl Clone for MassHistory
impl Clone for MassHistory
Source§fn clone(&self) -> MassHistory
fn clone(&self) -> MassHistory
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MassHistory
impl Debug for MassHistory
Source§impl<'de> Deserialize<'de> for MassHistory
impl<'de> Deserialize<'de> for MassHistory
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for MassHistory
impl PartialEq for MassHistory
Source§fn eq(&self, other: &MassHistory) -> bool
fn eq(&self, other: &MassHistory) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for MassHistory
impl Serialize for MassHistory
impl StructuralPartialEq for MassHistory
Auto Trait Implementations§
impl Freeze for MassHistory
impl RefUnwindSafe for MassHistory
impl Send for MassHistory
impl Sync for MassHistory
impl Unpin for MassHistory
impl UnsafeUnpin for MassHistory
impl UnwindSafe for MassHistory
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
Mutably borrows from an owned value. Read more