You will build a small Doppler calculator for sound.
The idea. With speeds along the line, measured in the air, . Here is positive when the listener moves towards the source, and is positive when the source moves towards the listener. An echo from a reflector coming towards you at is . The beats between the echo and the sent sound are .
Your tasks.
heard, return the frequency heard, in Hz.echo, return the frequency of the echo, in Hz.speed_from_beats, return the speed of the reflector, in m/s, from the beats. Solve for .Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…