Commit 7fc587c8 authored by Philipp Schäfer's avatar Philipp Schäfer
Browse files

AdaptiveRayGrid

- bugfix: adaptive ray grid is never circular if zoom into ray with specific resolution
parent 67630f72
......@@ -118,7 +118,7 @@ void CAdaptiveRayGrid::ZoomIntoRay(const std::shared_ptr<CRay> pZoomRay, const d
}
}
m_bCircularPhi = m_bCircularPhi && HasPoleDirection(pZoomRay);
m_bCircularPhi = false;
SetRayMatrix(newRayMatrix);
}
#pragma endregion
......
......@@ -167,15 +167,22 @@ void TestSourceReceiverAzimuthAbove324Deg()
runTest(atmosphere, sourcePosition, receiverPosition, filename);
}
void TestSpecialSpreadingLossCase() //In this case, there was a bug with the spreading loss. Used this test to Debug this scenario.
void TestSpecialSpreadingLossCase() //In these case, there was a bug with the spreading loss. Used this test to Debug this scenario.
{
const CStratifiedAtmosphere atmosphere = GetInhomogeneousAtmosphere();
const VistaVector3D receiverPosition = VistaVector3D(-17.5, 100, 1);
const VistaVector3D sourcePosition = VistaVector3D(-50.97, 100, 1020.7);
EigenraySearch::CEngine engine;
engine.eigenraySettings.rayTracing.maxReflectionOrder = 0;
//This should work now
//const VistaVector3D receiverPosition = VistaVector3D(-17.5, 100, 1);
//const VistaVector3D sourcePosition = VistaVector3D(-50.97, 100, 1020.7);
//This does not work, if maxAngleForGeomSpreading is at default (0.01).
//It seems that there is a numerical cancellation during calculation of wavefront surface at the receiver: S = 0 => loss = inf
const VistaVector3D sourcePosition = VistaVector3D(-20.3577849403681, 100, 1022.15620755078);
const VistaVector3D receiverPosition = VistaVector3D(17.5, 100, 1);
engine.eigenraySettings.rayAdaptation.accuracy.maxAngleForGeomSpreading = 0.02;
std::vector<std::shared_ptr<CRay>> eigenrays = engine.Run(atmosphere, sourcePosition, receiverPosition);
}
......@@ -185,14 +192,14 @@ int main(int iNumInArgs, char* pcInArgs[])
//Disable multi-threading for debugging purposes
omp_set_num_threads(1);
//TestSpecialSpreadingLossCase();
TestSpecialSpreadingLossCase();
//TestSourceReceiverAzimuthAbove324Deg();
const CStratifiedAtmosphere homAtmosphere = GetHomogeneousAtmosphere();
const CStratifiedAtmosphere inhomAtmosphere = GetInhomogeneousAtmosphere();
TestSourceAtGround(inhomAtmosphere, "Inhomogeneous");
//TestSourceAtGround(inhomAtmosphere, "Inhomogeneous");
//TestReceiverNearGroundSourceElevation(homAtmosphere, "Homogeneous");
//TestReceiverNearGroundSourceElevation(inhomAtmosphere, "Inhomogeneous");
......
Markdown is supported
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