Commit f2d915fb authored by Lennart Reich's avatar Lennart Reich
Browse files

implemented function

parent e8141cc0
function [ virtual_source_pos ] = ita_cau_virtual_sound_source( receiver_pos, incident_direction, distance_or_attenuation, modus )
%%ita_cau_virtual_sound_source Calculates a virtual sound source from an
%incident direction and distance or spreading loss attenuation.
%incident direction and the distance or spreading loss attenuation.
if strcmp(modus,'spreading loss')
% distance = 10^(distance_or_attenuation/20);
distance = 1/distance_or_attenuation; %attenuation equals 1/r
else
distance = distance_or_attenuation;
end
virtual_source_pos = receiver_pos-incident_direction*distance/norm(incident_direction);
end
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment