pub struct RseEngine {Show 20 fields
pub manufacturer: String,
pub code: String,
pub motor_type: Option<String>,
pub diameter_mm: f64,
pub length_mm: f64,
pub initial_mass_g: f64,
pub propellant_mass_g: f64,
pub delays: Option<String>,
pub auto_calc_mass: Option<bool>,
pub auto_calc_cg: Option<bool>,
pub average_thrust_n: Option<f64>,
pub peak_thrust_n: Option<f64>,
pub throat_diameter_mm: Option<f64>,
pub exit_diameter_mm: Option<f64>,
pub total_impulse_ns: Option<f64>,
pub burn_time_s: Option<f64>,
pub mass_fraction_pct: Option<f64>,
pub isp_s: Option<f64>,
pub comments: Option<String>,
pub points: Vec<RsePoint>,
}Expand description
One engine in a .rse file. Optional attributes the file doesn’t give are None.
Fields§
§manufacturer: Stringmfg: the manufacturer, verbatim (real files have leading spaces and commas).
code: Stringcode: the engine’s designation, the lookup key.
motor_type: Option<String>Type: single-use, reloadable, hybrid or other text.
diameter_mm: f64dia: diameter, mm.
length_mm: f64len: length, mm.
initial_mass_g: f64initWt: loaded motor mass, g.
propellant_mass_g: f64propWt: propellant mass, g.
delays: Option<String>delays: the delay string as written, such as 6,10,14; see RseEngine::delays.
auto_calc_mass: Option<bool>auto-calc-mass: RockSim computes the mass curve itself.
auto_calc_cg: Option<bool>auto-calc-cg: RockSim holds the CG at the engine’s center.
average_thrust_n: Option<f64>avgThrust: average thrust, N.
peak_thrust_n: Option<f64>peakThrust: peak thrust, N.
throat_diameter_mm: Option<f64>throatDia: nozzle throat diameter, mm (zero in every observed file).
exit_diameter_mm: Option<f64>exitDia: nozzle exit diameter, mm (zero in every observed file).
total_impulse_ns: Option<f64>Itot: total impulse, N·s.
burn_time_s: Option<f64>burn-time: burn time, s.
mass_fraction_pct: Option<f64>massFrac: propellant mass fraction, %.
isp_s: Option<f64>Isp: specific impulse, s.
comments: Option<String><comments> text, verbatim.
points: Vec<RsePoint>The samples, as listed.
Implementations§
Source§impl RseEngine
impl RseEngine
Sourcepub fn delays(&self) -> DelayList
pub fn delays(&self) -> DelayList
The delay settings read from RseEngine::delays; empty when the file gives none.
Sourcepub fn thrust_curve(&self) -> Result<ThrustCurve, MotorError>
pub fn thrust_curve(&self) -> Result<ThrustCurve, MotorError>
The engine’s thrust curve.
§Errors
As ThrustCurve::new: negative thrust, decreasing time, or no thrust.