🌊 Research submarine: active sonar

Press Ping: a sound pulse leaves the boat at the speed of sound in water, bounces off rocks, a wreck and fish schools, and comes back. Range = c·t/2. Change water and ping settings to see what the sonar can still detect.

Echo display (range vs echo level; dashed line = detection threshold)
The science

Sound speed (Mackenzie 1981): c = 1448.96 + 4.591T − 5.304·10⁻²T² + 2.374·10⁻⁴T³ + 1.340(S−35) + 1.630·10⁻²D + 1.675·10⁻⁷D² − 1.025·10⁻²T(S−35) − 7.139·10⁻¹³TD³ (T °C, S ppt, D m). A pulse needs t = 2r/c to return from range r, so r = c·t/2. Spreading loss TL = 20·log₁₀r + α·r (spherical spreading plus absorption); absorption α in dB/km from Thorp's formula, f in kHz: 0.11f²/(1+f²) + 44f²/(4100+f²) + 2.75·10⁻⁴f² + 0.003. Passive sonar equation for an echo: EL = SL − 2·TL + TS, detected when EL ≥ NL + DT (here fixed at 70 dB). TS (target strength) values are assumed: wreck 25 dB, rock 12 dB, fish school 6 dB. Simplifications: straight rays (no refraction by the sound-speed profile), no seabed or surface reflections, one fixed noise level, 1 world unit = 20 m, and time is slowed so you can watch the pulse. Educational acoustics only: no real vessel or system is modelled. The panel shows the measured range from the echo delay next to the true distance as a check.

Drag: rotate · wheel / pinch: zoom · right-drag: pan