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
4d7e343c
Commit
4d7e343c
authored
Jun 16, 2020
by
Dipl.-Ing. Jonas Stienen
Browse files
Fixing bug in apex point calculation and switching back to the analytical implementation
parent
8537084b
Changes
3
Hide whitespace changes
Inline
Side-by-side
applications/SoundFieldSimulation/Diffraction/@itaInfiniteWedge/get_aperture_point_far_field.m
View file @
4d7e343c
...
...
@@ -8,6 +8,8 @@ assert( numel( receiver_pos ) == 3 )
%% Calculations
% Based on a line-plane intersection
source_receiver_vec
=
receiver_pos
-
source_pos
;
source_receiver_dir
=
source_receiver_vec
/
norm
(
source_receiver_vec
);
aperture_dir
=
obj
.
aperture_direction
/
norm
(
obj
.
aperture_direction
);
...
...
@@ -22,13 +24,11 @@ aux_plane_vec = cross( source_receiver_dir, aperture_dir );
aux_plane_dir
=
aux_plane_vec
/
norm
(
aux_plane_vec
);
aux_plane_normal
=
cross
(
source_receiver_dir
,
aux_plane_dir
);
% Determine intersection of line (aperture) and auxiliary plane
lambda_divisor
=
(
-
1
)
*
dot
(
aux_plane_normal
,
aperture_dir
);
lambda_divisor
=
dot
(
aux_plane_normal
,
aperture_dir
);
assert
(
lambda_divisor
~=
0
)
lambda
=
dot
(
aux_plane_normal
,
obj
.
location
)
/
lambda_divisor
;
d
=
dot
(
aux_plane_normal
,
obj
.
location
);
% Distance to origin
lambda
=
(
d
-
dot
(
aux_plane_normal
,
obj
.
location
)
)
/
lambda_divisor
;
aperture_point
=
obj
.
location
+
lambda
*
aperture_dir
;
end
\ No newline at end of file
applications/SoundFieldSimulation/Diffraction/@itaInfiniteWedge/itaInfiniteWedge.m
View file @
4d7e343c
...
...
@@ -173,8 +173,9 @@ classdef itaInfiniteWedge
function
aperture_point
=
get_aperture_point
(
obj
,
source_pos
,
receiver_pos
)
% GET_APERTURE_POINT Returns approximated aperture point on wedge
warning
'Aperture cannot be analytically determined, using approximation. See also get_aperture_point_far_field.'
aperture_point
=
obj
.
approx_aperture_point
(
source_pos
,
receiver_pos
);
%warning 'Aperture cannot be analytically determined, using approximation. See also get_aperture_point_far_field.'
%aperture_point = obj.approx_aperture_point( source_pos, receiver_pos );
aperture_point
=
obj
.
get_aperture_point_far_field
(
source_pos
,
receiver_pos
);
end
function
obj
=
set
.
boundary_condition
(
obj
,
bc
)
...
...
applications/SoundFieldSimulation/PropagationModels/ita_propagation_path_get_data.m
View file @
4d7e343c
...
...
@@ -123,7 +123,7 @@ for i = 2:N-1 %start from 2, first entry is always source, -1 as receiver always
plot3
(
ap_point3
(
1
),
ap_point3
(
2
),
ap_point3
(
3
),
'.b'
)
%point which should be predicted from aperture point method
plot3
(
ap_point4
(
1
),
ap_point4
(
2
),
ap_point4
(
3
),
'.g'
)
%point which should be predicted from aperture point method
%}
aperture_point
=
w
.
get_aperture_point
2
(
source_pos
,
target_pos
);
aperture_point
=
w
.
get_aperture_point
(
source_pos
,
target_pos
);
if
~
w
.
point_on_aperture
(
aperture_point
)
warning
(
'Invalid path, aperture point calculated not on the aperture'
);
valid
=
false
;
...
...
@@ -167,7 +167,7 @@ for i = 2:N-1 %start from 2, first entry is always source, -1 as receiver always
continue
end
aperture_point
=
w
.
get_aperture_point
2
(
source_pos
,
target_pos
);
aperture_point
=
w
.
get_aperture_point
(
source_pos
,
target_pos
);
if
~
w
.
point_on_aperture
(
aperture_point
)
warning
(
'Invalid path, aperture point calculated not on the aperture'
);
valid
=
false
;
...
...
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