pub trait BodyStep: Sealed {
// Required methods
fn start_s(&self) -> f64;
fn end_s(&self) -> f64;
fn sample(&self, t_s: f64) -> Result<BodySample, SimError>;
fn acceleration_enu_m_s2(&self, t_s: f64) -> Result<DVec3, SimError>;
fn specific_force_enu_m_s2(&self, t_s: f64) -> Result<DVec3, SimError>;
}Expand description
One accepted integration step of a separated body, flown as a point mass.
Sealed: only the library implements it, so a method added here breaks no outside code. An
Observer receives it; nothing outside builds one.
Required Methods§
Sourcefn sample(&self, t_s: f64) -> Result<BodySample, SimError>
fn sample(&self, t_s: f64) -> Result<BodySample, SimError>
The body at t_s, inside the step, from the integrator’s dense output.
§Errors
Whatever the atmosphere or the frame returns.
Sourcefn acceleration_enu_m_s2(&self, t_s: f64) -> Result<DVec3, SimError>
fn acceleration_enu_m_s2(&self, t_s: f64) -> Result<DVec3, SimError>
Its acceleration in the launch frame at t_s, m/s²: the point mass’s equation of motion
(docs/physics/recovery.md).
§Errors
As Self::sample.
Sourcefn specific_force_enu_m_s2(&self, t_s: f64) -> Result<DVec3, SimError>
fn specific_force_enu_m_s2(&self, t_s: f64) -> Result<DVec3, SimError>
Its specific force at t_s, m/s²: the force on it other than gravity over its mass, here
the drag of its open devices alone, −½ ρ (C_D S) |v − w| (v − w) / m, a point mass having
no thrust and no airframe drag (docs/physics/recovery.md). With nothing open it is zero.
Under its devices the mass times this is the opening force, as the stack’s
crate::Sample::specific_force_enu_m_s2 is.
§Errors
As Self::sample.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".