-
Notifications
You must be signed in to change notification settings - Fork 0
Equations
This mirrors docs/equations.md in the main repository — kept here for
quick reference without cloning. See src/simulator/equations_of_motion.py
for the implementation.
u̇ = Tx/m − g·sinθ − Qw + Rv
v̇ = Ty/m + g·cosθ·sinφ − Ru + Pw
ẇ = Tz/m + g·cosθ·cosφ − Pv + Qu
Newton's second law in a rotating (body-fixed) frame. The -Qw+Rv-type
terms are not extra forces — they appear from differentiating a vector in a
rotating frame ((dv/dt)_inertial = (dv/dt)_body + ω×v). [Tx Ty Tz] is
thrust + aerodynamic force in body axes; the g·(...) terms resolve gravity
through the current attitude.
Ixx·ṗ = L − (Izz−Iyy)·q·r
Iyy·q̇ = M − (Ixx−Izz)·r·p
Izz·ṙ = N − (Iyy−Ixx)·p·q
Shown for the paper's axisymmetric-body case (Iyy=Izz, zero cross-products
of inertia). L, M, N are aerodynamic moments. The gyroscopic coupling
terms mean a spinning body's pitch and yaw motions are coupled — a classic
feature of spin-stabilized projectile dynamics ("coning"/epicyclic motion).
This coupling frequency scales with (Izz−Ixx)·p/Iyy and can be much faster
than the trajectory's overall timescale — see Model and the
timestep-sensitivity discussion below.
⎡φ̇⎤ ⎡1 sinφ·tanθ cosφ·tanθ⎤ ⎡P⎤
⎢θ̇⎥ = ⎢0 cosφ -sinφ ⎥ ⎢Q⎥
⎣ψ̇⎦ ⎣0 sinφ·secθ cosφ·secθ⎦ ⎣R⎦
Converts body-frame angular velocity into the rate of change of the attitude description. Singular at θ=±90° (gimbal lock).
[Ṅ Ė Ḋ]ᵀ = L_BE · [u v w]ᵀ
Rotates body-axis velocity into the local geodetic frame to update range,
drift, and altitude (= -D). The "altitude ≤ 0" condition on D is what
stops the simulation at ground impact.
[P Q R]ᵀ = [p q r]ᵀ + L_BE⁻¹·[(ωE+ψ̇)cosλ, 0, -(ωE+ψ̇)sinλ]ᵀ
Adds Earth's angular velocity (resolved into body axes) to the relative
body rates to get total (inertial) body rates. Disabled by default
(include_earth_rotation=False).
None of the above has a closed-form solution — this is a coupled, nonlinear,
non-autonomous (time-varying mass/thrust) 12-state ODE system, integrated
numerically. See Model's numerical-integration section and the
main repo's docs/numerical-methods.md for the full Euler/RK4/solve_ivp
comparison and stability discussion.
RocketDynamicsLab