Skip to main content

AddedMass

Struct AddedMass 

Source
pub struct AddedMass {
    pub mass_kg: f64,
    pub cg_aft_m: Option<f64>,
}
Expand description

Mass a stage carries beyond what its parts weigh, such as glue and paint weighed on the finished rocket: a point mass added to the stage’s parts, motors not counted.

With parts of mass m_p whose center of mass is at station x_p, and an added mass m_a:

  • No station (cg_aft_m is None): the point sits at the parts’ center of mass. The stage weighs m_p + m_a; its center and its inertia about that center are the parts’.
  • A station s aft of the stage’s forward end x_0: the point sits at x_a = x_0 + s along the axis, as far off the axis as the parts’ center of mass is: on it when that center is, as on any rocket that is the same all the way round, and when the parts weigh nothing. The stage weighs m_p + m_a, its center is at (m_p x_p + m_a x_a) / (m_p + m_a), and its inertia about that center is the parts’ and the point’s by the parallel-axis theorem (MassProperties::combine).

The stage’s Overrides apply afterward, to the parts and the added mass together.

This is how OpenRocket 24.12 weighs a stage’s mass override that doesn’t cover the stage’s parts (<overridesubcomponentsmass>false</overridesubcomponentsmass>, or no flag written). Its user guide says such a value “is added to the calculated value” (Overrides and Surface Finish); where the mass goes is measured on probe designs, which hold this rule’s mass, center and inertia to OpenRocket’s structure (the decision record): at the center of the stage’s own parts, or at the stage’s center of gravity override when that doesn’t cover the parts either. A motor aboard doesn’t move it in OpenRocket, and a Layout holds no motor.

A parallel stage’s added mass is one point for the whole set of pods, not one for each: with no station at the pods’ center, and with one that far aft of the parallel stage’s forward end, as far off the axis as the pods’ center is. That is OpenRocket 24.12’s too, measured with three boosters and with one (the decision record).

The stage a parallel stage hangs on can carry an added mass at a station: a point among that stage’s own parts. Rocket::layout refuses one there with no station, and one at a station beside a parallel stage of one pod off the axis. OpenRocket weighs such a stage with what hangs on it. With no station its point sits at the center of the stage and its pods together, and moves when the pods drop. At a station beside one pod off the axis it sits as far off the axis as that center, and on the axis once the pod is gone. A stage here is one body that keeps its center.

An added mass of zero changes nothing. One above zero with no station, on a stage whose parts weigh nothing, has no place to sit, and Rocket::layout refuses it.

Fields§

§mass_kg: f64

The mass added, kg.

§cg_aft_m: Option<f64>

How far aft of the stage’s forward end it sits, m, as far off the axis as the center of mass of the stage’s parts is: on the axis when that center is. None puts it at that center.

Implementations§

Source§

impl AddedMass

Source

pub fn add_to( &self, parts: MassProperties, fore_station_m: f64, ) -> Result<MassProperties, DesignError>

parts with this mass added, a station measured from fore_station_m.

§Errors

DesignError::Domain for a negative or non-finite mass, a non-finite station, or a mass with no station added to parts that weigh nothing.

Trait Implementations§

Source§

impl Clone for AddedMass

Source§

fn clone(&self) -> AddedMass

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 Copy for AddedMass

Source§

impl Debug for AddedMass

Source§

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

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

impl<'de> Deserialize<'de> for AddedMass

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 JsonSchema for AddedMass

Source§

fn schema_name() -> Cow<'static, str>

The name of the generated JSON Schema. Read more
Source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
Source§

fn json_schema(generator: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
Source§

fn inline_schema() -> bool

Whether JSON Schemas generated for this type should be included directly in parent schemas, rather than being re-used where possible using the $ref keyword. Read more
Source§

impl PartialEq for AddedMass

Source§

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

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 AddedMass

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.