Commit 04edbaad authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen
Browse files

Reverting negative sign in TF, must be positive!

parent 3ec706f8
......@@ -37,7 +37,7 @@ in_shadow_zone = ita_diffraction_shadow_zone( wedge, source_pos, receiver_pos );
H_dir = 1 ./ r_dir;
if in_shadow_zone
% From Handbook of Acoustics page 117 eq. 4.13 + inverted phase (pressure release first)
H_diffr = ( -1 ) * ( ( 10^(5/20) * sqrt( 2 * pi * N ) ./ tanh( sqrt( 2 * pi * N ) ) ).^(-1) .* H_dir );
H_diffr = ( +1 ) * ( ( 10^(5/20) * sqrt( 2 * pi * N ) ./ tanh( sqrt( 2 * pi * N ) ) ).^(-1) .* H_dir );
else
H_diffr = zeros( size(frequencies) ); % diffraction field outside the shadow zone is not considered with Maekawa's method
end
......
function ita_propagation_store_paths( pps_struct, json_file_path, auto_overwrite )
%
% ita_store_propagation_paths Exports propagation path list
% from a Matlab struct into a JSON formatted text file
%
%
if ~isfield( pps_struct, 'class' )
error( 'Could not export propagation path list, struct is missing field "class"' )
end
assert( strcmpi( pps_struct.class, 'propagation_path_list' ) )
if nargin < 3
auto_overwrite = true;
end
json_txt = jsonencode( pps_struct );
if exist( json_file_path, 'file' ) && ~auto_overwrite
error( 'Refused to overwrite file %s', json_file_path )
end
fid = fopen( json_file_path, 'w' );
fprintf( fid, '%s\n', json_txt );
fclose( fid );
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