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
46b7f603
Commit
46b7f603
authored
10 years ago
by
Luc Maisonobe
Browse files
Options
Downloads
Patches
Plain Diff
Improved test coverage.
parent
e032add6
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/src/test/java/org/orekit/rugged/api/RuggedTest.java
+55
-0
55 additions, 0 deletions
core/src/test/java/org/orekit/rugged/api/RuggedTest.java
with
55 additions
and
0 deletions
core/src/test/java/org/orekit/rugged/api/RuggedTest.java
+
55
−
0
View file @
46b7f603
...
...
@@ -607,6 +607,61 @@ public class RuggedTest {
}
@Test
public
void
testLocalizationsinglePointNoCorrections
()
throws
RuggedException
,
OrekitException
,
URISyntaxException
{
int
dimension
=
200
;
String
path
=
getClass
().
getClassLoader
().
getResource
(
"orekit-data"
).
toURI
().
getPath
();
DataProvidersManager
.
getInstance
().
addProvider
(
new
DirectoryCrawler
(
new
File
(
path
)));
final
BodyShape
earth
=
createEarth
();
final
Orbit
orbit
=
createOrbit
(
Constants
.
EIGEN5C_EARTH_MU
);
AbsoluteDate
crossing
=
new
AbsoluteDate
(
"2012-01-01T12:30:00.000"
,
TimeScalesFactory
.
getUTC
());
// one line sensor
// position: 1.5m in front (+X) and 20 cm above (-Z) of the S/C center of mass
// los: swath in the (YZ) plane, looking at 50° roll, ±1° aperture
Vector3D
position
=
new
Vector3D
(
1.5
,
0
,
-
0.2
);
List
<
Vector3D
>
los
=
createLOS
(
new
Rotation
(
Vector3D
.
PLUS_I
,
FastMath
.
toRadians
(
50.0
)).
applyTo
(
Vector3D
.
PLUS_K
),
Vector3D
.
PLUS_I
,
FastMath
.
toRadians
(
1.0
),
dimension
);
// linear datation model: at reference time we get line 100, and the rate is one line every 1.5ms
LineDatation
lineDatation
=
new
LinearLineDatation
(
crossing
,
dimension
/
2
,
1.0
/
1.5
e
-
3
);
int
firstLine
=
0
;
int
lastLine
=
dimension
;
LineSensor
lineSensor
=
new
LineSensor
(
"line"
,
lineDatation
,
position
,
los
);
AbsoluteDate
minDate
=
lineSensor
.
getDate
(
firstLine
);
AbsoluteDate
maxDate
=
lineSensor
.
getDate
(
lastLine
);
TileUpdater
updater
=
new
RandomLandscapeUpdater
(
0.0
,
9000.0
,
0.5
,
0xf0a401650191f9f6
l
,
FastMath
.
toRadians
(
1.0
),
257
);
Rugged
rugged
=
new
Rugged
(
updater
,
8
,
AlgorithmId
.
DUVENHAGE
,
EllipsoidId
.
WGS84
,
InertialFrameId
.
EME2000
,
BodyRotatingFrameId
.
ITRF
,
minDate
,
maxDate
,
5.0
,
orbitToPV
(
orbit
,
earth
,
minDate
.
shiftedBy
(-
1.0
),
maxDate
.
shiftedBy
(+
1.0
),
0.25
),
8
,
CartesianDerivativesFilter
.
USE_PV
,
orbitToQ
(
orbit
,
earth
,
minDate
.
shiftedBy
(-
1.0
),
maxDate
.
shiftedBy
(+
1.0
),
0.25
),
2
,
AngularDerivativesFilter
.
USE_R
,
0.001
);
rugged
.
setAberrationOfLightCorrection
(
false
);
rugged
.
setLightTimeCorrection
(
false
);
rugged
.
addLineSensor
(
lineSensor
);
GeodeticPoint
[]
gpLine
=
rugged
.
directLocalization
(
"line"
,
100
);
for
(
int
i
=
0
;
i
<
gpLine
.
length
;
++
i
)
{
GeodeticPoint
gpPixel
=
rugged
.
directLocalization
(
lineSensor
.
getDate
(
100
),
lineSensor
.
getPosition
(),
lineSensor
.
getLos
(
i
));
Assert
.
assertEquals
(
gpLine
[
i
].
getLatitude
(),
gpPixel
.
getLatitude
(),
1.0
e
-
10
);
Assert
.
assertEquals
(
gpLine
[
i
].
getLongitude
(),
gpPixel
.
getLongitude
(),
1.0
e
-
10
);
Assert
.
assertEquals
(
gpLine
[
i
].
getAltitude
(),
gpPixel
.
getAltitude
(),
1.0
e
-
10
);
}
}
@Test
public
void
testBasicScan
()
throws
RuggedException
,
OrekitException
,
URISyntaxException
{
...
...
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