Interactive experiment
Sound speed-- m/s
Target distance-- m
Ping timer0.000 s
Enter water temperature and measured echo time, then send the sonar ping.
Model assumption: This classroom experiment estimates sound speed from temperature alone. In real seawater, sound speed also depends importantly on salinity and pressure/depth.
How Does Sonar Measure Distance?
Sonar uses sound waves to detect underwater objects. A sound pulse travels through the water, reflects from a target and returns as an echo. By measuring the echo time and knowing the speed of sound in water, the distance to the target can be calculated.
Sound Speed, Echo Time and Distance
Change the water temperature and echo time in the simulation. Observe how the speed of sound affects the calculated distance to the underwater target.
Sonar Distance Python Simulation
This Python model calculates the speed of sound in water and uses the measured echo time to estimate the distance to an underwater target. Change the water temperature or echo time and compare the Python result with the interactive sonar simulation.
Challenge: At 20 °C, suppose the echo returns after 1.20 s. Estimate the target distance before entering the value. Remember that 1.20 s is the total outward-and-return travel time.