Skip to main content

FlownVehicle

Struct FlownVehicle 

Source
#[non_exhaustive]
pub struct FlownVehicle<'a> { pub assembly: Cow<'a, Assembly>, pub aero: Cow<'a, AeroModel>, pub ignition_s: Vec<Option<f64>>, pub from_s: Option<f64>, pub until_s: Option<f64>, }
Expand description

A vehicle a flight flew in six degrees of freedom, as one rigid body: the launch stack, or a sustainer a powered separation handed the flight to (crate::Simulation::flown_vehicles).

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.
§assembly: Cow<'a, Assembly>

Its assembled design: the stack’s (crate::Simulation::assembly), or a sustainer’s, the design cut after its separation’s boundary with the nose body’s motors.

§aero: Cow<'a, AeroModel>

Its aerodynamic model: the stack’s (crate::Simulation::aero), or a sustainer’s, built again on the cut design as the flight built it. A rebuilt one keeps the cut design’s geometry and its stations, not the flight’s drag scale or base-drag setting, which bear on neither.

§ignition_s: Vec<Option<f64>>

Each of its motors’ ignition time on the flight’s clock, s, in Assembly::motors’s order; None for one that never lights, which stays loaded.

§from_s: Option<f64>

When it began to fly on its own, s after launch: None for the stack, which flies from the start; the separation’s time for a sustainer.

§until_s: Option<f64>

When it stopped, s after launch: the next powered separation’s time; None for the last vehicle, which flies to the flight’s end.

Implementations§

Source§

impl FlownVehicle<'_>

Source

pub fn mass_samples(&self) -> Vec<MassProperties>

Its mass properties at each instant its center of gravity’s distance from the axis can be largest while it flies: at its start (the stack’s with every motor loaded, as at launch), at each of its motors’ ignitions and burnouts between its start and its end, and at its end; for the stack also with every motor spent (Assembly::dry_mass_properties), as if it flew past every burnout. A motor’s propellant sits on the motor’s own axis, so while one motor burns the center of gravity moves along a straight line in the cross-section, and its distance from the axis is largest at an end of the burn: these instants hold the largest exactly while at most one motor burns at a time. Two off-axis motors burning together at different rates can put a larger distance between them.

Trait Implementations§

Source§

impl<'a> Clone for FlownVehicle<'a>

Source§

fn clone(&self) -> FlownVehicle<'a>

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<'a> Debug for FlownVehicle<'a>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for FlownVehicle<'a>

§

impl<'a> !UnwindSafe for FlownVehicle<'a>

§

impl<'a> Freeze for FlownVehicle<'a>

§

impl<'a> Send for FlownVehicle<'a>

§

impl<'a> Sync for FlownVehicle<'a>

§

impl<'a> Unpin for FlownVehicle<'a>

§

impl<'a> UnsafeUnpin for FlownVehicle<'a>

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> 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.