Commit 1fb2a396 authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen
Browse files

Merge branch 'develop' of https://git.rwth-aachen.de/ita/ITAPropagationPathSim into develop

parents 61307308 940fecac
......@@ -13,6 +13,7 @@ endif( )
# dependencies
vista_use_package( ITABase REQUIRED FIND_DEPENDENCIES )
vista_use_package( ITAGeo REQUIRED FIND_DEPENDENCIES )
# NOTE: Do not link against ITAPropagationModels. Otherwise, a circular link might be established.
if( ITA_PROPAGATION_PATH_SIM_WITH_OPENMP )
vista_use_package( OpenMP REQUIRED )
endif( )
......
......@@ -25,8 +25,8 @@
#include <VistaBase/VistaVector3D.h>
// ITA includes
#include <ITAPropagationPathSim/AtmosphericRayTracing/EigenraySearch/Settings.h>
#include <ITAPropagationPathSim/AtmosphericRayTracing/Simulation/Settings.h>
#include <ITAPropagationPathSim/AtmosphericRayTracing/EigenraySearch/EigenraySettings.h>
#include <ITAPropagationPathSim/AtmosphericRayTracing/Simulation/ARTSettings.h>
#include <ITAPropagationPathSim/AtmosphericRayTracing/Rays.h>
#include <ITAGeo/Atmosphere/StratifiedAtmosphere.h>
......
......@@ -29,25 +29,25 @@ namespace ITAPropagationPathSim
namespace EigenraySearch {
struct ITA_PROPAGATION_PATH_SIM_API RayAdaptationSettings {
struct {
int maxNAdaptations = 15; //< Abort after N adaptations of the ray resolution
double minAngleResolutionDeg = 0.001; //< Abort if angle between neighboring rays is below this value []
int maxNAdaptations = 30; //!< Abort after N adaptations of the ray resolution
double minAngleResolutionDeg = 0.001; //!< Abort if angle between neighboring rays is below this value []
} abort;
struct {
double maxReceiverRadius = 1; //< Maximum radius of receiver sphere [m]
double maxSourceReceiverAngle = 1; //< Maximum angle between vectors from source to receiver point and receiver sphere []
double maxAngleForGeomSpreading = 0.01; //< Angular resolution of rays which is required to calculate spreading loss []
double maxReceiverRadius = 1; //!< Maximum radius of receiver sphere [m]
double maxSourceReceiverAngle = 1; //!< Maximum angle between vectors from source to receiver point and receiver sphere []
double maxAngleForGeomSpreading = 0.01; //!< Angular resolution of rays which is required to calculate spreading loss []
} accuracy;
struct {
bool bActive = true; //< Switch to enable/disable advanced ray zooming
double threshold = 0.1; //< Threshold between 0 and 2 above which advanced ray zooming is performed (0 = always, 2 = never)
bool bActive = false; //!< Switch to enable/disable advanced ray zooming
double threshold = 0.1; //!< Threshold between 0 and 2 above which advanced ray zooming is performed (0 = always, 2 = never)
} advancedRayZooming;
};
struct ITA_PROPAGATION_PATH_SIM_API RayTracingAbortSettings {
int maxReflectionOrder = 1; //< Maximum considered order of reflections
double maxTime = 30; //< Maximum propagation time of rays [s]
bool bAbortOnReceiverDistIncrease = true; //< If enabled, ray tracing will be aborted as soon as ray receiver distance increases
int maxReflectionOrder = 1; //!< Maximum considered order of reflections
double maxTime = 30; //!< Maximum propagation time of rays [s]
bool bAbortOnReceiverDistIncrease = true; //!< If enabled, ray tracing will be aborted as soon as ray receiver distance increases
};
struct ITA_PROPAGATION_PATH_SIM_API Settings {
RayTracingAbortSettings rayTracing;
......
......@@ -5,8 +5,8 @@ set( RelativeDir "include/ITAPropagationPathSim/AtmosphericRayTracing/EigenraySe
set( RelativeSourceGroup "Header Files\\ITAPropagationPathSim\\AtmosphericRayTracing\\EigenraySearch" )
set( DirFiles
Settings.h
Engine.h
EigenraySettings.h
EigenrayEngine.h
AdaptiveRayGrid.h
)
......
......@@ -47,14 +47,14 @@ namespace ITAPropagationPathSim
typedef std::vector< RayPtr > RayVector;
typedef std::vector<RayVector> RayMatrix;
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_vdPhiDeg; //< Sorted vector of azimuth angles in degrees.
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_vdPhiDeg; //!< Sorted vector of azimuth angles in degrees.
private:
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°).
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.
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°).
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:
CRayGrid(const RayMatrix& rayMatrix, const std::vector<double>& thetaDeg, const std::vector<double>& phiDeg, const bool circularPhi = false);
......
......@@ -51,7 +51,7 @@ namespace ITAPropagationPathSim
class ITA_PROPAGATION_PATH_SIM_API CRayReceiverData {
public:
bool bDistanceUpdatedInLastIt; //< indicates whether receiver distance was updated in last during last integration step
bool bDistanceUpdatedInLastIt; //!< indicates whether receiver distance was updated in last during last integration step
float distance;
int idxMinDist;
int reflectionOrder;
......
......@@ -25,7 +25,7 @@
#include <VistaBase/VistaVector3D.h>
// ITA includes
#include <ITAPropagationPathSim/AtmosphericRayTracing/Simulation/Settings.h>
#include <ITAPropagationPathSim/AtmosphericRayTracing/Simulation/ARTSettings.h>
#include <ITAPropagationPathSim/AtmosphericRayTracing/Rays.h>
#include <ITAGeo/Atmosphere/StratifiedAtmosphere.h>
......
......@@ -62,8 +62,8 @@ namespace ITAPropagationPathSim
struct ITA_PROPAGATION_PATH_SIM_API AdaptiveIntegrationSettings {
bool bActive = true; //!< If this is set to false, the adaptation is bypassed and the integration step size is therefore constant
double dMaxError = 0.015; //< For errors above this threshold the time step is decreased.
double dUncriticalError = 0.005; //< An error below this limit allows to increase the time step again.
double dMaxError = 0.015; //!< For errors above this threshold the time step is decreased.
double dUncriticalError = 0.005; //!< An error below this limit allows to increase the time step again.
unsigned int iMaxAdaptationLevel = 31; //!< Maximum times, the time step is halfed. Maximum valid value = 31.
};
......
......@@ -5,8 +5,8 @@ set( RelativeDir "include/ITAPropagationPathSim/AtmosphericRayTracing/Simulation
set( RelativeSourceGroup "Header Files\\ITAPropagationPathSim\\AtmosphericRayTracing\\Simulation" )
set( DirFiles
Settings.h
Engine.h
ARTSettings.h
ARTEngine.h
)
set( DirFiles_SourceGroup "${RelativeSourceGroup}" )
......
......@@ -18,12 +18,12 @@ namespace ITAPropagationPathSim
namespace Diffraction
{
bool ITA_PROPAGATION_PATH_SIM_API ConstructAperturePoints( shared_ptr< const CEmitter > pEmitter, shared_ptr< const CSensor > pSensor, const int iNumberIterations, const vector< CPropagationShapeShared > pPropagationListsIn, vector< CPropagationShapeShared >& pPropagationListsOut, ITABase::IProgressHandler* pProgressHandler = nullptr );
ITA_PROPAGATION_PATH_SIM_API bool ConstructAperturePoints( shared_ptr< const CEmitter > pEmitter, shared_ptr< const CSensor > pSensor, const int iNumberIterations, const vector< CPropagationShapeShared > pPropagationListsIn, vector< CPropagationShapeShared >& pPropagationListsOut, ITABase::IProgressHandler* pProgressHandler = nullptr );
//!< Exclude propagation paths with an accumulated diffraction angle that is bigger than the angle threshold.
bool ITA_PROPAGATION_PATH_SIM_API AccumulatedAngleCulling( const float fAngleThreshold, shared_ptr< const CEmitter > pEmitter, const vector< CPropagationShapeShared > pPropagationTreeIn, vector< CPropagationShapeShared >& pPropagationTreeOut );
ITA_PROPAGATION_PATH_SIM_API bool AccumulatedAngleCulling( const float fAngleThreshold, shared_ptr< const CEmitter > pEmitter, const vector< CPropagationShapeShared > pPropagationTreeIn, vector< CPropagationShapeShared >& pPropagationTreeOut );
bool ITA_PROPAGATION_PATH_SIM_API AccumulatedAngleCulling( const float fAngleThreshold, shared_ptr< const CEmitter > pEmitter, shared_ptr<const CSensor> pSensor, const vector<CPropagationShapeShared> pPropagationListsIn, vector< CPropagationShapeShared >& pPropagationListsOut );
ITA_PROPAGATION_PATH_SIM_API bool AccumulatedAngleCulling( const float fAngleThreshold, shared_ptr< const CEmitter > pEmitter, shared_ptr<const CSensor> pSensor, const vector<CPropagationShapeShared> pPropagationListsIn, vector< CPropagationShapeShared >& pPropagationListsOut );
}
}
......
......@@ -19,14 +19,11 @@ namespace ITAPropagationPathSim
namespace ImageConstruction
{
ITA_PROPAGATION_PATH_SIM_API bool ConstructImageSources(shared_ptr<const CEmitter> pEmitter, vector<CPropagationShapeShared>& vpPropagationTree);
ITA_PROPAGATION_PATH_SIM_API bool ConstructImageReceivers(shared_ptr<const CSensor> pSensor, vector<CPropagationShapeShared>& vpPropagationLists, CShapesMap vpVisibilityMap, const int iMaxReflectionOrder);
ITA_PROPAGATION_PATH_SIM_API bool ConstructImages( const VistaVector3D& v3Pos, vector< CPropagationShapeShared >& vpPropagationTree );
ITA_PROPAGATION_PATH_SIM_API bool ConstructImageApertures(const vector<CPropagationShapeShared> vpPropagationListsIn, vector<CPropagationShapeShared>& vpPropagationListsOut);
ITA_PROPAGATION_PATH_SIM_API bool ConstructImageEdges(vector<CPropagationShapeShared>& vpPropagationTree);
ITA_PROPAGATION_PATH_SIM_API bool ConstructImageApertures( const vector< CPropagationShapeShared > vpPropagationListsIn, vector< CPropagationShapeShared >& vpPropagationListsOut );
ITA_PROPAGATION_PATH_SIM_API bool ConstructImageEdges( vector< CPropagationShapeShared >& vpPropagationTree );
}
}
}
......
......@@ -32,6 +32,7 @@ namespace ITAPropagationPathSim
bool bFilterIntersectedPaths;
int iNumberIterationApexCalculation;
float fIntersectionTestResolution;
bool bReciprocalPropagationSimulation;
inline CSimulationConfig()
{
......@@ -48,6 +49,7 @@ namespace ITAPropagationPathSim
bFilterIntersectedPaths = false;
iNumberIterationApexCalculation = 5;
fIntersectionTestResolution = 0.001f;
bReciprocalPropagationSimulation = true;
};
};
......@@ -71,7 +73,7 @@ namespace ITAPropagationPathSim
iMaxDiffractionOrder = 2;
iMaxReflectionOrder = 2;
iMaxCombinedOrder = 4;
fDynamicRange = -1.0f; // disabled
fDynamicRange = 124;
fReflectionPenalty = -10.0f * log10( 0.8f ); // for conservative sim, set to 0
fDiffractionPenalty = 2.5f; // for conservative sim, set to 0
fAccumulatedAngleThreshold = -1.0f; // disabled
......@@ -87,17 +89,20 @@ namespace ITAPropagationPathSim
void InitializePathEnvironment( shared_ptr< const Halfedge::CMeshModelList > pMeshModelList );
void ApplyEmitter( shared_ptr< CEmitter > pEmitter );
void ApplySensor( shared_ptr< CSensor > pSensor );
//! Set the source and target entities for the path finder
void SetEntities( shared_ptr< CEmitter > pEmitter, shared_ptr< CSensor > pSensor );
void UpdateEmitter( shared_ptr< CEmitter > pEmitter );
void UpdateSensor( shared_ptr< CSensor > pSensor );
void ConstructPropagationPathsWithStopWatch( CPropagationPathList& oPaths );
//! Constructs the propagation paths (requires entitites)
void ConstructPropagationPaths( CPropagationPathList& oPaths );
size_t GetNumberPropagationPathCandidates();
//Just for testing, the ApplyEmitter is divided into two parts
void ApplyEmitterForTestingOnlyTreeAndImageEdges( shared_ptr<CEmitter> pEmitter );
void ApplyEmitterForTestingOnlyImageSources();
protected:
void ApplyEmitter( shared_ptr< CEmitter > pEmitter );
void ApplySensor( shared_ptr< CSensor > pSensor );
private:
......@@ -114,8 +119,9 @@ namespace ITAPropagationPathSim
CShapesMap m_mvpShapeVisibilityMap; //!< Map of which shape can illuminate which ones
vector<CPropagationShapeShared> m_vpPropagationTree; //!< Vector of all propagation shapes (as well as its children) visible to the emitter
vector<CPropagationShapeShared> m_vpPropagationCandidates; //!< Vector of all propagation shape visible to the emitter with each one pointing to up to one child with the last one visible to the sensor
shared_ptr<CEmitter> m_pEmitter; //!< Const pointer to emitter
shared_ptr<CSensor> m_pSensor; //!< Const pointer to sensor
shared_ptr< CEmitter > m_pEmitter; //!< Const pointer to emitter
shared_ptr< CSensor > m_pSensor; //!< Const pointer to sensor
float GetMaxPropagationRange() const;
bool GetMaxPropagationRangeValid() const;
......@@ -124,10 +130,10 @@ namespace ITAPropagationPathSim
bool CanPointIlluminateFace( const VistaVector3D & v3Point, const string & sMeshModelName, CITAMesh::FaceHandle hFace );
bool CanPointIlluminateEdge( const VistaVector3D & v3Point, CPropagationEdgeShared & pPropagationEdge, const bool& bTestIntersection = false );
bool IsPathVisible( const VistaVector3D & v3StartPoint, const VistaVector3D & v3EndPoint );
void CanEdgeIlluminateFace( bool & bCanEdgeIlluminateFaceOut, ITAPropagationPathSim::CombinedModel::CPropagationFaceShared & pPropagationFace, ITAPropagationPathSim::CombinedModel::CPropagationEdgeShared & pPropagationEdge );
void CanFaceIlluminateEdge( bool & bCanFaceIlluminateEdgeOut, CPropagationFaceShared & pPropagationFace, CPropagationEdgeShared & pPropagationEdge );
void CanFaceIlluminateFace( bool & bCanFaceIlluminateFaceOut, CPropagationFaceShared & pPropagationFaceStart, CPropagationFaceShared & pPropagationFaceEnd );
void CanEdgeIlluminateEdge( bool & bCanEdgeIlluminateEdgeOut, CPropagationEdgeShared & pPropagationEdgeStart, CPropagationEdgeShared & pPropagationEdgeEnd, const bool& bTestIntersection = false );
void CanEdgeIlluminateFace( bool& bCanEdgeIlluminateFaceOut, ITAPropagationPathSim::CombinedModel::CPropagationFaceShared & pPropagationFace, ITAPropagationPathSim::CombinedModel::CPropagationEdgeShared & pPropagationEdge );
void CanFaceIlluminateEdge( bool& bCanFaceIlluminateEdgeOut, CPropagationFaceShared& pPropagationFace, CPropagationEdgeShared & pPropagationEdge );
void CanFaceIlluminateFace( bool& bCanFaceIlluminateFaceOut, CPropagationFaceShared& pPropagationFaceStart, CPropagationFaceShared & pPropagationFaceEnd );
void CanEdgeIlluminateEdge( bool& bCanEdgeIlluminateEdgeOut, CPropagationEdgeShared& pPropagationEdgeStart, CPropagationEdgeShared & pPropagationEdgeEnd, const bool& bTestIntersection = false );
void ConstructPropagationShapes();
// Create the propagation tree
......
......@@ -25,7 +25,7 @@ namespace ITAPropagationPathSim
typedef shared_ptr<CPropagationFace> CPropagationFaceShared;
typedef shared_ptr<CPropagationEdge> CPropagationEdgeShared;
typedef OpenMesh::PolyMesh_ArrayKernelT<> CITAMesh;
typedef map <size_t, vector<CPropagationShapeShared>> CShapesMap;
typedef map< size_t, vector< CPropagationShapeShared > > CShapesMap;
typedef string MeshModelHandle;
typedef pair < MeshModelHandle, CITAMesh::FaceHandle> PropagationFaceHandle;
......
#include <ITAPropagationPathSim/AtmosphericRayTracing/EigenraySearch/Engine.h>
#include <ITAPropagationPathSim/AtmosphericRayTracing/EigenraySearch/EigenrayEngine.h>
// ITA includes
#include "Worker.h"
......
......@@ -25,13 +25,13 @@
#include <VistaBase/VistaVector3D.h>
// ITA includes
#include <ITAPropagationPathSim/AtmosphericRayTracing/Simulation/Engine.h>
#include <ITAPropagationPathSim/AtmosphericRayTracing/Simulation/Settings.h>
#include <ITAPropagationPathSim/AtmosphericRayTracing/Simulation/ARTEngine.h>
#include <ITAPropagationPathSim/AtmosphericRayTracing/Simulation/ARTSettings.h>
#include <ITAPropagationPathSim/AtmosphericRayTracing/Rays.h>
#include <ITAPropagationPathSim/AtmosphericRayTracing/RayGrid.h>
#include <ITAPropagationPathSim/AtmosphericRayTracing/EigenraySearch/Settings.h>
#include <ITAPropagationPathSim/AtmosphericRayTracing/EigenraySearch/EigenraySettings.h>
#include <ITAPropagationPathSim/AtmosphericRayTracing/EigenraySearch/AdaptiveRayGrid.h>
#include <ITAGeo/Atmosphere/StratifiedAtmosphere.h>
......@@ -110,7 +110,7 @@ namespace ITAPropagationPathSim
class CInitialWorker : public CWorkerBase
{
private:
RayVector m_vpMinDistanceRays; //< Vector containing the current ray of minimum receiver distance for each reflection order
RayVector m_vpMinDistanceRays; //!< Vector containing the current ray of minimum receiver distance for each reflection order
public:
CInitialWorker(const VistaVector3D& sourcePosition, const VistaVector3D& receiverPosition, const Simulation::Settings& simSettings, const RayTracingAbortSettings& abortSettings);
......
......@@ -5,7 +5,7 @@ set( RelativeDir "src/ITAPropagationPathSim/AtmosphericRayTracing/EigenraySearch
set( RelativeSourceGroup "Source Files\\ITAPropagationPathSim\\AtmosphericRayTracing\\EigenraySearch" )
set( DirFiles
Engine.cpp
EigenrayEngine.cpp
AdaptiveRayGrid.cpp
Worker.h
Worker.cpp
......
#include <ITAPropagationPathSim/AtmosphericRayTracing/Simulation/Engine.h>
#include <ITAPropagationPathSim/AtmosphericRayTracing/Simulation/ARTEngine.h>
// ITA includes
#include "AdaptiveSolver.h"
......
......@@ -19,7 +19,7 @@
#ifndef IW_ITA_PROPAGATIONPATHSIM_ART_SIMULATION_ADAPTIVESOLVER
#define IW_ITA_PROPAGATIONPATHSIM_ART_SIMULATION_ADAPTIVESOLVER
#include <ITAPropagationPathSim/AtmosphericRayTracing/Simulation/Settings.h>
#include <ITAPropagationPathSim/AtmosphericRayTracing/Simulation/ARTSettings.h>
// ITA includes
#include <ITAGeo/Atmosphere/StratifiedAtmosphere.h>
......
......@@ -7,7 +7,7 @@ set( RelativeSourceGroup "Source Files\\ITAPropagationPathSim\\AtmosphericRayTra
set( DirFiles
AdaptiveSolver.h
AdaptiveSolver.cpp
Engine.cpp
ARTEngine.cpp
)
set( DirFiles_SourceGroup "${RelativeSourceGroup}" )
......
......@@ -83,7 +83,7 @@ bool RecursiveAngleCulling( const ITAPropagationPathSim::CombinedModel::CPropaga
return true;
}
bool ITAPropagationPathSim::CombinedModel::Diffraction::ConstructAperturePoints( shared_ptr< const CEmitter > pEmitter, shared_ptr< const CSensor > pSensor, const int iNumberIterations, const vector< CPropagationShapeShared> vpPropagationListsIn, vector<CPropagationShapeShared>& pPropagationListsOut, ITABase::IProgressHandler* pProgressHandler /* = nullptr */ )
bool ITAPropagationPathSim::CombinedModel::Diffraction::ConstructAperturePoints( shared_ptr< const CEmitter > pEmitter, shared_ptr< const CSensor > pSensor, const int iNumberIterations, const vector< CPropagationShapeShared > vpPropagationListsIn, vector< CPropagationShapeShared >& pPropagationListsOut, ITABase::IProgressHandler* pProgressHandler /* = nullptr */ )
{
pPropagationListsOut.clear();
......
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