Bat echolocation - echo delay and Doppler (2D)Switch to 3D
Checks (measured vs predicted)
The science

A bat times the delay between its call and the returning echo. Sound travels at c = 331.3 √(1 + T/273.15) m/s, so a target at distance d returns an echo after Δt = 2d/c (about 5.8 ms per metre). For a moving bat and moth the exact delay follows from tracing the wavefront: the call hits the moth at th = d/(c − vm) and the echo meets the bat (c th − vb th)/(c + vb) later.

The echo frequency is Doppler-shifted twice: f' = f0 (c − vm)(c + vb) / ((c − vb)(c + vm)), which for a stationary target reduces to f0 (c + vb)/(c − vb). Real bats also compensate for this shift. The call interval shortens as the target nears (here 3 × the echo delay plus 4 ms, limited to 6-100 ms), reproducing the search, approach and buzz phases qualitatively.

Simplifications: one dimension of range, spherical rings drawn in a plane, no spreading loss, no wall clutter. The 2D scene shows sound slowed down by the time-scale slider; the physics is evaluated at true values.