Skip to content

Equations

timeout187 edited this page Jul 9, 2026 · 1 revision

Equations, Term by Term

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.

Eq. (1): Translational dynamics

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.

Euler's Equation: Rotational dynamics (axisymmetric case)

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.

Kinematics equation: Euler angle rates

⎡φ̇⎤   ⎡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).

Navigation equation: position rates

[Ṅ Ė Ḋ]ᵀ = 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.

Eq. (3): Earth's rotation effect (optional)

[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).

Numerical integration of these equations

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.

Clone this wiki locally