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
90b320fc
Commit
90b320fc
authored
10 years ago
by
Luc Maisonobe
Browse files
Options
Downloads
Patches
Plain Diff
Fixing light travel time or not is now a user setting.
parent
418b1259
No related branches found
No related tags found
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
+22
-6
22 additions, 6 deletions
src/main/java/org/orekit/rugged/api/Rugged.java
src/test/java/org/orekit/rugged/api/RuggedTest.java
+3
-3
3 additions, 3 deletions
src/test/java/org/orekit/rugged/api/RuggedTest.java
with
25 additions
and
9 deletions
src/main/java/org/orekit/rugged/api/Rugged.java
+
22
−
6
View file @
90b320fc
...
...
@@ -73,6 +73,9 @@ public class Rugged {
/** DEM intersection algorithm. */
private
final
IntersectionAlgorithm
algorithm
;
/** Flag for fixing light travel time. */
private
final
boolean
fixLightTravelTime
;
/** Build a configured instance.
* <p>
* This method is the first one that must be called, otherwise the
...
...
@@ -85,6 +88,8 @@ public class Rugged {
* @param ellipsoidID identifier of reference ellipsoid
* @param inertialFrameID identifier of inertial frame
* @param bodyRotatingFrameID identifier of body rotating frame
* @param fixLightTravelTime if true, light travel time should be fixed when computing
* direct and inverse localization
* @param positionsVelocities satellite position and velocity
* @param pvInterpolationOrder order to use for position/velocity interpolation
* @param quaternions satellite quaternions
...
...
@@ -95,6 +100,7 @@ public class Rugged {
final
TileUpdater
updater
,
final
int
maxCachedTiles
,
final
AlgorithmId
algorithmID
,
final
EllipsoidId
ellipsoidID
,
final
InertialFrameId
inertialFrameID
,
final
BodyRotatingFrameId
bodyRotatingFrameID
,
final
boolean
fixLightTravelTime
,
final
List
<
Pair
<
AbsoluteDate
,
PVCoordinates
>>
positionsVelocities
,
final
int
pvInterpolationOrder
,
final
List
<
Pair
<
AbsoluteDate
,
Rotation
>>
quaternions
,
final
int
aInterpolationOrder
)
throws
RuggedException
{
...
...
@@ -114,6 +120,7 @@ public class Rugged {
// intersection algorithm
algorithm
=
selectAlgorithm
(
algorithmID
,
updater
,
maxCachedTiles
);
this
.
fixLightTravelTime
=
fixLightTravelTime
;
sensors
=
new
HashMap
<
String
,
Sensor
>();
...
...
@@ -134,6 +141,8 @@ public class Rugged {
* @param ellipsoidID identifier of reference ellipsoid
* @param inertialFrameID identifier of inertial frame
* @param bodyRotatingFrameID identifier of body rotating frame
* @param fixLightTravelTime if true, light travel time should be fixed when computing
* direct and inverse localization
* @param propagator global propagator
* @exception RuggedException if data needed for some frame cannot be loaded
*/
...
...
@@ -141,6 +150,7 @@ public class Rugged {
final
TileUpdater
updater
,
final
int
maxCachedTiles
,
final
AlgorithmId
algorithmID
,
final
EllipsoidId
ellipsoidID
,
final
InertialFrameId
inertialFrameID
,
final
BodyRotatingFrameId
bodyRotatingFrameID
,
final
boolean
fixLightTravelTime
,
final
Propagator
propagator
)
throws
RuggedException
{
try
{
...
...
@@ -158,6 +168,7 @@ public class Rugged {
// intersection algorithm
algorithm
=
selectAlgorithm
(
algorithmID
,
updater
,
maxCachedTiles
);
this
.
fixLightTravelTime
=
fixLightTravelTime
;
sensors
=
new
HashMap
<
String
,
Sensor
>();
...
...
@@ -372,12 +383,17 @@ public class Rugged {
final
GeodeticPoint
[]
gp
=
new
GeodeticPoint
[
sensor
.
getNbPixels
()];
for
(
int
i
=
0
;
i
<
gp
.
length
;
++
i
)
{
// fix light travel time
final
Vector3D
sP
=
approximate
.
transformPosition
(
sensor
.
getPosition
(
i
));
final
Vector3D
sL
=
approximate
.
transformVector
(
sensor
.
getLos
(
i
));
final
Vector3D
eP
=
ellipsoid
.
transform
(
ellipsoid
.
pointOnGround
(
sP
,
sL
));
final
double
deltaT
=
eP
.
distance
(
sP
)
/
Constants
.
SPEED_OF_LIGHT
;
final
Transform
fixed
=
new
Transform
(
date
,
scToInert
,
inertToBody
.
shiftedBy
(-
deltaT
));
final
Transform
fixed
;
if
(
fixLightTravelTime
)
{
// fix light travel time
final
Vector3D
sP
=
approximate
.
transformPosition
(
sensor
.
getPosition
(
i
));
final
Vector3D
sL
=
approximate
.
transformVector
(
sensor
.
getLos
(
i
));
final
Vector3D
eP
=
ellipsoid
.
transform
(
ellipsoid
.
pointOnGround
(
sP
,
sL
));
final
double
deltaT
=
eP
.
distance
(
sP
)
/
Constants
.
SPEED_OF_LIGHT
;
fixed
=
new
Transform
(
date
,
scToInert
,
inertToBody
.
shiftedBy
(-
deltaT
));
}
else
{
fixed
=
new
Transform
(
date
,
scToInert
,
inertToBody
);
}
gp
[
i
]
=
algorithm
.
intersection
(
ellipsoid
,
fixed
.
transformPosition
(
sensor
.
getPosition
(
i
)),
...
...
This diff is collapsed.
Click to expand it.
src/test/java/org/orekit/rugged/api/RuggedTest.java
+
3
−
3
View file @
90b320fc
...
...
@@ -148,7 +148,7 @@ public class RuggedTest {
EllipsoidId
.
WGS84
,
InertialFrameId
.
EME2000
,
BodyRotatingFrameId
.
ITRF
,
pv
,
8
,
q
,
8
);
true
,
pv
,
8
,
q
,
8
);
Assert
.
assertEquals
(
new
AbsoluteDate
(
"2012-01-01T00:00:00"
,
TimeScalesFactory
.
getUTC
()),
rugged
.
getReferenceDate
());
...
...
@@ -176,7 +176,7 @@ public class RuggedTest {
EllipsoidId
.
WGS84
,
InertialFrameId
.
EME2000
,
BodyRotatingFrameId
.
ITRF
,
propagator
);
true
,
propagator
);
Assert
.
assertEquals
(
propagator
.
getInitialState
().
getDate
(),
rugged
.
getReferenceDate
());
...
...
@@ -226,7 +226,7 @@ public class RuggedTest {
EllipsoidId
.
WGS84
,
InertialFrameId
.
EME2000
,
BodyRotatingFrameId
.
ITRF
,
ephemeris
);
true
,
ephemeris
);
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