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

ART - EigenraySearch

- bugfix: Now updates circularPhi bool if zooming into a ray using a specific resolution
parent e668871b
...@@ -50,11 +50,11 @@ namespace ITAPropagationPathSim ...@@ -50,11 +50,11 @@ namespace ITAPropagationPathSim
VistaVector3D m_v3SourcePos; //!< Origin of all rays in this ray grid. VistaVector3D m_v3SourcePos; //!< Origin of all rays in this ray grid.
std::vector<double> m_vdThetaDeg; //!< Sorted vector of elevation angles in degrees. std::vector<double> m_vdThetaDeg; //!< Sorted vector of elevation angles in degrees.
std::vector<double> m_vdPhiDeg; //!< Sorted vector of azimuth angles in degrees. std::vector<double> m_vdPhiDeg; //!< Sorted vector of azimuth angles in degrees.
bool m_bCircularPhi = false; //!< Indicates whether the azimuth vector is considered to be circular (phi covers full 360 degrees) or not.
private: private:
RayMatrix m_vvpRayMatrix; //!< Matrix of pointers to ray. First index refers to elevation (theta), second to azimuth (phi) angle. RayMatrix m_vvpRayMatrix; //!< Matrix of pointers to ray. First index refers to elevation (theta), second to azimuth (phi) angle.
RayVector m_vpRays; //!< Vector of all rays contained by vvpRayMatrix. May contain duplicates at poles (theta = 0 or 180°). RayVector m_vpRays; //!< Vector of all rays contained by vvpRayMatrix. May contain duplicates at poles (theta = 0 or 180°).
std::set<RayPtr> m_vpUniqueRays;//!< Unique set of all rays contained by vvpRayMatrix. std::set<RayPtr> m_vpUniqueRays;//!< Unique set of all rays contained by vvpRayMatrix.
bool m_bCircularPhi = false; //!< Indicates whether the azimuth vector is considered to be circular (phi covers full 360 degrees) or not.
private: private:
CRayGrid(const RayMatrix& rayMatrix, const std::vector<double>& thetaDeg, const std::vector<double>& phiDeg, const bool circularPhi = false); CRayGrid(const RayMatrix& rayMatrix, const std::vector<double>& thetaDeg, const std::vector<double>& phiDeg, const bool circularPhi = false);
......
...@@ -117,6 +117,8 @@ void CAdaptiveRayGrid::ZoomIntoRay(const std::shared_ptr<CRay> pZoomRay, const d ...@@ -117,6 +117,8 @@ void CAdaptiveRayGrid::ZoomIntoRay(const std::shared_ptr<CRay> pZoomRay, const d
newRayMatrix[idxTheta][idxPhi] = pCurrentRay; newRayMatrix[idxTheta][idxPhi] = pCurrentRay;
} }
} }
m_bCircularPhi = m_bCircularPhi && HasPoleDirection(pZoomRay);
SetRayMatrix(newRayMatrix); SetRayMatrix(newRayMatrix);
} }
#pragma endregion #pragma endregion
......
...@@ -167,12 +167,26 @@ void TestSourceReceiverAzimuthAbove324Deg() ...@@ -167,12 +167,26 @@ void TestSourceReceiverAzimuthAbove324Deg()
runTest(atmosphere, sourcePosition, receiverPosition, filename); 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.
{
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;
std::vector<std::shared_ptr<CRay>> eigenrays = engine.Run(atmosphere, sourcePosition, receiverPosition);
}
int main(int iNumInArgs, char* pcInArgs[]) int main(int iNumInArgs, char* pcInArgs[])
{ {
//Disable multi-threading for debugging purposes //Disable multi-threading for debugging purposes
omp_set_num_threads(1); omp_set_num_threads(1);
//TestSpecialSpreadingLossCase();
//TestSourceReceiverAzimuthAbove324Deg(); //TestSourceReceiverAzimuthAbove324Deg();
const CStratifiedAtmosphere homAtmosphere = GetHomogeneousAtmosphere(); const CStratifiedAtmosphere homAtmosphere = GetHomogeneousAtmosphere();
......
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