Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Institute of Technical Acoustics (ITA)
toolbox
Commits
04edbaad
Commit
04edbaad
authored
Jul 30, 2019
by
Dipl.-Ing. Jonas Stienen
Browse files
Reverting negative sign in TF, must be positive!
parent
3ec706f8
Changes
2
Hide whitespace changes
Inline
Side-by-side
applications/SoundFieldSimulation/Diffraction/ita_diffraction_maekawa.m
View file @
04edbaad
...
...
@@ -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
...
...
applications/SoundFieldSimulation/PropagationModels/ita_propagation_store_paths.m
0 → 100644
View file @
04edbaad
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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment