Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mélina Vanel
Orekit
Commits
19b0f11d
Commit
19b0f11d
authored
Mar 11, 2022
by
Luc Maisonobe
Committed by
Bryan Cazabonne
Mar 16, 2022
Browse files
Fixed failing test.
parent
5889a5c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/test/java/org/orekit/estimation/leastsquares/BatchLSEstimatorTest.java
View file @
19b0f11d
...
...
@@ -32,6 +32,7 @@ import org.orekit.errors.OrekitMessages;
import
org.orekit.estimation.Context
;
import
org.orekit.estimation.EstimationTestUtils
;
import
org.orekit.estimation.Force
;
import
org.orekit.estimation.measurements.AngularAzElMeasurementCreator
;
import
org.orekit.estimation.measurements.EstimationsProvider
;
import
org.orekit.estimation.measurements.GroundStation
;
import
org.orekit.estimation.measurements.InterSatellitesRangeMeasurementCreator
;
...
...
@@ -511,7 +512,7 @@ public class BatchLSEstimatorTest {
}
/** A modified version of the previous test with a selection of propagation drivers to estimate
/** A modified version of the previous test with a selection of propagation drivers to estimate
and more measurements
* One common (µ)
* Some specifics for each satellite (Cr and Ca)
*
...
...
@@ -521,7 +522,7 @@ public class BatchLSEstimatorTest {
// Test: Set the propagator drivers to estimate for each satellite
final
boolean
muEstimated
=
true
;
final
boolean
crEstimated1
=
tru
e
;
final
boolean
crEstimated1
=
fals
e
;
final
boolean
caEstimated1
=
true
;
final
boolean
crEstimated2
=
true
;
final
boolean
caEstimated2
=
false
;
...
...
@@ -588,7 +589,7 @@ public class BatchLSEstimatorTest {
final
List
<
ObservedMeasurement
<?>>
r12
=
EstimationTestUtils
.
createMeasurements
(
propagator1
,
new
InterSatellitesRangeMeasurementCreator
(
ephemeris
,
0
.,
0
.),
1.0
,
3.0
,
30
0.0
);
1.0
,
3.0
,
12
0.0
);
// create perfect range measurements for first satellite
propagator1
=
EstimationTestUtils
.
createPropagator
(
context
.
initialOrbit
,
...
...
@@ -596,7 +597,15 @@ public class BatchLSEstimatorTest {
final
List
<
ObservedMeasurement
<?>>
r1
=
EstimationTestUtils
.
createMeasurements
(
propagator1
,
new
RangeMeasurementCreator
(
context
),
1.0
,
3.0
,
300.0
);
1.0
,
3.0
,
120.0
);
// create perfect angular measurements for first satellite
propagator1
=
EstimationTestUtils
.
createPropagator
(
context
.
initialOrbit
,
propagatorBuilder1
);
final
List
<
ObservedMeasurement
<?>>
a1
=
EstimationTestUtils
.
createMeasurements
(
propagator1
,
new
AngularAzElMeasurementCreator
(
context
),
1.0
,
3.0
,
120.0
);
// create orbit estimator
final
BatchLSEstimator
estimator
=
new
BatchLSEstimator
(
new
LevenbergMarquardtOptimizer
(),
...
...
@@ -608,6 +617,9 @@ public class BatchLSEstimatorTest {
for
(
final
ObservedMeasurement
<?>
range
:
r1
)
{
estimator
.
addMeasurement
(
range
);
}
for
(
final
ObservedMeasurement
<?>
angular
:
a1
)
{
estimator
.
addMeasurement
(
angular
);
}
estimator
.
setParametersConvergenceThreshold
(
1.0
e
-
3
);
estimator
.
setMaxIterations
(
10
);
estimator
.
setMaxEvaluations
(
20
);
...
...
@@ -668,11 +680,11 @@ public class BatchLSEstimatorTest {
Vector3D
.
distance
(
closeOrbit
.
getPVCoordinates
().
getVelocity
(),
before
.
getPVCoordinates
().
getVelocity
()),
1.0
e
-
6
);
EstimationTestUtils
.
checkFit
(
context
,
estimator
,
4
,
5
,
0.0
,
7.0
e
-
06
,
0.0
,
2.2
e
-
05
,
0.0
,
6.8
e
-
07
,
0.0
,
2.
7
e
-
10
);
EstimationTestUtils
.
checkFit
(
context
,
estimator
,
4
,
6
,
0.0
,
4.7
e
-
06
,
0.0
,
1.4
e
-
05
,
0.0
,
4.7
e
-
07
,
0.0
,
2.
0
e
-
10
);
final
Orbit
determined
=
new
KeplerianOrbit
(
parameters
.
get
(
6
).
getValue
(),
parameters
.
get
(
7
).
getValue
(),
...
...
@@ -687,11 +699,11 @@ public class BatchLSEstimatorTest {
Assert
.
assertEquals
(
0.0
,
Vector3D
.
distance
(
closeOrbit
.
getPVCoordinates
().
getPosition
(),
determined
.
getPVCoordinates
().
getPosition
()),
5.4
e
-
6
);
1.3
e
-
6
);
Assert
.
assertEquals
(
0.0
,
Vector3D
.
distance
(
closeOrbit
.
getPVCoordinates
().
getVelocity
(),
determined
.
getPVCoordinates
().
getVelocity
()),
4.1
e
-
9
);
1.2
e
-
9
);
// after the call to estimate, the parameters lacking a user-specified reference date
// got a default one
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment