Commit 76b275fa authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen
Browse files

WIP

parent c61bcf09
......@@ -30,7 +30,7 @@ classdef itaFiniteWedge < itaInfiniteWedge
n_scaled = cross( obj.main_face_normal, obj.opposite_face_normal );
if ~norm( n_scaled )
warning 'aperture enp point could not be determined since aperture direction is not defined. Please set aperture direction manually.'
warning 'Aperture end point could not be determined since aperture direction is not defined. Please set aperture direction manually.'
else
obj.ep = obj.sp + length * obj.aperture_direction;
end
......
......@@ -22,7 +22,7 @@ classdef itaInfiniteWedge
end
methods
function obj = itaInfiniteWedge( main_face_normal, opposite_face_normal, location, edge_type )
function obj = itaInfiniteWedge( main_face_normal, opposite_face_normal, location, edge_type, aperture_direction )
% Create a wedge by a main face normal and an opposite face
% normal
% main_face_normal: Main face normal (3-dim)
......@@ -61,11 +61,15 @@ classdef itaInfiniteWedge
obj.n2 = opposite_face_normal ./ norm( opposite_face_normal );
end
n_scaled = cross( obj.main_face_normal, obj.opposite_face_normal );
if ~norm( n_scaled )
warning 'Normals are linear dependent and aperture direction could not be determined. Please set aperture direction manually.'
if nargin < 5
n_scaled = cross( obj.main_face_normal, obj.opposite_face_normal );
if ~norm( n_scaled )
warning 'Normals are linear dependent and aperture direction could not be determined. Please set aperture direction manually.'
else
obj.ad = n_scaled ./ norm( n_scaled );
end
else
obj.ad = n_scaled ./ norm( n_scaled );
obj.ad = aperture_direction;
end
end
......
......@@ -7,8 +7,7 @@ classdef itaSemiInfinitePlane < itaInfiniteWedge
methods
function obj = itaSemiInfinitePlane( main_face_normal, location, aperture_direction )
obj@itaInfiniteWedge( main_face_normal, -main_face_normal, location );
obj.aperture_direction = aperture_direction;
obj@itaInfiniteWedge( main_face_normal, -main_face_normal, location, 'outer_edge', aperture_direction );
end
end
end
......
......@@ -44,9 +44,11 @@ len = norm( endPt - loc );
if( abs( cross(n1, n2) ) < itaInfiniteWedge.set_get_geo_eps )
aperture_dir = ( anchor.vertex_end( 1:3 )' - anchor.vertex_start( 1:3 )' ) / len;
w = itaSemiInfinitePlane( n1, loc, aperture_dir );
finWedge = itaFiniteWedge( n1, n2, loc, len );
finWedge.aperture_direction = aperture_dir;
finWedge.aperture_end_point = endPt;
if strcmpi( diffraction_model, 'btms' )
finWedge = itaFiniteWedge( n1, n2, loc, len );
finWedge.aperture_direction = aperture_dir;
finWedge.aperture_end_point = endPt;
end
else
w = itaInfiniteWedge( n1, n2, loc );
end
......@@ -74,6 +76,8 @@ switch( diffraction_model )
diffraction_tf.freqData = diffraction_tf.freqData ./ normilization_porpagation;
case 'maekawa'
error 'not implemented'
case 'btms'
btms_tf = ita_diffraction_btms( finWedge, effective_source_position( 1:3 )', effective_receiver_position( 1:3 )', diffraction_tf.samplingRate, diffraction_tf.nBins, c );
diffraction_tf.freqData = btms_tf;
......
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