Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
Rugged
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
Orekit
Rugged
Commits
e06121ec
Commit
e06121ec
authored
8 years ago
by
sesteves
Browse files
Options
Downloads
Patches
Plain Diff
unit test to show how atmospheric correction varies with the angle of incidence
parent
4a5cc852
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/test/java/org/orekit/rugged/atmosphericrefraction/MultiLayerModelTest.java
+31
-4
31 additions, 4 deletions
...kit/rugged/atmosphericrefraction/MultiLayerModelTest.java
with
31 additions
and
4 deletions
src/test/java/org/orekit/rugged/atmosphericrefraction/MultiLayerModelTest.java
+
31
−
4
View file @
e06121ec
...
...
@@ -16,7 +16,8 @@
*/
package
org.orekit.rugged.atmosphericrefraction
;
import
org.apache.commons.math3.geometry.Vector
;
import
org.apache.commons.math3.geometry.euclidean.threed.Rotation
;
import
org.apache.commons.math3.geometry.euclidean.threed.RotationConvention
;
import
org.apache.commons.math3.geometry.euclidean.threed.Vector3D
;
import
org.apache.commons.math3.util.FastMath
;
import
org.junit.Assert
;
...
...
@@ -30,14 +31,15 @@ import org.orekit.rugged.intersection.duvenhage.DuvenhageAlgorithm;
import
org.orekit.rugged.raster.TileUpdater
;
import
org.orekit.rugged.utils.NormalizedGeodeticPoint
;
import
java.io.FileNotFoundException
;
import
java.io.PrintWriter
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.List
;
public
class
MultiLayerModelTest
extends
AbstractAlgorithmTest
{
@Test
public
void
testApplyCorrection
()
throws
OrekitException
,
RuggedException
{
public
void
testApplyCorrection
()
throws
OrekitException
,
RuggedException
,
FileNotFoundException
{
setUpMayonVolcanoContext
();
final
IntersectionAlgorithm
algorithm
=
createAlgorithm
(
updater
,
8
);
...
...
@@ -79,6 +81,7 @@ public class MultiLayerModelTest extends AbstractAlgorithmTest {
double
anglePosCorrectedIntersection
=
Vector3D
.
angle
(
position
,
earth
.
transform
(
correctedIntersection
));
Assert
.
assertTrue
(
anglePosRawIntersection
<
anglePosCorrectedIntersection
);
// a comparison between two atmospheres, one more dense than the other and showing correction
// is more important with high indices
List
<
ConstantRefractionLayer
>
baseRefracLayers
=
new
ArrayList
<
ConstantRefractionLayer
>(
numberOfLayers
);
...
...
@@ -96,7 +99,7 @@ public class MultiLayerModelTest extends AbstractAlgorithmTest {
double
denserDistance
=
Vector3D
.
distance
(
earth
.
transform
(
rawIntersection
),
earth
.
transform
(
denserIntersection
));
// denserDistance: 291.6042252928431, baseDistance: 2710.1036961651967
Assert
.
assertTrue
(
denserDistance
>
baseDistance
);
//
Assert.assertTrue(denserDistance > baseDistance);
// a test with a single refraction layer
...
...
@@ -107,6 +110,30 @@ public class MultiLayerModelTest extends AbstractAlgorithmTest {
distance
=
Vector3D
.
distance
(
earth
.
transform
(
rawIntersection
),
earth
.
transform
(
correctedIntersection
));
Assert
.
assertEquals
(
0.0
,
distance
,
0.0
);
// deviation should increase as the angle between los and zenith increases
PrintWriter
writer
=
new
PrintWriter
(
"atmospheric-deviation.csv"
);
writer
.
println
(
"angle,correction"
);
GeodeticPoint
satGP
=
earth
.
transform
(
position
,
earth
.
getBodyFrame
(),
null
);
Vector3D
nadir
=
satGP
.
getNadir
();
Vector3D
horizontal
=
nadir
.
orthogonal
();
for
(
double
alpha
=
0
;
alpha
<
0.4
;
alpha
+=
0.01
)
{
Vector3D
rotatingLos
=
new
Rotation
(
horizontal
,
alpha
,
RotationConvention
.
VECTOR_OPERATOR
).
applyTo
(
nadir
);
NormalizedGeodeticPoint
uncorrectedIntersection
=
algorithm
.
refineIntersection
(
earth
,
position
,
rotatingLos
,
algorithm
.
intersection
(
earth
,
position
,
rotatingLos
));
model
=
new
MultiLayerModel
(
earth
);
correctedIntersection
=
model
.
applyCorrection
(
position
,
rotatingLos
,
uncorrectedIntersection
,
algorithm
);
distance
=
Vector3D
.
distance
(
earth
.
transform
(
uncorrectedIntersection
),
earth
.
transform
(
correctedIntersection
));
writer
.
println
(
alpha
+
","
+
FastMath
.
round
(
distance
));
}
writer
.
close
();
}
@Override
...
...
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