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
36ab739e
Commit
36ab739e
authored
10 years ago
by
Luc Maisonobe
Browse files
Options
Downloads
Patches
Plain Diff
Replaced setGeneralContext with constructors.
parent
fd2db7a7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/org/orekit/rugged/api/Rugged.java
+20
-25
20 additions, 25 deletions
src/main/java/org/orekit/rugged/api/Rugged.java
src/test/java/org/orekit/rugged/api/RuggedTest.java
+18
-21
18 additions, 21 deletions
src/test/java/org/orekit/rugged/api/RuggedTest.java
with
38 additions
and
46 deletions
src/main/java/org/orekit/rugged/api/Rugged.java
+
20
−
25
View file @
36ab739e
...
...
@@ -56,35 +56,28 @@ import org.orekit.utils.PVCoordinatesProvider;
public
class
Rugged
{
/** Reference date. */
private
AbsoluteDate
referenceDate
;
private
final
AbsoluteDate
referenceDate
;
/** Inertial frame. */
private
Frame
frame
;
private
final
Frame
frame
;
/** Reference ellipsoid. */
private
ExtendedEllipsoid
ellipsoid
;
private
final
ExtendedEllipsoid
ellipsoid
;
/** Converter between spacecraft and body. */
private
SpacecraftToObservedBody
scToBody
;
private
final
SpacecraftToObservedBody
scToBody
;
/** Sensors. */
private
final
Map
<
String
,
Sensor
>
sensors
;
/** DEM intersection algorithm. */
private
IntersectionAlgorithm
algorithm
;
private
final
IntersectionAlgorithm
algorithm
;
/** Simple constructor.
*/
protected
Rugged
()
{
sensors
=
new
HashMap
<
String
,
Sensor
>();
}
/** Set up general context.
/** Build a configured instance.
* <p>
* This method is the first one that must be called, otherwise the
* other methods will fail due to uninitialized context.
* </p>
* @param orekitDataDir top directory for Orekit data
* @param referenceDate reference date from which all other dates are computed
* @param algorithmID identifier of algorithm to use for Digital Elevation Model intersection
* @param ellipsoidID identifier of reference ellipsoid
...
...
@@ -96,12 +89,11 @@ public class Rugged {
* @param aInterpolationOrder order to use for attitude interpolation
* @exception RuggedException if data needed for some frame cannot be loaded
*/
public
void
setGeneralContext
(
final
AbsoluteDate
newReferenceDate
,
final
AlgorithmId
algorithmID
,
final
EllipsoidId
ellipsoidID
,
final
InertialFrameId
inertialFrameID
,
final
BodyRotatingFrameId
bodyRotatingFrameID
,
final
List
<
Pair
<
AbsoluteDate
,
PVCoordinates
>>
positionsVelocities
,
final
int
pvInterpolationOrder
,
final
List
<
Pair
<
AbsoluteDate
,
Rotation
>>
quaternions
,
final
int
aInterpolationOrder
)
public
Rugged
(
final
AbsoluteDate
newReferenceDate
,
final
AlgorithmId
algorithmID
,
final
EllipsoidId
ellipsoidID
,
final
InertialFrameId
inertialFrameID
,
final
BodyRotatingFrameId
bodyRotatingFrameID
,
final
List
<
Pair
<
AbsoluteDate
,
PVCoordinates
>>
positionsVelocities
,
final
int
pvInterpolationOrder
,
final
List
<
Pair
<
AbsoluteDate
,
Rotation
>>
quaternions
,
final
int
aInterpolationOrder
)
throws
RuggedException
{
try
{
...
...
@@ -120,12 +112,14 @@ public class Rugged {
// intersection algorithm
algorithm
=
selectAlgorithm
(
algorithmID
);
sensors
=
new
HashMap
<
String
,
Sensor
>();
}
catch
(
OrekitException
oe
)
{
throw
new
RuggedException
(
oe
,
oe
.
getSpecifier
(),
oe
.
getParts
().
clone
());
}
}
/**
Set up general context
.
/**
Build a configured instance
.
* <p>
* This method is the first one that must be called, otherwise the
* other methods will fail due to uninitialized context.
...
...
@@ -138,11 +132,10 @@ public class Rugged {
* @param propagator global propagator
* @exception RuggedException if data needed for some frame cannot be loaded
*/
public
void
setGeneralContext
(
final
AbsoluteDate
newReferenceDate
,
final
AlgorithmId
algorithmID
,
final
EllipsoidId
ellipsoidID
,
final
InertialFrameId
inertialFrameID
,
final
BodyRotatingFrameId
bodyRotatingFrameID
,
final
Propagator
propagator
)
public
Rugged
(
final
AbsoluteDate
newReferenceDate
,
final
AlgorithmId
algorithmID
,
final
EllipsoidId
ellipsoidID
,
final
InertialFrameId
inertialFrameID
,
final
BodyRotatingFrameId
bodyRotatingFrameID
,
final
Propagator
propagator
)
throws
RuggedException
{
try
{
...
...
@@ -160,6 +153,8 @@ public class Rugged {
// intersection algorithm
algorithm
=
selectAlgorithm
(
algorithmID
);
sensors
=
new
HashMap
<
String
,
Sensor
>();
}
catch
(
OrekitException
oe
)
{
throw
new
RuggedException
(
oe
,
oe
.
getSpecifier
(),
oe
.
getParts
().
clone
());
}
...
...
This diff is collapsed.
Click to expand it.
src/test/java/org/orekit/rugged/api/RuggedTest.java
+
18
−
21
View file @
36ab739e
...
...
@@ -138,13 +138,12 @@ public class RuggedTest {
createQ
(
t0
,
19.000
,
0.522119033749
,
-
0.395304129256
,
0.577847874330
,
0.487050504694
),
createQ
(
t0
,
20.000
,
0.522421006719
,
-
0.395049578765
,
0.577574493570
,
0.487257453954
));
Rugged
rugged
=
new
Rugged
();
rugged
.
setGeneralContext
(
t0
,
AlgorithmId
.
DUVENHAGE
,
EllipsoidId
.
WGS84
,
InertialFrameId
.
EME2000
,
BodyRotatingFrameId
.
ITRF
,
pv
,
8
,
q
,
8
);
Rugged
rugged
=
new
Rugged
(
t0
,
AlgorithmId
.
DUVENHAGE
,
EllipsoidId
.
WGS84
,
InertialFrameId
.
EME2000
,
BodyRotatingFrameId
.
ITRF
,
pv
,
8
,
q
,
8
);
Assert
.
assertEquals
(
new
AbsoluteDate
(
"2012-01-01T00:00:00"
,
TimeScalesFactory
.
getUTC
()),
rugged
.
getReferenceDate
());
...
...
@@ -162,13 +161,12 @@ public class RuggedTest {
Orbit
orbit
=
createOrbit
(
gravityField
);
Propagator
propagator
=
createPropagator
(
earth
,
gravityField
,
orbit
);
Rugged
rugged
=
new
Rugged
();
rugged
.
setGeneralContext
(
propagator
.
getInitialState
().
getDate
(),
AlgorithmId
.
DUVENHAGE
,
EllipsoidId
.
WGS84
,
InertialFrameId
.
EME2000
,
BodyRotatingFrameId
.
ITRF
,
propagator
);
Rugged
rugged
=
new
Rugged
(
propagator
.
getInitialState
().
getDate
(),
AlgorithmId
.
DUVENHAGE
,
EllipsoidId
.
WGS84
,
InertialFrameId
.
EME2000
,
BodyRotatingFrameId
.
ITRF
,
propagator
);
Assert
.
assertEquals
(
propagator
.
getInitialState
().
getDate
(),
rugged
.
getReferenceDate
());
...
...
@@ -213,13 +211,12 @@ public class RuggedTest {
propagator
.
propagate
(
crossing
.
shiftedBy
(
lineDatation
.
getDate
(
lastLine
)
+
1.0
));
Propagator
ephemeris
=
propagator
.
getGeneratedEphemeris
();
Rugged
rugged
=
new
Rugged
();
rugged
.
setGeneralContext
(
crossing
,
AlgorithmId
.
DUVENHAGE
,
EllipsoidId
.
WGS84
,
InertialFrameId
.
EME2000
,
BodyRotatingFrameId
.
ITRF
,
ephemeris
);
Rugged
rugged
=
new
Rugged
(
crossing
,
AlgorithmId
.
DUVENHAGE
,
EllipsoidId
.
WGS84
,
InertialFrameId
.
EME2000
,
BodyRotatingFrameId
.
ITRF
,
ephemeris
);
rugged
.
setUpTilesManagement
(
updater
,
8
);
rugged
.
setLineSensor
(
"line"
,
los
,
lineDatation
);
...
...
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