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: StringThrustCurve.org’s id for the motor.
manufacturer: StringManufacturer name.
manufacturer_abbrev: StringManufacturer abbreviation.
designation: StringFull designation, such as 1266J760-19A.
common_name: StringCommon name, such as J760.
impulse_class: ImpulseClassImpulse class letter.
motor_type: MotorTypeSingle-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: f64Diameter, mm.
length_mm: f64Length, mm.
total_impulse_ns: f64Total impulse, N·s (ThrustCurve::total_impulse_ns in the bundled index).
average_thrust_n: f64Average 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: f64Burn 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
impl CatalogMotor
Sourcepub fn delays(&self) -> DelayList
pub fn delays(&self) -> DelayList
The delay settings read from CatalogMotor::delays; empty when none are recorded.
Sourcepub fn thrust_curve(
&self,
curve: &CatalogCurve,
text: &str,
) -> Result<ThrustCurve, MotorError>
pub fn thrust_curve( &self, curve: &CatalogCurve, text: &str, ) -> Result<ThrustCurve, MotorError>
Reads a curve of this motor from its file’s text.
§Errors
MotorError::Inconsistentifcurveis not one of this motor’s curves, or the file doesn’t hold exactly one motor.- The format’s parse error (
eng::parse,rse::parse). ThrustCurve::new’s errors.
Sourcepub fn motor(
&self,
curve: &CatalogCurve,
text: &str,
) -> Result<SolidMotor, MotorError>
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.
Sourcepub fn bundled_motor(&self) -> Result<SolidMotor, MotorError>
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
impl Clone for CatalogMotor
Source§fn clone(&self) -> CatalogMotor
fn clone(&self) -> CatalogMotor
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CatalogMotor
impl Debug for CatalogMotor
Source§impl<'de> Deserialize<'de> for CatalogMotor
impl<'de> Deserialize<'de> for CatalogMotor
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>,
Source§impl PartialEq for CatalogMotor
impl PartialEq for CatalogMotor
Source§fn eq(&self, other: &CatalogMotor) -> bool
fn eq(&self, other: &CatalogMotor) -> bool
self and other values to be equal, and is used by ==.