Over at http://freesound.iua.upf.edu/samplesViewSingle.php?id=14830 Acclivity calculated the speed of the race-cars that Heigh-hoo recorded, so I thought, cool, let's do the same for http://freesound.iua.upf.edu/samplesViewSingle.php?id=18794 . However, being a geek I couldn't just take the formula and use it. I had to know why Acclivity calculated the speed like that. Soooo, here we are
We assume the source travels at a constant speed, and we assume the source is traveling directly to the listener, not passing by at a distance (this is a 'good enough' simplification):
Doppler frequency correction: http://en.wikipedia.org/wiki/Doppler_effect
source going towards listener (positive speed)
heard_freq_before = source_freq * (1 + speed_towards_listener / speed_of_sound)
source going away from listener (negative speed)
heard_freq_after = source_freq * (1 - speed_towards_listener / speed_of_sound)
-> heard_freq_before / heard_freq_after = (1 + speed_towards_listener / speed_of_sound)/(1 - speed_towards_listener / speed_of_sound)
let's rename some things.
c = speed_of_sound
heard_freq_before = f1
heard_freq_after = f2
speed_towards_listener = v
f1/f2 = (1+v/c)/(1-v/c)
-> f1/f2 * (1-v/c) = 1+v/c
-> f1/f2 - 1 = v/c + f1/f2*v/c
-> f1/f2 - 1 = (1+f1/f2)*v/c
-> v/c = (f1/f2 - 1) / (1 + f1/f2)
-> v = c*(f1-f2)/(f1+f1)
c = 340.29 m/s
f1 in Hz
speed_of_moving_object = 340.29 m/s * (freq_before - freq_after) / (freq_before + freq_after)
( if you want the speed in km/h we need to multiply by 3.6 )
Make sure you only use this formula for objects passing by at close distance, otherwise you will introduce an error...
I'm so pleased to find there are more geeks here! Thanks Bram, and good fun on the Canada Geese!
I remember learning this formula at school about 46 years ago, and getting a "mathematical thrill".
For completeness, you should add that the speed of sound in the air (your 340.29
m/s figure) depends on the air temperature.
Speed of sound in air in m/s = 331.4 + 0.6T where T is air temperature in degrees Celsius
(assuming the air is dry!).
This reminds me of the methods that astronomists use to calculate the relative velocity of other stars by measuring red-shift.