Commit 2d7f3311 authored by Philipp Schäfer's avatar Philipp Schäfer
Browse files

ART - Updated EigenrayEngineTest

parent 66fa0cbe
......@@ -59,9 +59,9 @@ void runTest(const CStratifiedAtmosphere& atmosphere, const VistaVector3D& sourc
engine.eigenraySettings.rayAdaptation.accuracy.maxSourceReceiverAngle = 1;
engine.eigenraySettings.rayAdaptation.accuracy.maxAngleForGeomSpreading = 0.01;
engine.eigenraySettings.rayAdaptation.advancedRayZooming.threshold = 0.5;
engine.eigenraySettings.rayAdaptation.advancedRayZooming.threshold = 1.0;
engine.eigenraySettings.rayTracing.maxReflectionOrder = 3;
engine.eigenraySettings.rayTracing.maxReflectionOrder = 1;
engine.eigenraySettings.rayTracing.maxTime = 15;
......@@ -120,7 +120,7 @@ int main(int iNumInArgs, char* pcInArgs[])
CStratifiedAtmosphere homAtmosphere = GetHomogeneousAtmosphere();
CStratifiedAtmosphere inhomAtmosphere = GetInhomogeneousAtmosphere();
TestReceiverNearGround(homAtmosphere, "Homogeneous");
//TestReceiverNearGround(inhomAtmosphere, "Inhomogeneous");
//TestReceiverNearGround(homAtmosphere, "Homogeneous");
TestReceiverNearGround(inhomAtmosphere, "Inhomogeneous");
}
......@@ -30,7 +30,7 @@ art = itaART;
art.source = [0 0 50]; %Can also be a single itaCoordinates
art.receiver = [0 0 1.8]; %Can also be a single itaCoordinates
art.dt = 0.01; %Integration variable [s]
art.dt = 0.1; %Integration variable [s]
art.tMax = 15; %Maximum time of tracing [s]
art.bAdaptiveDt = true;
......@@ -51,17 +51,17 @@ art.maxSourceReceiverAngle = 1; %Maximum allowed angle between direc
art.maxEigenraySearchIterations = 30; %Abort criterion for eigenray search: maximum number of adaptations.
art.minEigenraySearchAngle = 0.001; %Abort criterion for eigenray search: minimum angle between rays.
art.rayZoomThresh = 0.5; %Threshold used for improved ray zooming. If this is undershot, the algorithm does not make a decision.
art.rayZoomThresh = 1.0; %Threshold used for improved ray zooming. If this is undershot, the algorithm does not make a decision.
art.angleForGeomSpreading = 0.01; %Angle between rays used to calculate the geometrical spreading
art.maxReflOrder = 3;
art.maxReflOrder = 1;
%% Run Tests
art.atmosphere = homAtmos;
runTestReceiverNearGround(art, 'Homogeneous');
% runTestReceiverNearGround(art, 'Homogeneous');
art.atmosphere = inhomAtmos;
%runTestReceiverNearGround(art, 'Inhomogeneous');
runTestReceiverNearGround(art, 'Inhomogeneous');
function runTestReceiverNearGround(art, atmosphereSuffix)
......@@ -71,5 +71,5 @@ for sourceRecAngle = -90:45:90
art.source.y = art.receiver.y;
art.source.z = sourceReceiverDistance*cosd(sourceRecAngle) + art.receiver.z;
cppFilename = ['ReceiverNearGround_' atmosphereSuffix '_SourceAngle' num2str(sourceRecAngle) '.json'];
runMatlabVsCppEigenrayTest(art, cppFilename, fileparts(cppFilename));
runMatlabVsCppEigenrayTest(art, cppFilename, fileparts(cppFilename), true);
end
......@@ -35,7 +35,7 @@ hold(axRelativeDist, 'on')
for idx=1:nRays
%% Error Calculation
cppPoints = cppRays(idx).interpolateToRay(matlabRays(idx), 'nearest');
cppPoints = cppRays(idx).interpolateToRay(matlabRays(idx), 'linear');
matlabPoints = matlabRays(idx).applyGroundReflection();
deltaR = cppPoints - matlabPoints;
......@@ -71,15 +71,15 @@ baseLineWidth = 1.5;
for idx=1:nRays
matlabRays(idx).pr(f, {'linestyle', 'linewidth'}, {'-', baseLineWidth*1.25});
hold on
cppRays(idx).pr(f, {'linestyle', 'linewidth'}, {':', baseLineWidth*1.5});
cppRays(idx).pr(f, {'linestyle', 'linewidth'}, {'--', baseLineWidth*1.5});
end
% matlabRays.pr(f, {'linestyle', 'color', 'linewidth'}, {'-', [0 0.6 0], baseLineWidth*1.25});
% matlabRungeRay.pr(f, {'linestyle', 'color', 'linewidth'}, {'-.',[0 0 0.6], baseLineWidth});
% cppRays.pr(f, {'linestyle', 'color', 'linewidth'}, {':',[1.0 0.6 0], baseLineWidth*1.5});
% cppRungeRay.pr(f, {'linestyle', 'color', 'linewidth'}, {'--', [0.6 0 0], baseLineWidth*1.25});
art.source.plot('markerfacecolor', 'b')
art.receiver.plot('markerfacecolor', 'g')
plot3(art.source.x, art.source.y, art.source.z, ' ok', 'markerfacecolor', 'b')
plot3(art.receiver.x, art.receiver.y, art.receiver.z, ' ok', 'markerfacecolor', [0 0.6 0])
legend({'Direct path - Matlab', 'Direct path - Cpp', '1st-order - Matlab', '1st-order - Cpp'}, 'location', 'northwest');
grid on
......
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