IAP GITLAB
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
corsika
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Air Shower Physics
corsika
Commits
84550617
Commit
84550617
authored
4 years ago
by
Nikos Karastathis
Browse files
Options
Downloads
Patches
Plain Diff
added distance from the point of emission to an observer to signal path. Needed in CoREAS.
parent
5d3fd53c
No related branches found
No related tags found
1 merge request
!329
Radio interface
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
corsika/modules/radio/propagators/SignalPath.hpp
+8
-5
8 additions, 5 deletions
corsika/modules/radio/propagators/SignalPath.hpp
corsika/modules/radio/propagators/StraightPropagator.hpp
+9
-2
9 additions, 2 deletions
corsika/modules/radio/propagators/StraightPropagator.hpp
with
17 additions
and
7 deletions
corsika/modules/radio/propagators/SignalPath.hpp
+
8
−
5
View file @
84550617
...
...
@@ -22,23 +22,26 @@ namespace corsika {
using
path
=
std
::
deque
<
Point
>
;
//TODO: discuss if we need average refractivity or average refractive index
TimeType
const
total_time_
;
///< The total propagation time.
double
const
average_refractiv
ity
_
;
///< The average refractiv
ity
.
double
const
average_refractiv
e_index
_
;
///< The average refractiv
e index
.
Vector
<
dimensionless_d
>
const
emit_
;
///< The (unit-length) emission vector.
Vector
<
dimensionless_d
>
const
receive_
;
///< The (unit-length) receive vector.
path
const
points_
;
///< A collection of points that make up the geometrical path.
LengthType
const
R_distance_
;
///< The distance from the point of emission to an observer. TODO: optical path, not geometrical! (probably)
/**
* Create a new SignalPath instance.
*/
SignalPath
(
TimeType
const
total_time
,
double
const
average_refractiv
ity
,
SignalPath
(
TimeType
const
total_time
,
double
const
average_refractiv
e_index
,
Vector
<
dimensionless_d
>
const
emit
,
Vector
<
dimensionless_d
>
const
receive
,
path
const
&
points
)
LengthType
const
R_distance
,
path
const
&
points
)
:
Path
(
points
)
,
total_time_
(
total_time
)
,
average_refractiv
ity
_
(
average_refractiv
ity
)
,
average_refractiv
e_index
_
(
average_refractiv
e_index
)
,
emit_
(
emit
)
,
receive_
(
receive
)
{}
,
receive_
(
receive
)
,
R_distance_
(
R_distance
)
{}
};
// class SignalPath
...
...
This diff is collapsed.
Click to expand it.
corsika/modules/radio/propagators/StraightPropagator.hpp
+
9
−
2
View file @
84550617
...
...
@@ -57,6 +57,9 @@ namespace corsika {
*/
auto
direction
{(
destination
-
source
).
normalized
()};
// the distance from the point of emission to an observer
auto
distance_
{(
destination
-
source
).
getNorm
()};
// the step is the direction vector with length `stepsize`
auto
step
{
direction
*
stepsize
};
...
...
@@ -73,6 +76,7 @@ namespace corsika {
std
::
vector
<
double
>
rindex
;
rindex
.
reserve
(
n_points
);
// TODO: Re-think the efficiency of this for loop
// loop from `source` to `destination` to store values before Simpson's rule.
// this loop skips the last point 'destination'
for
(
auto
point
=
source
;
(
point
-
destination
).
getNorm
()
>
0.6
*
stepsize
;
...
...
@@ -117,10 +121,13 @@ namespace corsika {
TimeType
time
=
sum
*
(
h
/
(
3
*
constants
::
c
));
// compute the average refractivity.
auto
average_refractivity
=
refra_
/
N
;
auto
averageRefractiveIndex_
=
refra_
/
N
;
// refractivity definition: (n - 1)
// realize that emission and receive vector are 'direction' in this case.
return
{
SignalPath
(
time
,
average_refractivity
,
direction
,
direction
,
points
)
};
//TODO: receive and emission vector should have opposite signs!
return
{
SignalPath
(
time
,
averageRefractiveIndex_
,
direction
,
direction
,
distance_
,
points
)
};
}
// END: propagate()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment