Commit e3e43bec by Lennart Reich

### fixing a few bugs

parent d11f385b
 ... ... @@ -16,10 +16,10 @@ end if ~ita_diffraction_point_is_of_dim3( receiver_pos ) error( 'Receiver point must be of dimension 3' ) end if ~ita_diffraction_point_is_row_vector( source_pos ) if ita_diffraction_point_is_row_vector( source_pos ) source_pos = source_pos'; end if ~ita_diffraction_point_is_row_vector( receiver_pos ) if ita_diffraction_point_is_row_vector( receiver_pos ) receiver_pos = receiver_pos'; end ... ...
 ... ... @@ -29,8 +29,8 @@ if ~strcmpi( diffraction_model, 'btms' ) end else w = itaFiniteWedge( n1, n2, loc, len ); w.aperture_direction = aperture_dir; w.aperture_end_point = endPt; % w.aperture_direction = aperture_dir; % w.aperture_end_point = endPt; end % Legacy ... ...
 function [ linear_freq_data ] = tf_diffraction_maekawa( wedge, eff_source_pos, eff_receiver_pos ) function [ linear_freq_data ] = tf_diffraction_maekawa( obj, wedge, eff_source_pos, eff_receiver_pos ) %TF_DIFFRACTION_UTD Calculates the diffraction filter based on uniform %theory of diffraction (with Kawai approximation). [ H_diffr, ~ ] = ita_diffraction_maekawa( wedge, eff_source_pos( 1:3 ), eff_receiver_pos( 1:3 ), obj.freq_vec( 2:end ), obj.c ); eff_direct = norm( eff_source_pos( 1:3 ) - eff_source_pos( 1:3 ) ); eff_direct = norm( eff_source_pos( 1:3 ) - eff_receiver_pos( 1:3 ) ); H_eff = 1 ./ eff_direct; linear_freq_data = [ 0; H_diffr ./ H_eff ]; % Normalizing incident field, it's taken care of by previous segment. ... ...
 function dAirAbsorptionFactor = ita_atmospheric_absorption_factor( dFrequency, dDistance, vargin ) function dAirAbsorptionFactor = ita_atmospheric_absorption_factor( dFrequency, dDistance, varargin ) if( nargin == 5 ) dAirAbsorptionDecibel = ita_atmospheric_absorption_level_dB( dFrequency, dDistance, vargin{1}, vargin{2}, vargin{3} ); dAirAbsorptionDecibel = ita_atmospheric_absorption_level_dB( dFrequency, dDistance, varargin{1}, varargin{2}, varargin{3} ); elseif( nargin == 2 ) dAirAbsorptionDecibel = ita_atmospheric_absorption_level_dB( dFrequency, dDistance ); else ... ...
 function dAirAbsorptionDecibel = ita_atmospheric_absorption_level_dB( dFrequency, dDistance, vargin ) function dAirAbsorptionDecibel = ita_atmospheric_absorption_level_dB( dFrequency, dDistance, varargin ) % ISO 9613-1 Acoustics - Attenuation of sound during propagation outdoors % Reference ambient atmospheric pressure (Standard Ambient Atmosphere) [kPa] % (Referenzatmosphrendruck Umgebung nach ISO Standard) if( nargin == 5 ) dTemperature = vargin{1}; dHumidity = vargin{2}; dStaticPressure = vargin{3}; dTemperature = varargin{1}; dHumidity = varargin{2}; dStaticPressure = varargin{3}; elseif( nargin == 2 ) ita_propagation_load_defaults default_values = ita_propagation_defaults; ... ...
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