Skip to main content

woodworth_itd_seconds

Function woodworth_itd_seconds 

pub fn woodworth_itd_seconds(
    azimuth_rad: f32,
    head_radius_m: f32,
    speed_of_sound_m_s: f32,
) -> Result<f32, SignalError>
Expand description

Woodworth / Rayleigh spherical-head Interaural Time Difference (ITD) in seconds: $$\text{ITD}(\theta) = \operatorname{sign}(\theta) \cdot \frac{a}{c}\left(\phi + \sin\phi\right)$$ where $\phi = \arcsin(\sin|\theta|) \in [0, \pi/2]$ is the lateral angle from the median plane, $a$ is head_radius_m ($> 0$), and $c$ is speed_of_sound_m_s ($> 0$).

Negative ITD indicates source is to the left (left ear leads); positive ITD indicates source is to the right (right ear leads).