pub struct RailButton {
pub outer_diameter_m: f64,
pub inner_diameter_m: f64,
pub height_m: f64,
pub base_height_m: f64,
pub flange_height_m: f64,
pub screw_height_m: f64,
pub angle_rad: f64,
pub count: u32,
pub spacing_m: f64,
pub material: Material,
}Expand description
A rail button: a base disc on the airframe, a narrower waist, and a flange that rides in the rail, stacked outward along a radial line, with the screw’s dome head on top of the flange.
Fields§
§outer_diameter_m: f64Diameter of the base and the flange, m.
inner_diameter_m: f64Diameter of the waist, m.
height_m: f64Total height above the airframe, m.
base_height_m: f64Height of the base, m.
flange_height_m: f64Height of the flange, m.
screw_height_m: f64Height of the screw’s head above the flange, m: a dome, half an ellipsoid as wide as the button, its mass in the button’s (0 for none). It has no drag of its own, as OpenRocket 24.12 gives it none (ADR-168).
angle_rad: f64Roll angle from x_B toward y_B, rad.
count: u32Number of buttons in a row, 1 to 64 (MAX_INSTANCES).
spacing_m: f64Axial distance between the forward edges of consecutive buttons, m.
material: MaterialMaterial (bulk).
Implementations§
Source§impl RailButton
impl RailButton
Sourcepub fn mass_properties(
&self,
body_radius_m: f64,
) -> Result<MassProperties, DesignError>
pub fn mass_properties( &self, body_radius_m: f64, ) -> Result<MassProperties, DesignError>
Mass properties in the button’s frame (origin on the body axis at the button’s forward
edge), on a body of radius body_radius_m. Each disc is a solid cylinder whose axis points
outward. The screw’s head is half a solid ellipsoid of revolution on the flange, of the
button’s outer radius a and the screw’s height h along its axis: volume 2/3 π a² h,
its center of mass 3h/8 above its base, its moment of inertia 2/5 m a² about its axis
and m (a²/5 + 19 h²/320) across it through its center of mass (half the ellipsoid’s
m (a² + h²)/5 about its base’s diameter, moved by the parallel-axis theorem). OpenRocket
24.12 has the same volume, measured to 2e-16, and puts the head’s center 4h/3π above the
flange, 0.049 h further out (ADR-168).
§Errors
Geometry and material errors, including a base and flange taller than the button or a waist wider than the flange.
Trait Implementations§
Source§impl Clone for RailButton
impl Clone for RailButton
Source§fn clone(&self) -> RailButton
fn clone(&self) -> RailButton
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 RailButton
impl Debug for RailButton
Source§impl<'de> Deserialize<'de> for RailButton
impl<'de> Deserialize<'de> for RailButton
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 RailButton
impl JsonSchema for RailButton
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 RailButton
impl PartialEq for RailButton
Source§fn eq(&self, other: &RailButton) -> bool
fn eq(&self, other: &RailButton) -> bool
self and other values to be equal, and is used by ==.