From b2c729a19f710f7e84560a992eb4ac8a967dc110 Mon Sep 17 00:00:00 2001 From: ZaellixA <axilleaz@protonmail.com> Date: Tue, 16 Jul 2024 01:05:20 +0100 Subject: [PATCH] Update dependencies for the new rotMat3d.m function --- Utilities/Geometries/MATLAB/Functions/rcvGeo.m | 12 +++++++----- Utilities/Geometries/MATLAB/Functions/srcGeo.m | 10 +++++----- Utilities/Geometries/MATLAB/Functions/virtMicGeo.m | 12 ++++++------ 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/Utilities/Geometries/MATLAB/Functions/rcvGeo.m b/Utilities/Geometries/MATLAB/Functions/rcvGeo.m index 04125c5..b08dc78 100644 --- a/Utilities/Geometries/MATLAB/Functions/rcvGeo.m +++ b/Utilities/Geometries/MATLAB/Functions/rcvGeo.m @@ -3,7 +3,7 @@ % Author: Achilles Kappis % e-mail: axilleaz@protonmail.com % -% Date: 15/07/2024 (DD/MM/YYYY) +% Date: 16/07/2024 (DD/MM/YYYY) % % Copyright: MIT % -------------------------------------------------- @@ -219,6 +219,8 @@ % -------------------------------------------------- % 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) % ==================================================== @@ -371,7 +373,7 @@ function [omniPos, fig8Pos, triPos, boxPos, box2DPos, tetPos, fig8Vec, triangleV switch lower(gType) 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 % Go through the tetrahedrals @@ -384,7 +386,7 @@ function [omniPos, fig8Pos, triPos, boxPos, box2DPos, tetPos, fig8Vec, triangleV end % Rotate and position - tetPos(measPosIdx, :, :) = omniPos(measPosIdx, :) + tempPos * rotMat3dDeg(0, 0, rot); + tetPos(measPosIdx, :, :) = omniPos(measPosIdx, :) + tempPos * rotMat3d(0, 0, rot, "Deg"); end case "uca" % Get the angle of the positions on the circle @@ -392,10 +394,10 @@ function [omniPos, fig8Pos, triPos, boxPos, box2DPos, tetPos, fig8Vec, triangleV % Rotate and position tetrahedrals 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 case "single" - tetPos = omniPos + tempPos * rotMat3dDeg(30, 30, 0); + tetPos = omniPos + tempPos * rotMat3d(30, 30, 0, "Deg"); end if ~strcmpi(gType, "Single") diff --git a/Utilities/Geometries/MATLAB/Functions/srcGeo.m b/Utilities/Geometries/MATLAB/Functions/srcGeo.m index 49dc22a..389f49a 100644 --- a/Utilities/Geometries/MATLAB/Functions/srcGeo.m +++ b/Utilities/Geometries/MATLAB/Functions/srcGeo.m @@ -3,7 +3,7 @@ % Author: Achilles Kappis % e-mail: axilleaz@protonmail.com % -% Date: 24/02/2024 (DD/MM/YYYY) +% Date: 16/07/2024 (DD/MM/YYYY) % % Copyright: MIT % -------------------------------------------------- @@ -103,7 +103,7 @@ % % Dependencies: - ptsOnSphere(): For the calculation of the "Diffuse" and % "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) @@ -196,11 +196,11 @@ function [sPos, Q, domIdx] = srcGeo(gType, srcLen, originDist, ang, nSrc, azim, if nSrc ~= 0 switch lower(gType) 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" - sPos = sPos * rotMat3dDeg(0, 0, 90); % Rotate 90 degrees (clockwise) + sPos = sPos * rotMat3d(0, 0, 90, "Degs"); % Rotate 90 degrees (clockwise) 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.'; end end diff --git a/Utilities/Geometries/MATLAB/Functions/virtMicGeo.m b/Utilities/Geometries/MATLAB/Functions/virtMicGeo.m index 204fd87..564dfa3 100644 --- a/Utilities/Geometries/MATLAB/Functions/virtMicGeo.m +++ b/Utilities/Geometries/MATLAB/Functions/virtMicGeo.m @@ -3,7 +3,7 @@ % Author: Achilles Kappis % e-mail: axilleaz@protonmail.com % -% Date: 12/07/2024 (DD/MM/YYYY) +% Date: 16/07/2024 (DD/MM/YYYY) % % Copyright: MIT % -------------------------------------------------- @@ -72,7 +72,7 @@ % -------------------------------------------------- % Notes % -% - Dependencies: rotMat3dDeg(): To rotate sources. +% - Dependencies: rotMat3d(): To rotate sources. % % - The position of the geometry is calculated like this: First 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 % Rotate if ~strcmpi(gType, "Cube") if isnumeric(orient) - vPos = vPos * rotMat3dDeg(0, 0, -orient); + vPos = vPos * rotMat3d(0, 0, -orient, "Degs"); elseif strcmpi(orient, "XZ") if strcmpi(gType, "array") - vPos = vPos * rotMat3dDeg(0, 0, 90); + vPos = vPos * rotMat3d(0, 0, 90, "Degs"); else - vPos = vPos * rotMat3dDeg(90, 0, 0); + vPos = vPos * rotMat3d(90, 0, 0, "Degs"); end elseif strcmpi(orient, "YZ") - vPos = vPos * rotMat3dDeg(0, 90, 0); + vPos = vPos * rotMat3d(0, 90, 0, "Degs"); end end -- GitLab