The 3D companion sim computes the echo frequency by evaluating the closed-form two-leg Doppler formula directly. This 2D sim never evaluates that formula to get its "Measured echo f" — instead it literally simulates the sound field: every call spawns an expanding circular wavefront that travels outward at the true speed of sound relative to still air; when a wavefront's growing radius catches up to the moth it reflects into a new echo wavefront centered on the moth's position at that instant; when an echo wavefront's radius reaches the bat, that arrival is timestamped. The measured echo frequency is simply 1 ⁄ (time between consecutive arrivals) — a direct product of wave kinematics, not algebra.
Working entirely in the still-air frame (both bat and moth move through it), the exact arrival-time kinematics for a call emitted at te from a bat at xbat(t)=vbatt and a moth at xtgt(t)=D₀−vtgtt work out to:
reflection time t_r = [D0 + t_e(c − v_bat)] / (c + v_tgt)
arrival time t_a = [D0 + t_r(c − v_tgt)] / (c + v_bat)
dt_a/dt_e = (c − v_tgt)(c − v_bat)
---------------------------
(c + v_bat)(c + v_tgt)
measured f_echo = 1 / (Δt_a between successive arrivals)
= f0 · (c + v_bat)(c + v_tgt) / [(c − v_bat)(c − v_tgt)]
That last line is exactly the classical two-leg Doppler formula the 3D sim evaluates directly — the ring-timing simulation below reproduces it from raw geometry rather than assuming it, which is the whole point of this companion piece.
- v_bat, v_tgt sliders — same physical quantities as the 3D sim: the bat's own closing speed and the moth's speed component toward the bat (negative = fleeing).
- f0,manual slider — the fixed call frequency used whenever compensation is off.
- Compensation toggle — when on, the bat still solves the same closed-form equation for f0 (that's how a real horseshoe bat uses its own proprioceptive speed sense, not its own echo, to pre-correct); when off, watch the wavefronts bunch up ahead of the bat and stretch out behind the moth as raw Doppler drift.
Ring spacing is the visible signature of the shift: rings compress in the direction a source moves into (higher measured frequency) and stretch apart behind a source moving away (lower frequency) — exactly the geometric mechanism real Doppler shift comes from.