Commit 19b0f11d authored by Luc Maisonobe's avatar Luc Maisonobe Committed by Bryan Cazabonne
Browse files

Fixed failing test.

parent 5889a5c4
......@@ -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 = true;
final boolean crEstimated1 = false;
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, 300.0);
1.0, 3.0, 120.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.0e-3);
estimator.setMaxIterations(10);
estimator.setMaxEvaluations(20);
......@@ -668,11 +680,11 @@ public class BatchLSEstimatorTest {
Vector3D.distance(closeOrbit.getPVCoordinates().getVelocity(),
before.getPVCoordinates().getVelocity()),
1.0e-6);
EstimationTestUtils.checkFit(context, estimator, 4, 5,
0.0, 7.0e-06,
0.0, 2.2e-05,
0.0, 6.8e-07,
0.0, 2.7e-10);
EstimationTestUtils.checkFit(context, estimator, 4, 6,
0.0, 4.7e-06,
0.0, 1.4e-05,
0.0, 4.7e-07,
0.0, 2.0e-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.4e-6);
1.3e-6);
Assert.assertEquals(0.0,
Vector3D.distance(closeOrbit.getPVCoordinates().getVelocity(),
determined.getPVCoordinates().getVelocity()),
4.1e-9);
1.2e-9);
// after the call to estimate, the parameters lacking a user-specified reference date
// got a default one
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment