Expand description
A free rigid body of fixed mass and inertia, with no design, motor or aerodynamics: the flight’s gravity, Earth rotation, rigid-body equations and integrator on a body a test gives.
It exists to fly published check cases whose bodies are not rockets, such as NASA’s dragless
sphere and tumbling brick (NASA/TM-2015-218675, cases 1 to 3 and 6 to 10), through the code a
rocket flies on. Nothing here is a second model: the weight and the Coriolis force come from
the Environment’s Earth, as crate::dynamics takes them, the air and the wind from the
environment at the height a rocket’s flight reads them at, the two accelerations from that
module’s free-flight equations, and the steps from crate::integrator. A test holds the
derivative to the one a coasting rocket’s flight evaluates at the same state.
The caller may add loads of its own (FreeBodyLoads): a force F through the center of
mass and a moment M about it, in body axes, formed from the state, the air there and the
velocity through it (LoadInputs). A check case’s constant drag or damping coefficient is
such a load; the body has no aerodynamics of its own.
With the reference point at the center of mass, a constant mass m and a constant inertia I
about it, and no load but gravity g, the Coriolis force and the caller’s, the equations of
crate::dynamics reduce to Newton’s and Euler’s:
a = g(x) − 2 Ω × v + q F / m
ω̇ = I⁻¹ (M − ω × I ω)
q̇ = ½ q ⊗ ωx and v are the center of mass’s position and velocity in the launch frame L, Ω the
Earth’s rate, q the attitude (body to L) and ω the angular velocity relative to L in
body axes. As in a rocket’s flight, the Earth’s rate enters the translation only: the
rotational equations treat L as inertial (the decision record on rigid-body flight,
ADR-011). Source: the equations of motion on the page
Rigid-body flight, which cites RocketPy’s derivation.
Structs§
- Free
Body - A rigid body of fixed mass and inertia.
- Load
Inputs - What a free body’s loads are formed from at one state, read as a rocket’s flight reads them: the air and the wind at the center of mass’s height above mean sea level.
- Loads
- A force through the center of mass and a moment about it, in body axes.
- NoLoads
- No load but gravity and the Coriolis force.
Constants§
- FREE_
BODY_ INERTIA_ NOT_ FINITE SimError::Domain’swhatfor an inertia tensor with an entry that is not finite; the value is the entry.- FREE_
BODY_ INERTIA_ NOT_ POSITIVE SimError::Domain’swhatfor an inertia tensor that is not positive definite; the value is the leading principal minor that is not positive.- FREE_
BODY_ INERTIA_ NOT_ SYMMETRIC SimError::Domain’swhatfor an inertia tensor that is not symmetric; the value is the largest difference between an entry and its mirror, kg·m².- FREE_
BODY_ LOAD_ NOT_ FINITE SimError::Domain’swhatfor a caller’s load with a component that is not finite; the value is the component.- FREE_
BODY_ MASS_ REFUSED SimError::Domain’swhatfor a mass that is not finite and positive.- FREE_
BODY_ TIME_ REFUSED SimError::Domain’swhatfor a sample time that is not finite, comes before the start or comes before the sample ahead of it; the value is the time, s.
Traits§
- Free
Body Loads - The loads a caller puts on a free body, formed at each state the integrator evaluates. Any
Fn(&LoadInputs) -> Result<Loads, SimError>is one;NoLoadsis none.