Skip to main content

Ejection

Struct Ejection 

Source
#[non_exhaustive]
pub struct Ejection { pub trigger: Trigger, pub parting: Parting, pub impulse_n_s: f64, }
Expand description

A piece of the airframe leaving the rest on a trigger: the airframe parts at a joint, or lets a payload out.

The piece it makes flies on as a body of its own, numbered after the separation’s aft body: with a Separation the first ejection makes body 2, without one body 1, and each ejection after it the next number, in the order given. A body is the pieces still joined, and it is numbered by the piece nearest the nose among them, so the body that keeps the nose is always body 0. Pieces joined by a shock cord fly as one, so a joint whose pieces stay tied together is not an ejection at all.

When the airframe first comes apart each body starts at its own center of mass with the velocity that point had. A body already flying as a point mass has no attitude to place its pieces by, so they start where it was, at its velocity. Every motor must have burned out by the time an ejection fires. The decision record on ejected pieces, ADR-085, has the reasoning.

An ejection can push its two sides apart with an impulse J (Self::with_impulse), the charge’s or spring’s: the side forward of the joint, or a payload, which leaves forward, takes +J along the airframe’s axis toward the nose, and the other side −J, so each changes velocity by J/m for its own mass m and the momentum is unchanged. The axis is the airframe’s while it flies with nothing open. A body with no attitude of its own (a point mass, or a stack whose attitude froze when a device opened earlier) is taken to point its forward end against its velocity through the air if it hangs from a device, any but a tumble, open just before that instant, and along it, as a stable airframe does, if nothing is open or it only tumbles; below 1 mm/s through the air, up (ADR-086). Partings at one instant part a body together. A separation adds no impulse, and a pushed payload in the nose’s piece is refused.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§trigger: Trigger

When the piece leaves: the same triggers as a recovery device’s.

§parting: Parting

Where the airframe parts.

§impulse_n_s: f64

The impulse J that pushes the two sides apart, N·s: zero (the default) for none.

Implementations§

Source§

impl Ejection

Source

pub fn aft_of(trigger: Trigger, component: impl Into<String>) -> Self

The airframe parting at the joint aft of body component component, on trigger.

Source

pub fn payload(trigger: Trigger, component: impl Into<String>) -> Self

Internal component component and what it holds leaving the airframe, on trigger.

Source

pub fn with_impulse(self, impulse_n_s: f64) -> Self

The same ejection, pushing its two sides apart with the impulse impulse_n_s, N·s: the side forward of the joint, or the payload, gets it toward the nose, and the other side its opposite. crate::Simulation::with_ejections refuses one that is negative or not finite. A pushed payload needs a way out forward: one in the nose’s piece is refused when the flight starts, and one whose section’s forward joint hasn’t parted when it leaves is an error in flight.

Trait Implementations§

Source§

impl Clone for Ejection

Source§

fn clone(&self) -> Ejection

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 Ejection

Source§

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

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

impl<'de> Deserialize<'de> for Ejection

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 Ejection

Source§

fn eq(&self, other: &Ejection) -> 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 Ejection

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 Ejection

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.