A sonar transducer emits a short acoustic pulse; it travels
through water, reflects off the seafloor or a shoal,
and returns as an echo. Depth = (speed × travel time) / 2 — the
basis of echo-sounding and biological-acoustics surveys alike.
Speed of sound in water isn't fixed at ≈1500 m/s — it depends on
temperature and salinity. This sim uses a simplified empirical
formula: c ≈ 1449 + 4.6·T − 0.055·T² + 1.39·(S − 35),
where T is water temperature (°C) and S is salinity (ppt).
- Seafloor depth — sets how far the pulse must travel before it bounces back.
- Pulse rate — how often the transducer fires a new ping.
- Water temp — warmer water raises the speed of sound, shortening echo travel time.
- Salinity — saltier water is slightly denser and stiffer, nudging sound speed up too.
Real-world uses: submarine sonar for navigation and detection,
fish-finders on trawlers locating shoals, and bathymetric surveys
mapping the seafloor for shipping and cable-laying.