pub struct Assembly {
pub configuration: String,
pub layout: Layout,
pub motors: Vec<PlacedMotor>,
}Expand description
A rocket with one configuration’s motors in place.
Fields§
§configuration: StringThe configuration’s id.
layout: LayoutThe resolved structure.
motors: Vec<PlacedMotor>The motors.
Implementations§
Source§impl Assembly
impl Assembly
Sourcepub fn mass_properties(&self, t_s: f64) -> MassProperties
pub fn mass_properties(&self, t_s: f64) -> MassProperties
The rocket t_s seconds after ignition: the structure and every motor, but for a motor
that fails (PlacedMotor::fails), which stays loaded. Every other motor is taken as lit,
even one waiting on a mount whose every motor fails; Self::mass_properties_lit with
Self::ignition_times_s gives the flight’s.
Sourcepub fn mass_properties_lit(
&self,
t_s: f64,
ignition_s: &[Option<f64>],
) -> MassProperties
pub fn mass_properties_lit( &self, t_s: f64, ignition_s: &[Option<f64>], ) -> MassProperties
The rocket at flight time t_s, each motor lit at its ignition_s, one per motor in
order (Self::ignition_times_s): None for one that never lights, which stays loaded.
A motor past the end of ignition_s is taken as lit at launch, as
Self::mass_properties lights them all.
Sourcepub fn mass_properties_lit_on(
&self,
structure: MassProperties,
t_s: f64,
ignition_s: &[Option<f64>],
) -> MassProperties
pub fn mass_properties_lit_on( &self, structure: MassProperties, t_s: f64, ignition_s: &[Option<f64>], ) -> MassProperties
As Self::mass_properties_lit, with structure in place of the layout’s: the
structure with a part taken out, say (MassProperties::without_part).
Sourcepub fn ignition_times_s(
&self,
separated_s: impl Fn(usize) -> Option<f64>,
) -> Vec<Option<f64>>
pub fn ignition_times_s( &self, separated_s: impl Fn(usize) -> Option<f64>, ) -> Vec<Option<f64>>
Each motor’s ignition time on the flight’s clock, in order: None for one that never
lights. separated_s(stage) gives the time at which the stage aft of stage came away, if
it has; Ignition::Separation counts from it.
A motor lit by another mount’s burnout lights when one of that mount’s motors that lights
has a known ignition; a chain that never reaches a known time (a cycle is refused by
Layout::place_motors, so only a separation that never comes, or a mount whose every
motor fails) leaves it unlit. A motor that fails (PlacedMotor::fails) never lights.
Sourcepub fn dry_mass_properties(&self) -> MassProperties
pub fn dry_mass_properties(&self) -> MassProperties
The rocket with every motor spent: the structure and the motors’ dry masses, but for a
motor that fails (PlacedMotor::fails), which is carried loaded.