diff --git a/common b/common index bc61b5b9265bde0f30dfc53db0bf5820e3c69b04..1bc8c371f3852dab849aa6db901c8f275dfe025f 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit bc61b5b9265bde0f30dfc53db0bf5820e3c69b04 +Subproject commit 1bc8c371f3852dab849aa6db901c8f275dfe025f diff --git a/utils/tests/alphaPhi/testRotation.m b/utils/tests/alphaPhi/testRotation.m index 6f23ceedb4dca33e43d51caca2778de55bdb97e2..98597289a4d964ea1040907e5c0d85171e8508c5 100644 --- a/utils/tests/alphaPhi/testRotation.m +++ b/utils/tests/alphaPhi/testRotation.m @@ -23,6 +23,8 @@ interpolant = griddedInterpolant(... %% Validate in multiple cases coefficients by n*section +% uncomment * if manually outputting err from Coefficient + n = 100; mach = rand(n, 1); @@ -32,11 +34,16 @@ sections = ap.geometry.nPanel; % Generic alpha-phi alpha = rand(n, 1)*20; phi = rand(n, 1)*360; +beta = rand(n, 1)*20 - 10; err1 = nan(6, n); +altitude = rand(n, 1)*3000; for i = 1:n [coeffsR, coeffs] = computeCoeffs(sections, alpha(i), mach(i), phi(i), abk(i), interpolant); err1(:, i) = abs(coeffs - coeffsR); + + % uncomment if error calculation manually added internally + % [~, err1(:, i)] = ap.get(alpha(i)*pi/180, mach(i), beta(i)*pi/180, altitude(i), abk(i), 1.7); end % Extrapolation (best near) @@ -46,6 +53,7 @@ phi = 247; abk = 1.3; % This should actually never happen [coeffsR, coeffs] = computeCoeffs(sections, alpha, mach, phi, abk, interpolant); + err2 = abs(coeffs - coeffsR); % Edge cases (phi = 120*n)