The Doppler shifted frequency is given by
where v is the velocity of the vehicle, c the speed of sound, and f0 the original frequency. The dot product with r means we only take the part of the velocity that is along the line-of-sight between the vehicle and the observer. That dot product is what leads to the changing pitch: As the vehicle approaches the observer, the angle decreases, lowering the pitch.
I decided to put together another HTML5 doodad to play around with (make sure you have your sound on):
No comments:
Post a Comment