Gimballed Ship Compass

2D twin of the 3D gimballed compass: a gravity-restored pendulum bowl that stays level on a rolling hull, and a damped magnetic needle, with the identical constants and update step.

Presets

Playback

Sea, gimbal and compass

The bowl behaves like a damped pendulum with natural frequency 5.2 rad/s (period 1.21 s): waves much slower than that are filtered out, waves near it are amplified unless damping is high. The needle is a separate damped dipole with natural frequency 3.7 rad/s.

Gimbal

Model checks

The science

What is modelled

The hull rolls and pitches sinusoidally with a slowly modulated amplitude. The gimballed bowl hangs from pivots and is restored toward the vertical by gravity, with viscous damping. The magnetic needle is a damped dipole that is pulled toward the magnetic bearing by a restoring torque proportional to the sine of its misalignment.

Equations

  • Gimbal: θ'' = -ωn² sin(θ + roll) - 2ζωn θ', with ωn = 5.2 rad/s.
  • Needle: α'' = -ωm² sin(α - target) - 2ζmωm α'.
  • Isolation ratio (small angles): r √(r² + 4ζ²) / √((1 - r²)² + (2ζr)²), with r = ωwave/ωn.

Checks run in the page

  • Free gimbal period 2 pi / wn.
  • Forced response against the closed-form isolation ratio.
  • Damped needle period.
  • Energy of the undamped finite-amplitude pendulum.

Honest simplifications

Two uncoupled pendulum axes, a prescribed roll motion that ignores the ship's own dynamics, no deviation or variation, no acceleration errors and no magnetic dip. It teaches the mechanics of the gimbal; it is not a navigation instrument model.

What to try
  • Press Resonant swell: with the wave period near 1.2 s the bowl tilt exceeds the hull roll.
  • Press Heavy sea and compare the bowl tilt with the hull roll, then lock the gimbal.
  • Press Over-damped and watch the bowl follow the hull slowly.
Hull roll and bowl tilt from vertical
Needle error from the magnetic bearing
Roll-isolation curve (bowl tilt / hull roll)
Bowl tilt as a share of the peak hull roll
Made with 🤖 ChatGPT