Skip to content
Snippets Groups Projects
Commit b2c729a1 authored by Achilles Kappis's avatar Achilles Kappis
Browse files

Update dependencies for the new rotMat3d.m function

parent 23d69c18
No related branches found
No related tags found
No related merge requests found
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
% Author: Achilles Kappis % Author: Achilles Kappis
% e-mail: axilleaz@protonmail.com % e-mail: axilleaz@protonmail.com
% %
% Date: 15/07/2024 (DD/MM/YYYY) % Date: 16/07/2024 (DD/MM/YYYY)
% %
% Copyright: MIT % Copyright: MIT
% -------------------------------------------------- % --------------------------------------------------
...@@ -219,6 +219,8 @@ ...@@ -219,6 +219,8 @@
% -------------------------------------------------- % --------------------------------------------------
% Notes % Notes
% %
% - Dependencies: rotMat3d() to rotate the configurations
%
% -------------------------------------------------- % --------------------------------------------------
function [omniPos, fig8Pos, triPos, boxPos, box2DPos, tetPos, fig8Vec, triangleVec, boxVec, box2DVec, tetVec] = rcvGeo(gType, nSens, elemDist, dmaElemDist, xOff, yOff, zOff) function [omniPos, fig8Pos, triPos, boxPos, box2DPos, tetPos, fig8Vec, triangleVec, boxVec, box2DVec, tetVec] = rcvGeo(gType, nSens, elemDist, dmaElemDist, xOff, yOff, zOff)
% ==================================================== % ====================================================
...@@ -371,7 +373,7 @@ function [omniPos, fig8Pos, triPos, boxPos, box2DPos, tetPos, fig8Vec, triangleV ...@@ -371,7 +373,7 @@ function [omniPos, fig8Pos, triPos, boxPos, box2DPos, tetPos, fig8Vec, triangleV
switch lower(gType) switch lower(gType)
case "ula" case "ula"
% Rotate the tetrahedrals on the positive side of they-axis % Rotate the tetrahedrals on the positive side of the y-axis
rotIdx = sum(omniPos(:, 1) > 0); % Calculate how many tetrahedrals we have to rotate rotIdx = sum(omniPos(:, 1) > 0); % Calculate how many tetrahedrals we have to rotate
% Go through the tetrahedrals % Go through the tetrahedrals
...@@ -384,7 +386,7 @@ function [omniPos, fig8Pos, triPos, boxPos, box2DPos, tetPos, fig8Vec, triangleV ...@@ -384,7 +386,7 @@ function [omniPos, fig8Pos, triPos, boxPos, box2DPos, tetPos, fig8Vec, triangleV
end end
% Rotate and position % Rotate and position
tetPos(measPosIdx, :, :) = omniPos(measPosIdx, :) + tempPos * rotMat3dDeg(0, 0, rot); tetPos(measPosIdx, :, :) = omniPos(measPosIdx, :) + tempPos * rotMat3d(0, 0, rot, "Deg");
end end
case "uca" case "uca"
% Get the angle of the positions on the circle % Get the angle of the positions on the circle
...@@ -392,10 +394,10 @@ function [omniPos, fig8Pos, triPos, boxPos, box2DPos, tetPos, fig8Vec, triangleV ...@@ -392,10 +394,10 @@ function [omniPos, fig8Pos, triPos, boxPos, box2DPos, tetPos, fig8Vec, triangleV
% Rotate and position tetrahedrals % Rotate and position tetrahedrals
for measPosIdx = numel(az):-1:1 for measPosIdx = numel(az):-1:1
tetPos(measPosIdx, :, :) = omniPos(measPosIdx, :) + tempPos * rotMat3dDeg(0, 0, -az(measPosIdx)); tetPos(measPosIdx, :, :) = omniPos(measPosIdx, :) + tempPos * rotMat3d(0, 0, -az(measPosIdx), "Deg");
end end
case "single" case "single"
tetPos = omniPos + tempPos * rotMat3dDeg(30, 30, 0); tetPos = omniPos + tempPos * rotMat3d(30, 30, 0, "Deg");
end end
if ~strcmpi(gType, "Single") if ~strcmpi(gType, "Single")
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
% Author: Achilles Kappis % Author: Achilles Kappis
% e-mail: axilleaz@protonmail.com % e-mail: axilleaz@protonmail.com
% %
% Date: 24/02/2024 (DD/MM/YYYY) % Date: 16/07/2024 (DD/MM/YYYY)
% %
% Copyright: MIT % Copyright: MIT
% -------------------------------------------------- % --------------------------------------------------
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
% %
% Dependencies: - ptsOnSphere(): For the calculation of the "Diffuse" and % Dependencies: - ptsOnSphere(): For the calculation of the "Diffuse" and
% "Directional" geometry source positions. % "Directional" geometry source positions.
% - rotMat3dDeg(): To rotate the source configurations. % - rotMat3d(): To rotate the source configurations.
% %
% -------------------------------------------------- % --------------------------------------------------
function [sPos, Q, domIdx] = srcGeo(gType, srcLen, originDist, ang, nSrc, azim, elev, SNR) function [sPos, Q, domIdx] = srcGeo(gType, srcLen, originDist, ang, nSrc, azim, elev, SNR)
...@@ -196,11 +196,11 @@ function [sPos, Q, domIdx] = srcGeo(gType, srcLen, originDist, ang, nSrc, azim, ...@@ -196,11 +196,11 @@ function [sPos, Q, domIdx] = srcGeo(gType, srcLen, originDist, ang, nSrc, azim,
if nSrc ~= 0 if nSrc ~= 0
switch lower(gType) switch lower(gType)
case {"anti-causal", "anticausal"} case {"anti-causal", "anticausal"}
sPos = sPos * rotMat3dDeg(0, 0, 180); % Rotate 180 degrees (clockwise) sPos = sPos * rotMat3d(0, 0, 180, "Degs"); % Rotate 180 degrees (clockwise)
case "side" case "side"
sPos = sPos * rotMat3dDeg(0, 0, 90); % Rotate 90 degrees (clockwise) sPos = sPos * rotMat3d(0, 0, 90, "Degs"); % Rotate 90 degrees (clockwise)
case "diagonal" case "diagonal"
sPos = rotMat3dDeg(0, 0, -90 + ang) * sPos.'; % Rotate specified degrees (clockwise) sPos = rotMat3d(0, 0, -90 + ang, "Degs") * sPos.'; % Rotate specified degrees (clockwise)
sPos = sPos.'; sPos = sPos.';
end end
end end
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
% Author: Achilles Kappis % Author: Achilles Kappis
% e-mail: axilleaz@protonmail.com % e-mail: axilleaz@protonmail.com
% %
% Date: 12/07/2024 (DD/MM/YYYY) % Date: 16/07/2024 (DD/MM/YYYY)
% %
% Copyright: MIT % Copyright: MIT
% -------------------------------------------------- % --------------------------------------------------
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
% -------------------------------------------------- % --------------------------------------------------
% Notes % Notes
% %
% - Dependencies: rotMat3dDeg(): To rotate sources. % - Dependencies: rotMat3d(): To rotate sources.
% %
% - The position of the geometry is calculated like this: First the % - The position of the geometry is calculated like this: First the
% geometry is placed on the x-y plane, then rotated to match the % geometry is placed on the x-y plane, then rotated to match the
...@@ -197,15 +197,15 @@ function [vPos, vPosMesh] = virtMicGeo(gType, xLen, xOff, yOff, zOff, nSens, ori ...@@ -197,15 +197,15 @@ function [vPos, vPosMesh] = virtMicGeo(gType, xLen, xOff, yOff, zOff, nSens, ori
% Rotate % Rotate
if ~strcmpi(gType, "Cube") if ~strcmpi(gType, "Cube")
if isnumeric(orient) if isnumeric(orient)
vPos = vPos * rotMat3dDeg(0, 0, -orient); vPos = vPos * rotMat3d(0, 0, -orient, "Degs");
elseif strcmpi(orient, "XZ") elseif strcmpi(orient, "XZ")
if strcmpi(gType, "array") if strcmpi(gType, "array")
vPos = vPos * rotMat3dDeg(0, 0, 90); vPos = vPos * rotMat3d(0, 0, 90, "Degs");
else else
vPos = vPos * rotMat3dDeg(90, 0, 0); vPos = vPos * rotMat3d(90, 0, 0, "Degs");
end end
elseif strcmpi(orient, "YZ") elseif strcmpi(orient, "YZ")
vPos = vPos * rotMat3dDeg(0, 90, 0); vPos = vPos * rotMat3d(0, 90, 0, "Degs");
end end
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment