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
d97fa717
Commit
d97fa717
authored
Aug 05, 2019
by
Dipl.-Ing. Jonas Stienen
Browse files
Removed remains of a merge conflict and refactoring
parent
5af0c791
Changes
1
Hide whitespace changes
Inline
Side-by-side
applications/SoundFieldSimulation/Diffraction/ita_diffraction_utd_approx.m
View file @
d97fa717
...
...
@@ -25,13 +25,12 @@ end
apex_point
=
wedge
.
get_aperture_point
(
source_pos
,
receiver_pos
);
dir_src_2_apex_pt
=
(
apex_point
-
source_pos
)
.
/
norm
(
apex_point
-
source_pos
);
dir_apex_pt_2_rcv
=
(
receiver_pos
-
apex_point
)
.
/
norm
(
receiver_pos
-
apex_point
);
dist_src_2_apex_pt
=
norm
(
apex_point
-
source_pos
);
% Distance Source to Apex point
dist_apex_pt_2_rcv
=
norm
(
receiver_pos
-
apex_point
);
% Distance Apex point to Receiver
d
ist_src_2_rcv_via_apex
=
dist_src_2_apex_pt
+
dist_apex_pt_2_rcv
;
r
=
norm
(
apex_point
-
source_pos
);
% Distance Source to Apex point
rho
=
norm
(
receiver_pos
-
apex_point
);
% Distance Apex point to Receiver
d
etour
=
r
+
rho
;
% consider a virtual receiver located at the shadow boundary
<<<<<<<
HEAD
virt_rcv_at_SB
=
source_pos
+
dir_src_2_apex_pt
.*
dist_src_2_rcv_via_apex
;
% Virtual position of receiver at shadow boundary
virt_rcv_at_SB
=
source_pos
+
dir_src_2_apex_pt
.*
detour
;
% Virtual position of receiver at shadow boundary
if
~
wedge
.
point_outside_wedge
(
virt_rcv_at_SB
)
diffr_field
=
zeros
(
size
(
f
)
);
return
...
...
@@ -44,7 +43,7 @@ end
% Incident field at shadow boundary
k
=
2
*
pi
*
freq_vec
/
speed_of_sound
;
virt_inc_field_at_SB
=
1
.
/
norm
(
virt_rcv_at_SB
-
source_pos
)
.*
exp
(
-
1
i
.*
k
.*
d
ist_src_2_rcv_via_apex
);
virt_inc_field_at_SB
=
1
.
/
norm
(
virt_rcv_at_SB
-
source_pos
)
.*
exp
(
-
1
i
.*
k
.*
d
etour
);
% virutal diffracted field at shadow boundary
virt_diffr_field_at_SB
=
ita_diffraction_utd
(
wedge
,
source_pos
,
virt_rcv_at_SB
,
freq_vec
,
speed_of_sound
);
...
...
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