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
dd1c79a5
Commit
dd1c79a5
authored
10 years ago
by
Luc Maisonobe
Browse files
Options
Downloads
Patches
Plain Diff
Fixed inverse localization.
parent
0a311912
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/SensorMeanPlaneCrossing.java
+16
-25
16 additions, 25 deletions
...n/java/org/orekit/rugged/api/SensorMeanPlaneCrossing.java
src/test/java/org/orekit/rugged/api/RuggedTest.java
+0
-1
0 additions, 1 deletion
src/test/java/org/orekit/rugged/api/RuggedTest.java
with
16 additions
and
26 deletions
src/main/java/org/orekit/rugged/api/SensorMeanPlaneCrossing.java
+
16
−
25
View file @
dd1c79a5
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
*/
*/
package
org.orekit.rugged.api
;
package
org.orekit.rugged.api
;
import
java.util.Array
List
;
import
java.util.Array
s
;
import
java.util.List
;
import
java.util.List
;
import
org.apache.commons.math3.analysis.differentiation.DerivativeStructure
;
import
org.apache.commons.math3.analysis.differentiation.DerivativeStructure
;
...
@@ -33,17 +33,17 @@ import org.orekit.utils.PVCoordinates;
...
@@ -33,17 +33,17 @@ import org.orekit.utils.PVCoordinates;
/** Class dedicated to when ground point crosses mean sensor plane. */
/** Class dedicated to when ground point crosses mean sensor plane. */
class
SensorMeanPlaneCrossing
{
class
SensorMeanPlaneCrossing
{
/**
Number of points for frames interpolation
. */
/**
Converter between spacecraft and body
. */
private
static
final
int
INTERPOLATION_POINTS
=
5
;
private
final
SpacecraftToObservedBody
scToBody
;
/** Line numbers of the middle sample point. */
/** Line numbers of the middle sample point. */
private
final
int
midLine
;
private
final
double
midLine
;
/** Transforms sample from observed body frame to inertial frame. */
/** Transforms sample from observed body frame to inertial frame. */
private
final
List
<
Transform
>
bodyToInertial
;
private
final
List
<
Transform
>
bodyToInertial
;
/** Transform
s sample from spacecraft frame to inertial fram
e. */
/** Transform
from inertial frame to spacecraft frame, for middle lin
e. */
private
final
List
<
Transform
>
s
cToInert
ial
;
private
final
Transform
midLineS
cToInert
;
/** Minimum line number in the search interval. */
/** Minimum line number in the search interval. */
private
final
int
minLine
;
private
final
int
minLine
;
...
@@ -87,6 +87,7 @@ class SensorMeanPlaneCrossing {
...
@@ -87,6 +87,7 @@ class SensorMeanPlaneCrossing {
try
{
try
{
this
.
sensor
=
sensor
;
this
.
sensor
=
sensor
;
this
.
scToBody
=
scToBody
;
this
.
minLine
=
minLine
;
this
.
minLine
=
minLine
;
this
.
maxLine
=
maxLine
;
this
.
maxLine
=
maxLine
;
this
.
lightTimeCorrection
=
lightTimeCorrection
;
this
.
lightTimeCorrection
=
lightTimeCorrection
;
...
@@ -94,21 +95,11 @@ class SensorMeanPlaneCrossing {
...
@@ -94,21 +95,11 @@ class SensorMeanPlaneCrossing {
this
.
maxEval
=
maxEval
;
this
.
maxEval
=
maxEval
;
this
.
accuracy
=
accuracy
;
this
.
accuracy
=
accuracy
;
// compute one the transforms for middle line, as they will be reused
midLine
=
0.5
*
(
minLine
+
maxLine
);
// as the start point for all searches
bodyToInertial
=
Arrays
.
asList
(
scToBody
.
getInertialToBody
(
sensor
.
getDate
(
minLine
)).
getInverse
(),
bodyToInertial
=
new
ArrayList
<
Transform
>(
INTERPOLATION_POINTS
);
scToBody
.
getInertialToBody
(
sensor
.
getDate
(
midLine
)).
getInverse
(),
scToInertial
=
new
ArrayList
<
Transform
>(
INTERPOLATION_POINTS
);
scToBody
.
getInertialToBody
(
sensor
.
getDate
(
maxLine
)).
getInverse
());
int
middle
=
-
1
;
midLineScToInert
=
scToBody
.
getScToInertial
(
sensor
.
getDate
(
midLine
));
for
(
int
i
=
0
;
i
<
INTERPOLATION_POINTS
;
++
i
)
{
final
int
line
=
(
i
*
maxLine
+
(
INTERPOLATION_POINTS
-
i
)
*
minLine
)
/
INTERPOLATION_POINTS
;
if
(
i
==
INTERPOLATION_POINTS
/
2
)
{
middle
=
line
;
}
final
AbsoluteDate
date
=
sensor
.
getDate
(
line
);
bodyToInertial
.
add
(
scToBody
.
getInertialToBody
(
date
).
getInverse
());
scToInertial
.
add
(
scToBody
.
getScToInertial
(
date
));
}
midLine
=
middle
;
}
catch
(
OrekitException
oe
)
{
}
catch
(
OrekitException
oe
)
{
throw
new
RuggedException
(
oe
,
oe
.
getSpecifier
(),
oe
.
getParts
());
throw
new
RuggedException
(
oe
,
oe
.
getSpecifier
(),
oe
.
getParts
());
...
@@ -184,8 +175,8 @@ class SensorMeanPlaneCrossing {
...
@@ -184,8 +175,8 @@ class SensorMeanPlaneCrossing {
// We expect two or three evaluations only. Each new evaluation shows up quickly in
// We expect two or three evaluations only. Each new evaluation shows up quickly in
// the performances as it involves frames conversions
// the performances as it involves frames conversions
double
crossingLine
=
midLine
;
double
crossingLine
=
midLine
;
Transform
bodyToInert
=
bodyToInertial
.
get
(
INTERPOLATION_POINTS
/
2
);
Transform
bodyToInert
=
bodyToInertial
.
get
(
1
);
Transform
scToInert
=
scToInertial
.
get
(
INTERPOLATION_POINTS
/
2
)
;
Transform
scToInert
=
midLineScToInert
;
boolean
atMin
=
false
;
boolean
atMin
=
false
;
boolean
atMax
=
false
;
boolean
atMax
=
false
;
for
(
int
i
=
0
;
i
<
maxEval
;
++
i
)
{
for
(
int
i
=
0
;
i
<
maxEval
;
++
i
)
{
...
@@ -224,8 +215,8 @@ class SensorMeanPlaneCrossing {
...
@@ -224,8 +215,8 @@ class SensorMeanPlaneCrossing {
}
}
final
AbsoluteDate
date
=
sensor
.
getDate
(
crossingLine
);
final
AbsoluteDate
date
=
sensor
.
getDate
(
crossingLine
);
bodyToInert
=
Transform
.
interpolate
(
date
,
false
,
fals
e
,
bodyToInertial
);
bodyToInert
=
Transform
.
interpolate
(
date
,
true
,
tru
e
,
bodyToInertial
);
scToInert
=
Transform
.
interpolate
(
date
,
false
,
false
,
s
cToInertial
);
scToInert
=
scToBody
.
getS
cToInertial
(
date
);
}
}
return
null
;
return
null
;
...
...
This diff is collapsed.
Click to expand it.
src/test/java/org/orekit/rugged/api/RuggedTest.java
+
0
−
1
View file @
dd1c79a5
...
@@ -431,7 +431,6 @@ public class RuggedTest {
...
@@ -431,7 +431,6 @@ public class RuggedTest {
// the following test is disabled by default
// the following test is disabled by default
// it is only used to check timings, and also create a small (2M) temporary file
// it is only used to check timings, and also create a small (2M) temporary file
@Test
@Test
@Ignore
public
void
testInverseLocalizationTiming
()
public
void
testInverseLocalizationTiming
()
throws
RuggedException
,
OrekitException
,
URISyntaxException
{
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