Skip to main content

Finding

Enum Finding 

Source
#[non_exhaustive]
pub enum Finding {
Show 18 variants MotorWiderThanMount { configuration: String, mount: String, motor_diameter_m: f64, mount_inner_diameter_m: f64, }, MotorTightInMount { configuration: String, mount: String, motor_diameter_m: f64, mount_inner_diameter_m: f64, }, MotorOutsideMount { configuration: String, mount: String, }, MotorPastMountTop { configuration: String, mount: String, excess_m: f64, }, AttachmentOffBody { component: String, body: String, }, AttachmentPastBodyEnd { component: String, body: String, excess_m: f64, }, PartOutsideRocket { component: String, }, InternalPartPastParentEnd { component: String, parent: String, excess_m: f64, }, InternalPartWiderThanParent { component: String, parent: String, reach_m: f64, room_m: f64, }, InternalPartTightInParent { component: String, parent: String, reach_m: f64, room_m: f64, }, InternalPartWedgedInParent { component: String, parent: String, reach_m: f64, room_m: f64, widest_room_m: f64, }, PackedPartWiderThanParent { component: String, parent: String, reach_m: f64, room_m: f64, room_widens_aft: bool, }, RingAgainstParentEnd { ring: String, parent: String, reach_m: f64, room_m: f64, }, ClusterTubesOverlap { tube: String, apart_m: f64, diameter_m: f64, }, RingOverlapsInnerTube { ring: String, tube: String, }, CenterOutsideRocket { stage: String, station_m: f64, }, RadiusStep { fore: String, aft: String, fore_radius_m: f64, aft_radius_m: f64, }, NoNoseCone { component: String, },
}
Expand description

A problem found in a design. Serialized with a kind tag.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

MotorWiderThanMount

The motor case is wider than the mount’s inside diameter by more than motor_fit_slack_m allows (error).

Fields

§configuration: String

Configuration id.

§mount: String

Mount id.

§motor_diameter_m: f64

Motor case diameter, m.

§mount_inner_diameter_m: f64

Mount inside diameter, m.

§

MotorTightInMount

The motor’s nominal diameter is wider than the mount’s inside diameter, but by no more than motor_fit_slack_m allows: the real case fits, such as a 29 mm motor in a 1.140 in (28.956 mm) bore (warning).

Fields

§configuration: String

Configuration id.

§mount: String

Mount id.

§motor_diameter_m: f64

The motor’s nominal diameter, m.

§mount_inner_diameter_m: f64

Mount inside diameter, m.

§

MotorOutsideMount

The motor case doesn’t overlap its mount along the axis at all, such as an overhang typed in millimeters as meters (error).

Fields

§configuration: String

Configuration id.

§mount: String

Mount id.

§

MotorPastMountTop

The motor case reaches forward past the mount’s forward end (warning).

Fields

§configuration: String

Configuration id.

§mount: String

Mount id.

§excess_m: f64

How far past, m.

§

AttachmentOffBody

An external part (fin root, tube fins, lug, rail button or pod set) doesn’t overlap the body tube it is attached to at all (error). A pod set of no length touches its tube when it sits between the tube’s ends, and a part on a pod’s tube of no length when it spans the tube’s station.

Fields

§component: String

Component id.

§body: String

Body tube id.

§

AttachmentPastBodyEnd

An external part runs past an end of its body tube (warning). Pods are exempt: a pod hangs from a pylon and often runs past its tube. So is a part on a pod’s tube of no length, which has no length to run past.

Fields

§component: String

Component id.

§body: String

Body tube id.

§excess_m: f64

How far past, m.

§

PartOutsideRocket

An internal part lies wholly forward of the nose tip or aft of the rocket’s end, and touches none of the parts it hangs from (a motor mount may stick out) (error).

Fields

§component: String

Component id.

§

InternalPartPastParentEnd

An internal part runs past an end of its parent (warning).

Fields

§component: String

Component id.

§parent: String

Parent id.

§excess_m: f64

How far past, m.

§

InternalPartWiderThanParent

An internal part reaches farther from its parent’s axis than the parent has room, a tube’s bore or a nose cone’s or transition’s inside radius along the part (for a rigid part the most room along it, for a packed part the least), by more than fit_tolerance_m (error). A centering ring that wraps its parent inner tube, on the tube’s axis with its bore at least the tube’s outside, is measured against what holds the tube instead.

Fields

§component: String

Component id.

§parent: String

The id of the part whose room it needs: its parent, or what holds the tube it wraps.

§reach_m: f64

How far the part reaches from the parent’s axis, m.

§room_m: f64

The room in the parent, m.

§

InternalPartTightInParent

