Skip to content
Snippets Groups Projects
Commit 6594e362 authored by Luc Maisonobe's avatar Luc Maisonobe
Browse files

Added estimation modifiers to tests.

parent f9e96852
No related branches found
No related tags found
No related merge requests found
......@@ -94,7 +94,7 @@ public abstract class AbstractGroundMeasurementBuilderTest<T extends ObservedMea
context = EstimationTestUtils.eccentricContext("regular-data:potential:tides");
propagatorBuilder = context.createBuilder(OrbitType.KEPLERIAN, PositionAngle.TRUE, true,
1.0e-6, 60.0, 0.001, Force.POTENTIAL,
1.0e-6, 300.0, 0.001, Force.POTENTIAL,
Force.THIRD_BODY_SUN, Force.THIRD_BODY_MOON);
}
......
......@@ -21,21 +21,31 @@ import org.hipparchus.linear.RealMatrix;
import org.hipparchus.random.CorrelatedRandomVectorGenerator;
import org.hipparchus.random.GaussianRandomGenerator;
import org.hipparchus.random.RandomGenerator;
import org.hipparchus.util.FastMath;
import org.junit.Test;
import org.orekit.estimation.measurements.AngularAzEl;
import org.orekit.estimation.measurements.GroundStation;
import org.orekit.estimation.measurements.modifiers.Bias;
public class AngularAzElBuilderTest extends AbstractGroundMeasurementBuilderTest<AngularAzEl> {
private static final double SIGMA = 1.0e-3;
private static final double BIAS = 1.0e-4;
protected MeasurementBuilder<AngularAzEl> getBuilder(final RandomGenerator random,
final GroundStation groundStation) {
final RealMatrix covariance = MatrixUtils.createRealDiagonalMatrix(new double[] { SIGMA * SIGMA, SIGMA * SIGMA });
return new AngularAzElBuilder(random == null ? null : new CorrelatedRandomVectorGenerator(covariance,
1.0e-10,
new GaussianRandomGenerator(random)),
groundStation, new double[] { SIGMA, SIGMA}, new double[] { 1.0, 1.0 }, 0);
MeasurementBuilder<AngularAzEl> ab =
new AngularAzElBuilder(random == null ? null : new CorrelatedRandomVectorGenerator(covariance,
1.0e-10,
new GaussianRandomGenerator(random)),
groundStation, new double[] { SIGMA, SIGMA}, new double[] { 1.0, 1.0 }, 0);
ab.addModifier(new Bias<>(new String[] { "aBias", "eBias" },
new double[] { BIAS, BIAS },
new double[] { 1.0, 1.0 },
new double[] { -FastMath.PI, -0.5 * FastMath.PI },
new double[] { +FastMath.PI, +0.5 * FastMath.PI }));
return ab;
}
@Test
......
......@@ -21,23 +21,33 @@ import org.hipparchus.linear.RealMatrix;
import org.hipparchus.random.CorrelatedRandomVectorGenerator;
import org.hipparchus.random.GaussianRandomGenerator;
import org.hipparchus.random.RandomGenerator;
import org.hipparchus.util.FastMath;
import org.junit.Test;
import org.orekit.estimation.measurements.AngularRaDec;
import org.orekit.estimation.measurements.GroundStation;
import org.orekit.estimation.measurements.modifiers.Bias;
import org.orekit.frames.FramesFactory;
public class AngularRaDecBuilderTest extends AbstractGroundMeasurementBuilderTest<AngularRaDec> {
private static final double SIGMA = 1.0e-3;
private static final double BIAS = 1.0e-4;
protected MeasurementBuilder<AngularRaDec> getBuilder(final RandomGenerator random,
final GroundStation groundStation) {
final RealMatrix covariance = MatrixUtils.createRealDiagonalMatrix(new double[] { SIGMA * SIGMA, SIGMA * SIGMA });
return new AngularRaDecBuilder(random == null ? null : new CorrelatedRandomVectorGenerator(covariance,
1.0e-10,
new GaussianRandomGenerator(random)),
groundStation, FramesFactory.getEME2000(),
new double[] { SIGMA, SIGMA}, new double[] { 1.0, 1.0 }, 0);
MeasurementBuilder<AngularRaDec> ab =
new AngularRaDecBuilder(random == null ? null : new CorrelatedRandomVectorGenerator(covariance,
1.0e-10,
new GaussianRandomGenerator(random)),
groundStation, FramesFactory.getEME2000(),
new double[] { SIGMA, SIGMA}, new double[] { 1.0, 1.0 }, 0);
ab.addModifier(new Bias<>(new String[] { "aBias", "eBias" },
new double[] { BIAS, BIAS },
new double[] { 1.0, 1.0 },
new double[] { -FastMath.PI, -0.5 * FastMath.PI },
new double[] { +FastMath.PI, +0.5 * FastMath.PI }));
return ab;
}
@Test
......
......@@ -24,18 +24,27 @@ import org.hipparchus.random.RandomGenerator;
import org.junit.Test;
import org.orekit.estimation.measurements.GroundStation;
import org.orekit.estimation.measurements.Range;
import org.orekit.estimation.measurements.modifiers.Bias;
public class RangeBuilderTest extends AbstractGroundMeasurementBuilderTest<Range> {
private static final double SIGMA = 10.0;
private static final double BIAS = 3.0;
protected MeasurementBuilder<Range> getBuilder(final RandomGenerator random,
final GroundStation groundStation) {
final RealMatrix covariance = MatrixUtils.createRealDiagonalMatrix(new double[] { SIGMA * SIGMA });
return new RangeBuilder(random == null ? null : new CorrelatedRandomVectorGenerator(covariance,
1.0e-10,
new GaussianRandomGenerator(random)),
groundStation, true, SIGMA, 1.0, 0);
MeasurementBuilder<Range> rb =
new RangeBuilder(random == null ? null : new CorrelatedRandomVectorGenerator(covariance,
1.0e-10,
new GaussianRandomGenerator(random)),
groundStation, true, SIGMA, 1.0, 0);
rb.addModifier(new Bias<>(new String[] { "bias" },
new double[] { BIAS },
new double[] { 1.0 },
new double[] { Double.NEGATIVE_INFINITY },
new double[] { Double.POSITIVE_INFINITY }));
return rb;
}
@Test
......
......@@ -24,18 +24,27 @@ import org.hipparchus.random.RandomGenerator;
import org.junit.Test;
import org.orekit.estimation.measurements.GroundStation;
import org.orekit.estimation.measurements.RangeRate;
import org.orekit.estimation.measurements.modifiers.Bias;
public class RangeRateBuilderTest extends AbstractGroundMeasurementBuilderTest<RangeRate> {
private static final double SIGMA = 0.01;
private static final double BIAS = 0.002;
protected MeasurementBuilder<RangeRate> getBuilder(final RandomGenerator random,
final GroundStation groundStation) {
final RealMatrix covariance = MatrixUtils.createRealDiagonalMatrix(new double[] { SIGMA * SIGMA });
return new RangeRateBuilder(random == null ? null : new CorrelatedRandomVectorGenerator(covariance,
1.0e-10,
new GaussianRandomGenerator(random)),
groundStation, true, SIGMA, 1.0, 0);
MeasurementBuilder<RangeRate> rrb =
new RangeRateBuilder(random == null ? null : new CorrelatedRandomVectorGenerator(covariance,
1.0e-10,
new GaussianRandomGenerator(random)),
groundStation, true, SIGMA, 1.0, 0);
rrb.addModifier(new Bias<>(new String[] { "bias" },
new double[] { BIAS },
new double[] { 1.0 },
new double[] { Double.NEGATIVE_INFINITY },
new double[] { Double.POSITIVE_INFINITY }));
return rrb;
}
@Test
......
......@@ -35,6 +35,7 @@ import org.orekit.estimation.Force;
import org.orekit.estimation.measurements.GroundStation;
import org.orekit.estimation.measurements.ObservedMeasurement;
import org.orekit.estimation.measurements.TurnAroundRange;
import org.orekit.estimation.measurements.modifiers.Bias;
import org.orekit.orbits.OrbitType;
import org.orekit.orbits.PositionAngle;
import org.orekit.propagation.Propagator;
......@@ -49,15 +50,23 @@ import org.orekit.time.TimeScalesFactory;
public class TurnAroundRangeBuilderTest {
private static final double SIGMA = 10.0;
private static final double BIAS = -7.0;
private MeasurementBuilder<TurnAroundRange> getBuilder(final RandomGenerator random,
final GroundStation master,
final GroundStation slave) {
final RealMatrix covariance = MatrixUtils.createRealDiagonalMatrix(new double[] { SIGMA * SIGMA });
return new TurnAroundRangeBuilder(random == null ? null : new CorrelatedRandomVectorGenerator(covariance,
1.0e-10,
new GaussianRandomGenerator(random)),
master, slave, SIGMA, 1.0, 0);
MeasurementBuilder<TurnAroundRange> rb =
new TurnAroundRangeBuilder(random == null ? null : new CorrelatedRandomVectorGenerator(covariance,
1.0e-10,
new GaussianRandomGenerator(random)),
master, slave, SIGMA, 1.0, 0);
rb.addModifier(new Bias<>(new String[] { "bias" },
new double[] { BIAS },
new double[] { 1.0 },
new double[] { Double.NEGATIVE_INFINITY },
new double[] { Double.POSITIVE_INFINITY }));
return rb;
}
@Test
......@@ -123,7 +132,7 @@ public class TurnAroundRangeBuilderTest {
context = EstimationTestUtils.eccentricContext("regular-data:potential:tides");
propagatorBuilder = context.createBuilder(OrbitType.KEPLERIAN, PositionAngle.TRUE, true,
1.0e-6, 60.0, 0.001, Force.POTENTIAL,
1.0e-6, 300.0, 0.001, Force.POTENTIAL,
Force.THIRD_BODY_SUN, Force.THIRD_BODY_MOON);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment