Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
I
ITAPropagationModels
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Institute of Technical Acoustics (ITA)
ITAPropagationModels
Commits
7238a84d
Commit
7238a84d
authored
Nov 28, 2018
by
Armin Erraji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added functions GetNumSensorChannels and HasSameSensorAnchor().
parent
28dc2dc5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
9 deletions
+35
-9
include/ITAPropagationModels/FilterEngine.h
include/ITAPropagationModels/FilterEngine.h
+6
-1
src/ITAPropagationModels/FilterEngine.cpp
src/ITAPropagationModels/FilterEngine.cpp
+29
-8
No files found.
include/ITAPropagationModels/FilterEngine.h
View file @
7238a84d
...
...
@@ -92,7 +92,12 @@ namespace ITAPropagationModels
unique_ptr
<
ITABase
::
CHDFTSpectra
>
m_pAccumulatedSpectra
;
//!< Gathered propagation paths from list
unique_ptr
<
ITABase
::
CHDFTSpectra
>
m_pTempPropPathSpectra
;
//!< Single prop-path spectra
static
struct
m_DefaultValues
static
struct
m_DefaultReflectionModel
//!< Default values for reflections
{
int
iModel
=
1
;
};
static
struct
m_DefaultDiffractionModel
//!< Default values for diffractions
{
int
iModel
=
1
;
};
...
...
src/ITAPropagationModels/FilterEngine.cpp
View file @
7238a84d
...
...
@@ -22,20 +22,41 @@ CFilterEngine::~CFilterEngine()
{
}
int
CFilterEngine
::
GetNumSensorChannels
(
const
ITAGeo
::
CPropagationPathList
&
oPathList
)
int
CFilterEngine
::
GetNumSensorChannels
(
const
ITAGeo
::
CPropagationPathList
&
oPathList
)
{
//Check for correct structur of oPathList
if
(
!
HasSameSensorAnchor
(
oPathList
))
ITA_EXCEPT1
(
INVALID_PARAMETER
,
"The propagation path list has more than multiple sensor anchors."
);
ITA_EXCEPT1
(
INVALID_PARAMETER
,
"The propagation path list has more than multiple sensor anchors
or last anchor of paths is not a sensor
."
);
int
iNumChannels
;
auto
pPath
=
oPathList
[
0
];
return
0
;
//Cast the sensor that is always the last propagation anchor of a path
auto
pSensor
=
std
::
dynamic_pointer_cast
<
ITAGeo
::
CSensor
>
(
oPathList
[
0
][
oPathList
[
0
].
size
()
-
1
]);
return
pSensor
->
iNumChannels
;
}
bool
CFilterEngine
::
HasSameSensorAnchor
(
const
ITAGeo
::
CPropagationPathList
&
oPathList
)
bool
CFilterEngine
::
HasSameSensorAnchor
(
const
ITAGeo
::
CPropagationPathList
&
oPathList
)
{
ITA_EXCEPT_NOT_IMPLEMENTED
;
return
false
;
shared_ptr
<
ITAGeo
::
CSensor
>
pSensor
=
nullptr
;
//Last anchor of the paths must be a sensor and always the same sensor
for
(
auto
&
oPath
:
oPathList
)
{
if
(
oPath
[
oPath
.
size
()
-
1
]
->
iAnchorType
==
ITAGeo
::
CPropagationAnchor
::
ACOUSTIC_SENSOR
)
{
if
(
pSensor
=
nullptr
)
pSensor
=
std
::
dynamic_pointer_cast
<
ITAGeo
::
CSensor
>
(
oPath
[
oPath
.
size
()
-
1
]);
else
if
(
pSensor
!=
oPath
[
oPath
.
size
()
-
1
])
return
false
;
// not the same sensor
}
else
{
return
false
;
// last element not a sensor
}
}
//All paths end with the same sensor anchor
return
true
;
}
void
CFilterEngine
::
ApplyAcousticModels
(
ITAGeo
::
CPropagationPathList
&
oPathList
)
...
...
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