🚁

3D Gimbal

Visualization
Run the live example Free · no sign-up · runs in your browser

The Gimbal3D block provides real-time three-dimensional attitude visualization of aerospace, maritime, and robotic systems. It renders a hardware-accelerated WebGL scene containing three concentric nested gimbal rings that orient dynamically in response to Roll, Pitch, and Yaw angular input signals.

As a dedicated visualization sink, the Gimbal3D block does not modify signal values or impose numerical constraints on the simulation engine. It provides intuitive spatial feedback for attitude control systems, flight simulators, drone autopilots, and robotic end-effector stabilization loops.

Mathematical Model

R(ϕ,θ,ψ)=Rz(ψ)Rx(θ)Ry(ϕ)\mathbf{R}(\phi, \theta, \psi) = \mathbf{R}_z(\psi) \mathbf{R}_x(\theta) \mathbf{R}_y(\phi)

The transformation maps angular inputs in degrees to orthogonal rotation matrices:

ϕ=π180uroll,θ=π180upitch,ψ=π180uyaw\phi = \frac{\pi}{180} u_{\text{roll}}, \quad \theta = \frac{\pi}{180} u_{\text{pitch}}, \quad \psi = \frac{\pi}{180} u_{\text{yaw}}
Rz(ψ)=[cos⁡ψ−sin⁡ψ0sin⁡ψcos⁡ψ0001],Rx(θ)=[1000cos⁡θ−sin⁡θ0sin⁡θcos⁡θ],Ry(ϕ)=[cos⁡ϕ0sin⁡ϕ010−sin⁡ϕ0cos⁡ϕ]\mathbf{R}_z(\psi) = \begin{bmatrix} \cos\psi & -\sin\psi & 0 \\ \sin\psi & \cos\psi & 0 \\ 0 & 0 & 1 \end{bmatrix}, \quad \mathbf{R}_x(\theta) = \begin{bmatrix} 1 & 0 & 0 \\ 0 & \cos\theta & -\sin\theta \\ 0 & \sin\theta & \cos\theta \end{bmatrix}, \quad \mathbf{R}_y(\phi) = \begin{bmatrix} \cos\phi & 0 & \sin\phi \\ 0 & 1 & 0 \\ -\sin\phi & 0 & \cos\phi \end{bmatrix}

Inputs & Outputs

Direction ID Label Type Status
→ In roll Roll number Required
→ In pitch Pitch number Required
→ In yaw Yaw number Required

Usage Examples

Example 1: Aircraft Attitude Visualization

Outputs from a 6-DOF flight dynamics model (ϕ,θ,ψ\phi, \theta, \psi) are routed directly to the Roll, Pitch, and Yaw ports to visualize aircraft bank, pitch trim, and heading in real time.

Example 2: IMU Gyroscope Rate Integration

Angular rate signals from a triaxial gyroscope (ωx,ωy,ωz\omega_x, \omega_y, \omega_z) are passed through three Integrator blocks with degree conversion gains to animate orientation tracking.

Remarks & Best Practices

  • Input units: Angular inputs are interpreted in degrees. When upstream simulation models compute angles in radians, scale the signal by 180/π≈57.2958180/\pi \approx 57.2958.
  • Aerospace convention: Rings follow the standard Z-X-Y intrinsic Euler sequence: yaw rotates the outer ring, pitch tilts the intermediate ring, and roll rotates the inner ring.
  • Unconnected inputs: Any unconnected input port defaults to zero degrees, holding that rotational axis stationary while active ports rotate.
  • Hardware acceleration: Rendered via Three.js and WebGL directly on the client GPU, ensuring smooth frame rates without affecting solver execution speed.

Related Components

  • uPlotDisplay: Time-series strip chart for logging continuous angular trajectories and tracking errors.
  • Integrator: Computes orientation angles by integrating angular velocity signals over time.
  • NumericDisplay: Shows numerical digital readouts of instantaneous pitch, roll, or heading angles.