Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
ITAPropagationPathSim
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Institute of Technical Acoustics (ITA)
ITAPropagationPathSim
Commits
78b33e95
Commit
78b33e95
authored
Feb 20, 2019
by
Armin Erraji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added angle culling algorithms for the propagation path simulation.
parent
1d4e1782
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
428 additions
and
222 deletions
+428
-222
include/ITAPropagationPathSim/CombinedModel/DiffractionLocator.h
.../ITAPropagationPathSim/CombinedModel/DiffractionLocator.h
+4
-1
src/ITAPropagationPathSim/CombinedModel/DiffractionLocator.cpp
...TAPropagationPathSim/CombinedModel/DiffractionLocator.cpp
+405
-210
src/ITAPropagationPathSim/CombinedModel/ImageConstructor.cpp
src/ITAPropagationPathSim/CombinedModel/ImageConstructor.cpp
+3
-3
src/ITAPropagationPathSim/CombinedModel/PropagationEngine.cpp
...ITAPropagationPathSim/CombinedModel/PropagationEngine.cpp
+10
-3
src/ITAPropagationPathSim/CombinedModel/PropagationShapes.cpp
...ITAPropagationPathSim/CombinedModel/PropagationShapes.cpp
+1
-1
tests/CombinedModel/CombinedModelTest.cpp
tests/CombinedModel/CombinedModelTest.cpp
+5
-4
No files found.
include/ITAPropagationPathSim/CombinedModel/DiffractionLocator.h
View file @
78b33e95
...
...
@@ -20,7 +20,10 @@ namespace ITAPropagationPathSim
{
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
);
bool
ITA_PROPAGATION_PATH_SIM_API
AccumulatedAngleCulling
(
const
float
fAngleThreshold
,
const
vector
<
CPropagationShapeShared
>
pPropagationTreeIn
,
vector
<
CPropagationShapeShared
>&
pPropagationTreeOut
);
//!< 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
);
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
);
}
}
...
...
src/ITAPropagationPathSim/CombinedModel/DiffractionLocator.cpp
View file @
78b33e95
This diff is collapsed.
Click to expand it.
src/ITAPropagationPathSim/CombinedModel/ImageConstructor.cpp
View file @
78b33e95
...
...
@@ -227,14 +227,14 @@ namespace ITAPropagationPathSim
}
else
if
(
pPropagationShape
->
iShapeType
==
CPropagationShape
::
FACE
)
{
auto
pPropagationFace
=
dynam
ic_pointer_cast
<
CPropagationFace
>
(
pPropagationShape
);
auto
pPropagationFace
=
stat
ic_pointer_cast
<
CPropagationFace
>
(
pPropagationShape
);
//Create image vertices only for edges with faces as parents
if
(
!
pPropagationFace
->
pParent
.
expired
())
{
if
(
pPropagationFace
->
pParent
.
lock
()
->
iShapeType
==
CPropagationShape
::
FACE
)
{
auto
pParentFace
=
dynam
ic_pointer_cast
<
CPropagationFace
>
(
pPropagationFace
->
pParent
.
lock
());
auto
pParentFace
=
stat
ic_pointer_cast
<
CPropagationFace
>
(
pPropagationFace
->
pParent
.
lock
());
if
(
pParentFace
->
v3ImageEdgeSourceStart
!=
nullptr
)
{
...
...
@@ -256,7 +256,7 @@ namespace ITAPropagationPathSim
}
else
if
(
pPropagationFace
->
pParent
.
lock
()
->
iShapeType
==
CPropagationShape
::
EDGE
)
{
auto
pParentEdge
=
dynam
ic_pointer_cast
<
CPropagationEdge
>
(
pPropagationFace
->
pParent
.
lock
());
auto
pParentEdge
=
stat
ic_pointer_cast
<
CPropagationEdge
>
(
pPropagationFace
->
pParent
.
lock
());
//Calculate image edge source.
//A PointInFrontOfPlane test is not needed, because a backfaceculling with vertices and plane is already done.
...
...
src/ITAPropagationPathSim/CombinedModel/PropagationEngine.cpp
View file @
78b33e95
...
...
@@ -92,10 +92,10 @@ void ITAPropagationPathSim::CombinedModel::CPathEngine::ApplyEmitter(shared_ptr<
//Construct image edges
ImageConstruction
::
ConstructImageEdges
(
m_pEmitter
,
m_vpPropagationTree
);
//Calculate accumulated angle and
filte
r tree
if
(
m_pAccumulatedAngleThreshold
>
0
)
//Calculate accumulated angle and
angle culling fo
r tree
if
(
*
m_pAccumulatedAngleThreshold
>
0
)
{
Diffraction
::
AccumulatedAngleCulling
(
*
m_pAccumulatedAngleThreshold
,
m_vpPropagationTree
,
m_vpPropagationTree
);
Diffraction
::
AccumulatedAngleCulling
(
*
m_pAccumulatedAngleThreshold
,
m_
pEmitter
,
m_
vpPropagationTree
,
m_vpPropagationTree
);
}
}
...
...
@@ -131,6 +131,13 @@ void ITAPropagationPathSim::CombinedModel::CPathEngine::ConstructPropagationPath
Reflection
::
ConstructPointsOfReflection
(
m_pSensor
,
m_vpPropagationLists
,
m_vpPropagationLists
);
std
::
cout
<<
m_vpPropagationLists
.
size
()
<<
" path candidates after points of reflection calculated. Calculation time: "
<<
timeToString
(
sw
.
stop
())
<<
endl
;
//Calculate accumulated angle and filter lists
if
(
*
m_pAccumulatedAngleThreshold
>
0
)
{
sw
.
start
();
Diffraction
::
AccumulatedAngleCulling
(
*
m_pAccumulatedAngleThreshold
,
m_pEmitter
,
m_pSensor
,
m_vpPropagationLists
,
m_vpPropagationLists
);
std
::
cout
<<
m_vpPropagationLists
.
size
()
<<
" path candidates after angle culling. Calculation time: "
<<
timeToString
(
sw
.
stop
())
<<
endl
;
}
sw
.
start
();
if
(
*
m_pFilterIntersectedPaths
)
...
...
src/ITAPropagationPathSim/CombinedModel/PropagationShapes.cpp
View file @
78b33e95
...
...
@@ -36,7 +36,7 @@ void CPropagationEdge::CopyFrom(const CPropagationEdge & oPropagationEdgeIn)
hEdge
=
oPropagationEdgeIn
.
hEdge
;
hMainFace
=
oPropagationEdgeIn
.
hMainFace
;
hOppositeFace
=
oPropagationEdgeIn
.
hOppositeFace
;
v3
EdgeStart
=
oPropagationEdgeIn
.
v3EdgeStart
;
v3
StartVertex
=
oPropagationEdgeIn
.
v3StartVertex
;
v3EndVertex
=
oPropagationEdgeIn
.
v3EndVertex
;
v3MainFaceNormal
=
oPropagationEdgeIn
.
v3MainFaceNormal
;
v3OppositeFaceNormal
=
oPropagationEdgeIn
.
v3OppositeFaceNormal
;
...
...
tests/CombinedModel/CombinedModelTest.cpp
View file @
78b33e95
...
...
@@ -86,10 +86,11 @@ int main( int iNumInArgs, char* pcInArgs[] )
const
bool
bFilterNotVisiblePathsBetweenEdges
=
false
;
//Intersection test between edges(expensive)
const
bool
bFilterNotVisiblePointToEdge
=
true
;
//Intersection test between emitter/sensor and edges
const
bool
bFilterNotVisiblePaths
=
true
;
//Intersection test of calculated sub paths
const
float
fIntersectionTestResolution
=
0.001
;
const
int
iNumIterations
=
5
;
//!< Number of iterations for the calculation of the aperture points
const
int
iMaxDiffractionOrder
=
3
;
const
int
fMaxAccumulatedDiffractionAngle
=
-
2
*
ITAConstants
::
PI_F
;
const
int
iMaxDiffractionOrder
=
5
;
const
int
iMaxReflectionOrder
=
2
;
const
int
iMaxCombinedOrder
=
5
;
...
...
@@ -100,7 +101,7 @@ int main( int iNumInArgs, char* pcInArgs[] )
sw
.
start
();
pPathEngine
->
Configure
(
bOnlyNeighbouredEdgeDiffraction
,
bDiffractionOnlyIntoShadowRegion
,
bFilterNotVisiblePathsBetweenEdges
,
bFilterNotVisiblePointToEdge
,
bFilterNotVisiblePointToEdge
,
bFilterNotVisiblePaths
,
iNumIterations
);
pPathEngine
->
Configure
(
bOnlyNeighbouredEdgeDiffraction
,
bDiffractionOnlyIntoShadowRegion
,
bFilterNotVisiblePathsBetweenEdges
,
bFilterNotVisiblePointToEdge
,
bFilterNotVisiblePointToEdge
,
bFilterNotVisiblePaths
,
iNumIterations
,
fIntersectionTestResolution
,
fMaxAccumulatedDiffractionAngle
);
cout
<<
"Calculation time configuring filter: "
<<
timeToString
(
sw
.
stop
())
<<
endl
;
sw
.
start
();
...
...
@@ -150,7 +151,7 @@ int main( int iNumInArgs, char* pcInArgs[] )
oGeoModel
.
AddPropagationPathVisualization
(
oPath
,
sPathName
);
}
oPathListVisible
.
Store
(
"CombinedModelTest_"
+
sInFile
+
".json"
);
//
oPathListVisible.Store("CombinedModelTest_" + sInFile + ".json");
oGeoModel
.
Store
(
sSubFolder
+
"CombinedModelTest_"
+
sInFile
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment