#[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<FinPlanform, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<FinPlanform, <__D as Deserializer<'de>>::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 ==.Source§impl Serialize for FinPlanform
impl Serialize for FinPlanform
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for FinPlanform
Auto Trait Implementations§
impl Freeze for FinPlanform
impl RefUnwindSafe for FinPlanform
impl Send for FinPlanform
impl Sync for FinPlanform
impl Unpin for FinPlanform
impl UnsafeUnpin for FinPlanform
impl UnwindSafe for FinPlanform
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more