Search in sources :

Example 1 with RangeRateIonosphericDelayModifier

use of org.orekit.estimation.measurements.modifiers.RangeRateIonosphericDelayModifier in project Orekit by CS-SI.

the class IonoModifierTest method testRangeRateIonoModifier.

@Test
public void testRangeRateIonoModifier() throws OrekitException {
    Context context = EstimationTestUtils.eccentricContext("regular-data:potential:tides");
    final NumericalPropagatorBuilder propagatorBuilder = context.createBuilder(OrbitType.KEPLERIAN, PositionAngle.TRUE, true, 1.0e-6, 60.0, 0.001);
    // create perfect range measurements
    for (final GroundStation station : context.stations) {
        station.getEastOffsetDriver().setSelected(true);
        station.getNorthOffsetDriver().setSelected(true);
        station.getZenithOffsetDriver().setSelected(true);
    }
    final Propagator propagator = EstimationTestUtils.createPropagator(context.initialOrbit, propagatorBuilder);
    final List<ObservedMeasurement<?>> measurements = EstimationTestUtils.createMeasurements(propagator, new RangeRateMeasurementCreator(context, false), 1.0, 3.0, 300.0);
    propagator.setSlaveMode();
    final RangeRateIonosphericDelayModifier modifier = new RangeRateIonosphericDelayModifier(model, true);
    for (final ObservedMeasurement<?> measurement : measurements) {
        final AbsoluteDate date = measurement.getDate();
        final SpacecraftState refstate = propagator.propagate(date);
        RangeRate rangeRate = (RangeRate) measurement;
        EstimatedMeasurement<RangeRate> evalNoMod = rangeRate.estimate(0, 0, new SpacecraftState[] { refstate });
        // add modifier
        rangeRate.addModifier(modifier);
        // 
        EstimatedMeasurement<RangeRate> eval = rangeRate.estimate(0, 0, new SpacecraftState[] { refstate });
        final double diffMetersSec = eval.getEstimatedValue()[0] - evalNoMod.getEstimatedValue()[0];
        // TODO: check threshold
        Assert.assertEquals(0.0, diffMetersSec, 0.016);
    }
}
Also used : Context(org.orekit.estimation.Context) GroundStation(org.orekit.estimation.measurements.GroundStation) RangeRateIonosphericDelayModifier(org.orekit.estimation.measurements.modifiers.RangeRateIonosphericDelayModifier) AbsoluteDate(org.orekit.time.AbsoluteDate) SpacecraftState(org.orekit.propagation.SpacecraftState) NumericalPropagatorBuilder(org.orekit.propagation.conversion.NumericalPropagatorBuilder) Propagator(org.orekit.propagation.Propagator) RangeRate(org.orekit.estimation.measurements.RangeRate) ObservedMeasurement(org.orekit.estimation.measurements.ObservedMeasurement) RangeRateMeasurementCreator(org.orekit.estimation.measurements.RangeRateMeasurementCreator) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 Context (org.orekit.estimation.Context)1 GroundStation (org.orekit.estimation.measurements.GroundStation)1 ObservedMeasurement (org.orekit.estimation.measurements.ObservedMeasurement)1 RangeRate (org.orekit.estimation.measurements.RangeRate)1 RangeRateMeasurementCreator (org.orekit.estimation.measurements.RangeRateMeasurementCreator)1 RangeRateIonosphericDelayModifier (org.orekit.estimation.measurements.modifiers.RangeRateIonosphericDelayModifier)1 Propagator (org.orekit.propagation.Propagator)1 SpacecraftState (org.orekit.propagation.SpacecraftState)1 NumericalPropagatorBuilder (org.orekit.propagation.conversion.NumericalPropagatorBuilder)1 AbsoluteDate (org.orekit.time.AbsoluteDate)1