1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.orekit.estimation.measurements.generation;
18
19 import org.hipparchus.linear.MatrixUtils;
20 import org.hipparchus.linear.RealMatrix;
21 import org.hipparchus.random.CorrelatedRandomVectorGenerator;
22 import org.hipparchus.random.GaussianRandomGenerator;
23 import org.hipparchus.random.RandomGenerator;
24 import org.junit.jupiter.api.Test;
25 import org.orekit.estimation.measurements.GroundStation;
26 import org.orekit.estimation.measurements.ObservableSatellite;
27 import org.orekit.estimation.measurements.RangeRate;
28 import org.orekit.estimation.measurements.modifiers.Bias;
29
30 public class RangeRateBuilderTest extends AbstractGroundMeasurementBuilderTest<RangeRate> {
31
32 private static final double SIGMA = 0.01;
33 private static final double BIAS = 0.002;
34
35 protected MeasurementBuilder<RangeRate> getBuilder(final RandomGenerator random,
36 final GroundStation groundStation,
37 final ObservableSatellite satellite) {
38 final RealMatrix covariance = MatrixUtils.createRealDiagonalMatrix(new double[] { SIGMA * SIGMA });
39 MeasurementBuilder<RangeRate> rrb =
40 new RangeRateBuilder(random == null ? null : new CorrelatedRandomVectorGenerator(covariance,
41 1.0e-10,
42 new GaussianRandomGenerator(random)),
43 groundStation, true, SIGMA, 1.0, satellite);
44 rrb.addModifier(new Bias<>(new String[] { "bias" },
45 new double[] { BIAS },
46 new double[] { 1.0 },
47 new double[] { Double.NEGATIVE_INFINITY },
48 new double[] { Double.POSITIVE_INFINITY }));
49 return rrb;
50 }
51
52 @Test
53 public void testForward() {
54 doTest(0x02c925b8812d8992l, 0.4, 0.9, 128, 2.4 * SIGMA);
55 }
56
57 @Test
58 public void testBackward() {
59 doTest(0x34ce85d26d51cd91l, -0.2, -0.6, 100, 3.3 * SIGMA);
60 }
61
62 }