pub struct State {
pub position_enu_m: DVec3,
pub velocity_enu_m_s: DVec3,
pub attitude: DQuat,
pub body_rate_rad_s: DVec3,
}Expand description
A rigid body’s state in the launch frame L (docs/physics/frames.md).
The reference point is the body origin, the nose tip (the decision record on the design tree,
ADR-007), which is fixed in the body; the center of mass moves relative to it as
propellant burns. As an array the order is position, velocity, attitude (w, x, y, z) and body
rates.
Fields§
§position_enu_m: DVec3The nose tip’s position in L, m.
velocity_enu_m_s: DVec3The nose tip’s velocity relative to L, m/s.
attitude: DQuatThe attitude, body to launch frame. The integrated quaternion’s norm drifts slightly; every use normalizes it.
body_rate_rad_s: DVec3The body’s angular velocity relative to L, in body axes, rad/s.
Implementations§
Source§impl State
impl State
Sourcepub fn from_array(y: &[f64; 13]) -> Self
pub fn from_array(y: &[f64; 13]) -> Self
The state from the integrator’s array.
Sourcepub fn unit_attitude(&self) -> DQuat
pub fn unit_attitude(&self) -> DQuat
The attitude scaled to unit length.
Sourcepub fn point_enu_m(&self, body_m: DVec3) -> DVec3
pub fn point_enu_m(&self, body_m: DVec3) -> DVec3
A point given in body axes (m from the nose tip), in L.
Trait Implementations§
impl Copy for State
Source§impl<'de> Deserialize<'de> for State
impl<'de> Deserialize<'de> for State
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
impl StructuralPartialEq for State
Auto Trait Implementations§
impl Freeze for State
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnsafeUnpin for State
impl UnwindSafe for State
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