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

ART - Eigenray Worker

- added check for nullptr
parent f597c477
......@@ -119,7 +119,7 @@ std::vector<CRayGrid> EigenraySearch::CInitialWorker::Run(const ITAGeo::CStratif
{
CRayGrid rayGrid = InitRayGrid(atmosphere);
simulationEngine.Run(atmosphere, rayGrid.UniqueRays());
//FindMinimumDistanceRays(rayGrid.UniqueRays()); //TODO: convert to std::set
//FindMinimumDistanceRays(rayGrid.UniqueRays()); //TODO: convert std::set to std::vector
return FinalizeResult(rayGrid);
}
CRayGrid EigenraySearch::CInitialWorker::InitRayGrid(const ITAGeo::CStratifiedAtmosphere& atmosphere)
......@@ -132,8 +132,13 @@ void EigenraySearch::CInitialWorker::FindMinimumDistanceRays(const RayVector& ra
int maxReflOrder = 0;
for each (const RayPtr & ray in rays)
{
maxReflOrder = std::max( ray->ReceiverDistanceData( ReceiverPosition() )->reflectionOrder, maxReflOrder);
maxReflOrder = std::max( ray->ReceiverDistanceData( MirroredReceiverPosition() )->reflectionOrder, maxReflOrder);
const CRayReceiverData* rayReceiverDistanceData = ray->ReceiverDistanceData( ReceiverPosition() );
if (rayReceiverDistanceData)
maxReflOrder = std::max( rayReceiverDistanceData->reflectionOrder, maxReflOrder );
rayReceiverDistanceData = ray->ReceiverDistanceData( MirroredReceiverPosition() );
if (rayReceiverDistanceData)
maxReflOrder = std::max( rayReceiverDistanceData->reflectionOrder, maxReflOrder );
}
maxReflOrder = std::min(maxReflOrder, rayTracingAbortSettings.maxReflectionOrder);
......
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