Skip to main content

CatalogMotor

Struct CatalogMotor 

Source
pub struct CatalogMotor {
Show 19 fields pub motor_id: String, pub manufacturer: String, pub manufacturer_abbrev: String, pub designation: String, pub common_name: String, pub impulse_class: ImpulseClass, pub motor_type: MotorType, pub case_info: Option<String>, pub prop_info: Option<String>, pub delays: Option<String>, pub diameter_mm: f64, pub length_mm: f64, pub total_impulse_ns: f64, pub average_thrust_n: f64, pub max_thrust_n: Option<f64>, pub burn_time_s: f64, pub propellant_mass_g: Option<f64>, pub total_mass_g: Option<f64>, pub curves: Vec<CatalogCurve>,
}
Expand description

One motor’s catalog entry, in the units motor files use.

Fields§

§motor_id: String

ThrustCurve.org’s id for the motor.

§manufacturer: String

Manufacturer name.

§manufacturer_abbrev: String

Manufacturer abbreviation.

§designation: String

Full designation, such as 1266J760-19A.

§common_name: String

Common name, such as J760.

§impulse_class: ImpulseClass

Impulse class letter.

§motor_type: MotorType

Single-use or reload.

§case_info: Option<String>

The case a reload fits, such as Pro54-3G.

§prop_info: Option<String>

The propellant.

§delays: Option<String>

Available delays as written (6,10,14, 4-6, P; the bundled index copies the curve file’s header); see CatalogMotor::delays.

§diameter_mm: f64

Diameter, mm.

§length_mm: f64

Length, mm.

§total_impulse_ns: f64

Total impulse, N·s (ThrustCurve::total_impulse_ns in the bundled index).

§average_thrust_n: f64

Average thrust, N (ThrustCurve::average_thrust_n in the bundled index).

§max_thrust_n: Option<f64>

Peak thrust, N (ThrustCurve::peak_thrust_n in the bundled index).

§burn_time_s: f64

Burn time, s (ThrustCurve::burn_time_s, the NFPA 1125 window, in the bundled index).

§propellant_mass_g: Option<f64>

Propellant mass, g.

§total_mass_g: Option<f64>

Loaded mass, g.

§curves: Vec<CatalogCurve>

The motor’s curves.

Implementations§

Source§

impl CatalogMotor

Source

pub fn delays(&self) -> DelayList

The delay settings read from CatalogMotor::delays; empty when none are recorded.

Source

pub fn thrust_curve( &self, curve: &CatalogCurve, text: &str, ) -> Result<ThrustCurve, MotorError>

Reads a curve of this motor from its file’s text.

§Errors
Source

pub fn motor( &self, curve: &CatalogCurve, text: &str, ) -> Result<SolidMotor, MotorError>

The motor with the curve read from text, built with SolidMotor::from_envelope from this entry’s diameter, length and masses. The curve file’s header is used only for a mass the metadata lacks.

§Errors

As CatalogMotor::thrust_curve and SolidMotor::from_envelope, and MotorError::Inconsistent for a hybrid (hpr models solids only) or when neither the metadata nor the file gives the masses. The text is not checked against the curve’s SHA-256: pass the file the curve names.

Source

pub fn bundled_motor(&self) -> Result<SolidMotor, MotorError>

The motor with its first bundled curve.

§Errors

MotorError::Inconsistent if the entry has no bundled curve file, and CatalogMotor::motor’s errors.

Trait Implementations§

Source§

impl Clone for CatalogMotor

Source§

fn clone(&self) -> CatalogMotor

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 CatalogMotor

Source§

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

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

impl<'de> Deserialize<'de> for CatalogMotor

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 CatalogMotor

Source§

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

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 CatalogMotor

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.