Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Institute of Technical Acoustics (ITA)
ITAPropagationPathSim
Commits
2e5011fe
Commit
2e5011fe
authored
May 26, 2020
by
Philipp Schäfer
Browse files
ART - RayToPropagationPath
- fixed a bug where receiver would have data of second last element instead of last
parent
2d7f3311
Changes
1
Hide whitespace changes
Inline
Side-by-side
include/ITAPropagationPathSim/AtmosphericRayTracing/Utils/RayToPropagationPath.h
View file @
2e5011fe
...
...
@@ -45,7 +45,7 @@ namespace ITAPropagationPathSim
VistaVector3D
position
,
wavefrontNormal
;
propagationPath
.
push_back
(
std
::
make_shared
<
ITAGeo
::
CEmitterInhomogeneous
>
(
ray
.
SourcePoint
(),
ray
.
InitialDirection
())
);
for
(
int
idx
=
1
;
idx
<
ray
.
size
()
-
1
;
idx
++
)
for
(
int
idx
=
1
;
idx
<
ray
.
size
();
idx
++
)
{
position
=
ray
[
idx
].
position
;
wavefrontNormal
=
ray
[
idx
].
wavefrontNormal
;
...
...
@@ -55,7 +55,13 @@ namespace ITAPropagationPathSim
wavefrontNormal
[
Vista
::
Z
]
=
-
wavefrontNormal
[
Vista
::
Z
];
}
if
(
ray
.
IsReflectionIdx
(
idx
))
if
(
idx
==
ray
.
size
()
-
1
)
{
auto
pReceiver
=
std
::
make_shared
<
ITAGeo
::
CSensorInhomogeneous
>
(
position
,
wavefrontNormal
,
ray
[
idx
].
timeStamp
);
pReceiver
->
dSpreadingLoss
=
ray
.
SpreadingLoss
();
propagationPath
.
push_back
(
pReceiver
);
}
else
if
(
ray
.
IsReflectionIdx
(
idx
))
{
auto
anchor
=
std
::
make_shared
<
ITAGeo
::
CSpecularReflectionInhomogeneous
>
(
position
,
wavefrontNormal
,
ray
[
idx
].
timeStamp
);
anchor
->
v3FaceNormal
=
VistaVector3D
(
0
,
0
,
1
);
...
...
@@ -64,9 +70,6 @@ namespace ITAPropagationPathSim
else
propagationPath
.
push_back
(
std
::
make_shared
<
ITAGeo
::
CInhomogeneity
>
(
position
,
wavefrontNormal
,
ray
[
idx
].
timeStamp
));
}
auto
pReceiver
=
std
::
make_shared
<
ITAGeo
::
CSensorInhomogeneous
>
(
position
,
wavefrontNormal
,
ray
.
LastTimeStamp
());
pReceiver
->
dSpreadingLoss
=
ray
.
SpreadingLoss
();
propagationPath
.
push_back
(
pReceiver
);
return
propagationPath
;
}
...
...
Write
Preview
Supports
Markdown
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