#[non_exhaustive]pub enum FinPlanform {
Trapezoidal {
root_chord_m: f64,
tip_chord_m: f64,
span_m: f64,
sweep_m: f64,
},
Elliptical {
root_chord_m: f64,
span_m: f64,
},
Freeform {
points_m: Vec<[f64; 2]>,
root_m: Vec<[f64; 2]>,
},
}Expand description
The outline of one fin.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Trapezoidal
A trapezoid with its tip chord parallel to the root.
Fields
Elliptical
Half an ellipse on the root chord.
Freeform
A polygon given as [x, h] points from the root leading edge, which must be [0, 0],
around to the root trailing edge [c_r, h_r] with c_r > 0 and h_r ≥ 0, closed along
the root; x runs aft and h outward, in meters. On a body tube the root is level,
h_r = 0; on a nose cone or a transition it follows the surface, through root_m.
Implementations§
Source§impl FinPlanform
impl FinPlanform
Sourcepub fn root_chord_m(&self) -> f64
pub fn root_chord_m(&self) -> f64
Root chord, m.
Sourcepub fn validate(&self) -> Result<(), DesignError>
pub fn validate(&self) -> Result<(), DesignError>
Checks dimensions, and that a freeform outline is a simple polygon, nowhere below the root leading edge, that starts and ends on the root.
§Errors
Sourcepub fn chords_at(&self, h: f64, out: &mut Vec<(f64, f64)>)
pub fn chords_at(&self, h: f64, out: &mut Vec<(f64, f64)>)
The chord intervals (a, b) at span h (m outward from the root), sorted along x (m aft
of the root leading edge), replacing the contents of out. A span at or beyond the tip
gives none. The planform should be valid (FinPlanform::validate).
Sourcepub fn geometry(&self) -> Result<PlanformGeometry, DesignError>
pub fn geometry(&self) -> Result<PlanformGeometry, DesignError>
Area and centroid of the planform.
§Errors
As FinPlanform::validate, or DesignError::Numerics if an integral fails.
Trait Implementations§
Source§impl Clone for FinPlanform
impl Clone for FinPlanform
Source§fn clone(&self) -> FinPlanform
fn clone(&self) -> FinPlanform
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 FinPlanform
impl Debug for FinPlanform
Source§impl<'de> Deserialize<'de> for FinPlanform
impl<'de> Deserialize<'de> for FinPlanform
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 JsonSchema for FinPlanform
impl JsonSchema for FinPlanform
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for FinPlanform
impl PartialEq for FinPlanform
Source§fn eq(&self, other: &FinPlanform) -> bool
fn eq(&self, other: &FinPlanform) -> bool
self and other values to be equal, and is used by ==.