Search in sources :

Example 1 with AngularTroposphericDelayModifier

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

the class TropoModifierTest method testAngularTropoModifier.

@Test
public void testAngularTropoModifier() 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 angular 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 AngularAzElMeasurementCreator(context), 1.0, 3.0, 300.0);
    propagator.setSlaveMode();
    final AngularTroposphericDelayModifier modifier = new AngularTroposphericDelayModifier(SaastamoinenModel.getStandardModel());
    for (final ObservedMeasurement<?> measurement : measurements) {
        final AbsoluteDate date = measurement.getDate();
        final SpacecraftState refState = propagator.propagate(date);
        AngularAzEl angular = (AngularAzEl) measurement;
        EstimatedMeasurement<AngularAzEl> evalNoMod = angular.estimate(0, 0, new SpacecraftState[] { refState });
        // add modifier
        angular.addModifier(modifier);
        // 
        EstimatedMeasurement<AngularAzEl> eval = angular.estimate(0, 0, new SpacecraftState[] { refState });
        final double diffAz = MathUtils.normalizeAngle(eval.getEstimatedValue()[0], evalNoMod.getEstimatedValue()[0]) - evalNoMod.getEstimatedValue()[0];
        final double diffEl = MathUtils.normalizeAngle(eval.getEstimatedValue()[1], evalNoMod.getEstimatedValue()[1]) - evalNoMod.getEstimatedValue()[1];
        // TODO: check threshold
        Assert.assertEquals(0.0, diffAz, 5.0e-5);
        Assert.assertEquals(0.0, diffEl, 5.0e-6);
    }
}
Also used : Context(org.orekit.estimation.Context) GroundStation(org.orekit.estimation.measurements.GroundStation) AbsoluteDate(org.orekit.time.AbsoluteDate) SpacecraftState(org.orekit.propagation.SpacecraftState) AngularTroposphericDelayModifier(org.orekit.estimation.measurements.modifiers.AngularTroposphericDelayModifier) NumericalPropagatorBuilder(org.orekit.propagation.conversion.NumericalPropagatorBuilder) Propagator(org.orekit.propagation.Propagator) AngularAzElMeasurementCreator(org.orekit.estimation.measurements.AngularAzElMeasurementCreator) AngularAzEl(org.orekit.estimation.measurements.AngularAzEl) ObservedMeasurement(org.orekit.estimation.measurements.ObservedMeasurement) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 Context (org.orekit.estimation.Context)1 AngularAzEl (org.orekit.estimation.measurements.AngularAzEl)1 AngularAzElMeasurementCreator (org.orekit.estimation.measurements.AngularAzElMeasurementCreator)1 GroundStation (org.orekit.estimation.measurements.GroundStation)1 ObservedMeasurement (org.orekit.estimation.measurements.ObservedMeasurement)1 AngularTroposphericDelayModifier (org.orekit.estimation.measurements.modifiers.AngularTroposphericDelayModifier)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