Gimballed Ship Compass

2D companion of the gimballed compass: a damped needle seeks north while a gimbal keeps the bowl level, and the dip of the magnetic field is what makes a tilted card lie.

Switch to 3D

Presets

Playback

Apparatus

Model checks

The science

What is modelled

The needle is a torsion oscillator pulled to magnetic north by a spring-like torque and slowed by damping. The gimbal is a second damped oscillator that tries to hold the bowl horizontal while the hull rolls. The Earth's field has a horizontal part that steers the card and a downward part that, on a tilted card, pulls the needle sideways. The spring, damping and gimbal constants are those of the 3D page; magnetic dip and wave roll are added here.

Equations

  • Needle θ'' = -k (θ - θn) - c d θ' with k = 7.8 s-2, c = 2.25 s-1, damping slider d; ζ = c d / (2 √k), overshoot exp(-π ζ / √(1 - ζ2)).
  • Gimbal x'' = 70 (-φ - x) - 14 x'; the left-over tilt for a roll of period T is |s(s + 14) / (s2 + 14 s + 70)| at s = 2πi/T.
  • Field B = (H, 0, Z) with dip I = atan(Z/H); a card rolled by φ reads atan2(H sin b cos φ - Z sin φ, H cos b) for bearing b.

Checks run in the page

  • Stepped needle kick against the overshoot and the peak time from theory.
  • Vector construction of the tilted card against the closed form on 24 bearings, and a level ship reading exactly.
  • Stepped gimbal response in a seaway against the transfer function.
  • The field vector against the chosen dip.

Honest simplifications

No hull magnetism or deviation, no heeling error from iron, no liquid in the bowl, no acceleration errors from turns or speed, a single linear pendulum for the gimbal, and the needle is a one-axis oscillator. The dip angle is a free input, not read from a field model. This is a teaching model, not a navigation instrument.

What to try
  • Choose Underdamped needle and watch it ring for many swings; raise the damping to 2.5 and it creeps instead.
  • Choose Near the magnetic pole: the same tilt gives a much bigger heading error.
  • Choose Heavy seaway: the gimbal removes most of the roll at long periods but passes more of it at short periods.
Heading error without a gimbal
Heading error against magnetic dip
Needle ring-down after a kick
Residual tilt against wave period
Made with 🤖 ChatGPT