diff --git a/Utilities/Geometries/MATLAB/Functions/rcvGeo.m b/Utilities/Geometries/MATLAB/Functions/rcvGeo.m index 04125c5532e4f3b0f82efcd1b7618e211a19c083..b08dc78beb5f73d1bb60ef1468ffa034b3052139 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 49dc22a77ad7989714d923edbe105b0a365302f6..389f49a66abde2f253c5acf935fd3d2fe9bb53eb 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 204fd87e4442043d07a1a5e2ebe1ff0930e47770..564dfa39f7ed587750f32163456f71430b73b86b 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