An internal part reaches past the room in its parent by no more than fit_tolerance_m: a fit to sand. The mass where it crosses its parent’s wall counts twice (warning). A ring wrapping its parent tube is measured as for Finding::InternalPartWiderThanParent.

Fields

§component: String

Component id.

§parent: String

The id of the part whose room it needs: its parent, or what holds the tube it wraps.

§reach_m: f64

How far the part reaches from the parent’s axis, m.

§room_m: f64

The room in the parent, m.

§

InternalPartWedgedInParent

An internal part other than a packed part fits inside a nose cone or transition where the profile is widest along the part, to fit_tolerance_m, but reaches into the wall where the profile narrows, past that tolerance: as drawn it can’t slide that far in (warning, #313). It flies where it is drawn, so its mass sits a little nearer the narrow end than it could.

Fields

§component: String

Component id.

§parent: String

Parent id.

§reach_m: f64

How far the part reaches from the parent’s axis, m.

§room_m: f64

The room where the profile is narrowest along the part, m.

§widest_room_m: f64

The room where the profile is widest along the part, m.

§

PackedPartWiderThanParent

A packed part (a mass component, parachute, streamer or shock cord) reaches past the room in its parent, its center inside the room (warning). Its width is how it is packed, which sets only its own share of the rocket’s inertia; its mass, length and station fly as drawn.

Fields

§component: String

Component id.

§parent: String

Parent id.

§reach_m: f64

How far the part reaches from the parent’s axis, m.

§room_m: f64

The room in the parent, m.

§room_widens_aft: bool

Whether the parent has more room aft of the part than along it, as a nose cone or a shoulder does: the part’s mass can sit only farther aft than drawn, so its center of gravity flies forward of where it can be and the stability margin may read high (issue #367). Read as false from a finding saved before it was kept.

§

RingAgainstParentEnd

A centering ring or bulkhead wider than its parent’s room, past fit_tolerance_m, sits at one of its parent’s end faces and fits what holds its parent, to that tolerance: a cap glued against the end, such as a bulkhead sized to the airframe on a coupler’s end. The mass where it crosses its parent’s wall counts twice (warning).

Fields

§ring: String

The ring’s id.

§parent: String

Parent id.

§reach_m: f64

How far the ring reaches from the axis of what holds its parent, m.

§room_m: f64

The room in what holds its parent, m.

§

ClusterTubesOverlap

Two tubes of a cluster are closer than a tube’s diameter, so they cross: the mass where they cross is counted twice and their motors would not fit (warning).

Fields

§tube: String

Inner tube id.

§apart_m: f64

The distance between the closest two tubes’ axes, m.

§diameter_m: f64

The tube’s outer diameter, m.

§

RingOverlapsInnerTube

A centering ring overlaps an inner tube beside it, so the mass where they cross is counted twice; an automatic inner radius only clears on-axis tubes (warning).

Fields

§ring: String

The ring’s id.

§tube: String

The tube’s id.

§

CenterOutsideRocket

A stage with an axial center-of-mass override (cg_aft_m), its own or a component’s, has its center forward of the nose tip or aft of the rocket’s end although every internal part in it is on the rocket, such as a center typed in millimeters as meters (error). Written before the move to US spelling as centre_outside_rocket, which is still read and never written.

Fields

§stage: String

The stage’s id.

§station_m: f64

The center’s station, m.

§

RadiusStep

Adjacent body components’ radii differ where they meet (warning).

Fields

§fore: String

The forward component’s id.

§aft: String

The aft component’s id.

§fore_radius_m: f64

The forward component’s aft radius, m.

§aft_radius_m: f64

The aft component’s forward radius, m.

§

NoNoseCone

The first body component is not a nose cone (warning).

Fields

§component: String

The first component’s id.

Implementations§

Source§

impl Finding

Source

pub fn severity(&self) -> Severity

The finding’s severity.

Source

pub fn describe(&self, name: &dyn Fn(&str) -> String) -> String

The finding as a sentence, without its severity: the parts by name, which is given a component’s, stage’s or configuration’s id; sizes in millimeters.

use hpr_design::checks::Finding;

let finding = Finding::InternalPartPastParentEnd {
    component: "c1".to_owned(),
    parent: "c2".to_owned(),
    excess_m: 0.0508,
};
let name = |id: &str| if id == "c1" { "Shock cord" } else { "Body tube" }.to_owned();
assert_eq!(
    finding.describe(&name),
    "Shock cord runs 50.8 mm past an end of Body tube, which holds it"
);

Trait Implementations§

Source§

impl Clone for Finding

Source§

fn clone(&self) -> Finding

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 Finding

Source§

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

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

impl<'de> Deserialize<'de> for Finding

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 Finding

Source§

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

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 Finding

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.