pub struct PlacedComponent {Show 14 fields
pub id: String,
pub stage: usize,
pub parent: Option<usize>,
pub part: Part,
pub fore_station_m: f64,
pub length_m: f64,
pub finish: Finish,
pub body_radius_m: Option<f64>,
pub motor_mount: Option<MotorMount>,
pub own: MassProperties,
pub with_children: MassProperties,
pub center_overridden: bool,
pub copies: Vec<Placement>,
pub drag_override: Option<DragOverride>,
}Expand description
A component resolved into place.
Fields§
§id: StringThe component’s id.
stage: usizeIndex of its stage in Layout::stages.
parent: Option<usize>Index of its parent in Layout::components; None for a body component of the airframe
(a pod’s body components have their pod set as parent).
part: PartThe part with every automatic dimension filled in.
fore_station_m: f64Station of its forward end (the start of its axial extent), m aft of the nose tip.
length_m: f64Axial extent (Component::length_m: a pod set’s is its pod’s), m.
finish: FinishThe outer surface’s finish (Component::finish, with the default filled in).
body_radius_m: Option<f64>For an external attachment, the radius of the body tube it sits on, m.
motor_mount: Option<MotorMount>Its motor mount, if it is one.
own: MassPropertiesIts own mass properties in body axes, after overrides that cover it alone.
with_children: MassPropertiesIt with everything attached to it, after every override that applies within.
center_overridden: boolWhether its own overrides move its center of mass along the axis (cg_aft_m). Written
before the move to US spelling as centre_overridden, which is still read and never written.
copies: Vec<Placement>Where the copies of it sit, each a Placement of it from where it is written: one
Placement::HERE for a part in no cluster or pod, one per tube for a part inside a
clustered inner tube (InnerTube::cluster_m), and one per
pod, turned with it, for a part in a pod (PodSet::pods); nested, every combination.
Self::own and Self::with_children count every copy. A clustered tube’s own tubes are
its part’s. An empty list is no copy: the part weighs nothing and a motor in it is not
placed.
drag_override: Option<DragOverride>The drag coefficient the component states (Component::drag_override).
Implementations§
Source§impl PlacedComponent
impl PlacedComponent
Sourcepub fn aft_station_m(&self) -> f64
pub fn aft_station_m(&self) -> f64
Station of the aft end of its axial extent, m.
Sourcepub fn contents_copies(&self) -> Result<Vec<Placement>, DesignError>
pub fn contents_copies(&self) -> Result<Vec<Placement>, DesignError>
Where the copies of what it holds sit, from where that is written: for a clustered inner tube, every tube of every copy of it; for a pod set, every pod of every copy of it; for any other part, its own copies. A motor in a clustered mount, or in a pod, is one motor per place.
§Errors
DesignError::Domain for a cluster offset that is not finite, or a pod set’s errors from
PodSet::pods.
Trait Implementations§
Source§impl Clone for PlacedComponent
impl Clone for PlacedComponent
Source§fn clone(&self) -> PlacedComponent
fn clone(&self) -> PlacedComponent
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 PlacedComponent
impl Debug for PlacedComponent
Source§impl<'de> Deserialize<'de> for PlacedComponent
impl<'de> Deserialize<'de> for PlacedComponent
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 PlacedComponent
impl PartialEq for PlacedComponent
Source§fn eq(&self, other: &PlacedComponent) -> bool
fn eq(&self, other: &PlacedComponent) -> bool
self and other values to be equal, and is used by ==.