Tool 13 · Attitude Dynamics

Rigid Body Rotation Simulator

Simulate spacecraft rotational motion using inertia, applied torque, Euler rotational dynamics, and quaternion attitude propagation. This tool links directly to 6DOF flight dynamics work by showing how torque changes angular velocity and how angular velocity evolves attitude.

What this tool computes

This simulator models a rigid body with principal moments of inertia and body-frame torque. It integrates angular velocity and quaternion attitude through time, then visualizes the attitude evolution using body axes.

  • Body angular velocity \([\omega_x,\omega_y,\omega_z]\)
  • Quaternion attitude history
  • Euler-angle display for interpretation
  • Rotational kinetic energy
  • Angular momentum magnitude
  • 3D final body-axis orientation

Euler rotational dynamics

In the body frame, rigid-body rotational motion is governed by:

\[ \mathbf I\dot{\boldsymbol\omega} + \boldsymbol\omega \times (\mathbf I\boldsymbol\omega) = \boldsymbol\tau \]

For a diagonal inertia matrix, the coupling terms show why rotation about one axis can influence the others when the body is not symmetric.

Quaternion attitude propagation

The attitude is propagated using quaternion kinematics:

\[ \dot{\mathbf q} = \frac{1}{2}\Omega(\boldsymbol\omega)\mathbf q \]

Quaternions are normalized during integration to prevent numerical drift. Euler angles are shown only as an interpretation layer.

Why this matters for GNC

  • Torque does not always create simple one-axis rotation.
  • Inertia ratios strongly affect rotational response.
  • Quaternion propagation avoids Euler-angle singularities.
  • This is the attitude-dynamics core behind reaction wheels, thrusters, and TVC torque models.

Educational simplification

This page uses a diagonal inertia tensor and simple RK4 integration. Real spacecraft also include flexible modes, actuator dynamics, sensor noise, external disturbances, and control laws.

Interactive simulator

Initial angular velocity (deg/s)

Initial attitude quaternion

Constant body-frame torque (N·m)

Presets show how inertia, torque, and initial spin affect attitude evolution.

Results

Final angular velocity

Final Euler angles

Final quaternion

Max angular speed

Final rotational energy

Final angular momentum

Interpretation

Run the simulation to see angular velocity and attitude evolution.

Angular velocity history
Euler-angle display history
Final body-axis orientation

Assumptions and limitations

This simulator assumes:

  • Rigid body with diagonal inertia matrix
  • Constant body-frame torque
  • No external disturbances unless entered as torque
  • No actuator saturation or controller logic
  • Quaternion propagation with numerical normalization