Search in sources :

Example 21 with GroundStation

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

the class TropoModifierTest method testRangeTropoModifier.

@Test
public void testRangeTropoModifier() 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 RangeMeasurementCreator(context), 1.0, 3.0, 300.0);
    propagator.setSlaveMode();
    final RangeTroposphericDelayModifier modifier = new RangeTroposphericDelayModifier(SaastamoinenModel.getStandardModel());
    for (final ObservedMeasurement<?> measurement : measurements) {
        final AbsoluteDate date = measurement.getDate();
        final SpacecraftState refState = propagator.propagate(date);
        Range range = (Range) measurement;
        EstimatedMeasurement<Range> evalNoMod = range.estimate(0, 0, new SpacecraftState[] { refState });
        // add modifier
        range.addModifier(modifier);
        EstimatedMeasurement<Range> eval = range.estimate(0, 0, new SpacecraftState[] { refState });
        final double diffMeters = eval.getEstimatedValue()[0] - evalNoMod.getEstimatedValue()[0];
        final double epsilon = 1e-6;
        Assert.assertTrue(Precision.compareTo(diffMeters, 12., epsilon) < 0);
        Assert.assertTrue(Precision.compareTo(diffMeters, 0., epsilon) > 0);
    }
}
Also used : Context(org.orekit.estimation.Context) GroundStation(org.orekit.estimation.measurements.GroundStation) TurnAroundRange(org.orekit.estimation.measurements.TurnAroundRange) Range(org.orekit.estimation.measurements.Range) RangeTroposphericDelayModifier(org.orekit.estimation.measurements.modifiers.RangeTroposphericDelayModifier) TurnAroundRangeTroposphericDelayModifier(org.orekit.estimation.measurements.modifiers.TurnAroundRangeTroposphericDelayModifier) AbsoluteDate(org.orekit.time.AbsoluteDate) SpacecraftState(org.orekit.propagation.SpacecraftState) NumericalPropagatorBuilder(org.orekit.propagation.conversion.NumericalPropagatorBuilder) Propagator(org.orekit.propagation.Propagator) RangeMeasurementCreator(org.orekit.estimation.measurements.RangeMeasurementCreator) TurnAroundRangeMeasurementCreator(org.orekit.estimation.measurements.TurnAroundRangeMeasurementCreator) ObservedMeasurement(org.orekit.estimation.measurements.ObservedMeasurement) Test(org.junit.Test)

Example 22 with GroundStation

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

the class RangeRateTroposphericDelayModifier method modify.

/**
 * {@inheritDoc}
 */
@Override
public void modify(final EstimatedMeasurement<RangeRate> estimated) throws OrekitException {
    final RangeRate measurement = estimated.getObservedMeasurement();
    final GroundStation station = measurement.getStation();
    final SpacecraftState state = estimated.getStates()[0];
    final double[] oldValue = estimated.getEstimatedValue();
    final double delay = rangeRateErrorTroposphericModel(station, state);
    // update estimated value taking into account the tropospheric delay.
    // The tropospheric delay is directly added to the range.
    final double[] newValue = oldValue.clone();
    newValue[0] = newValue[0] + delay;
    estimated.setEstimatedValue(newValue);
    // update estimated derivatives with Jacobian of the measure wrt state
    final double[][] djac = rangeRateErrorJacobianState(station, state, delay);
    final double[][] stateDerivatives = estimated.getStateDerivatives(0);
    for (int irow = 0; irow < stateDerivatives.length; ++irow) {
        for (int jcol = 0; jcol < stateDerivatives[0].length; ++jcol) {
            stateDerivatives[irow][jcol] += djac[irow][jcol];
        }
    }
    estimated.setStateDerivatives(0, stateDerivatives);
    for (final ParameterDriver driver : Arrays.asList(station.getEastOffsetDriver(), station.getNorthOffsetDriver(), station.getZenithOffsetDriver())) {
        if (driver.isSelected()) {
            // update estimated derivatives with derivative of the modification wrt station parameters
            double parameterDerivative = estimated.getParameterDerivatives(driver)[0];
            parameterDerivative += rangeRateErrorParameterDerivative(station, driver, state, delay);
            estimated.setParameterDerivatives(driver, parameterDerivative);
        }
    }
}
Also used : SpacecraftState(org.orekit.propagation.SpacecraftState) GroundStation(org.orekit.estimation.measurements.GroundStation) RangeRate(org.orekit.estimation.measurements.RangeRate) ParameterDriver(org.orekit.utils.ParameterDriver)

Example 23 with GroundStation

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

the class RangeRateIonosphericDelayModifier method modify.

/**
 * {@inheritDoc}
 */
@Override
public void modify(final EstimatedMeasurement<RangeRate> estimated) throws OrekitException {
    final RangeRate measurement = estimated.getObservedMeasurement();
    final GroundStation station = measurement.getStation();
    final SpacecraftState state = estimated.getStates()[0];
    final double[] oldValue = estimated.getEstimatedValue();
    final double delay = rangeRateErrorIonosphericModel(station, state);
    // update estimated value taking into account the ionospheric delay.
    // The ionospheric delay is directly added to the range.
    final double[] newValue = oldValue.clone();
    newValue[0] = newValue[0] + delay;
    estimated.setEstimatedValue(newValue);
    // update estimated derivatives with Jacobian of the measure wrt state
    final double[][] djac = rangeErrorJacobianState(station, state);
    final double[][] stateDerivatives = estimated.getStateDerivatives(0);
    for (int irow = 0; irow < stateDerivatives.length; ++irow) {
        for (int jcol = 0; jcol < stateDerivatives[0].length; ++jcol) {
            stateDerivatives[irow][jcol] += djac[irow][jcol];
        }
    }
    estimated.setStateDerivatives(0, stateDerivatives);
    for (final ParameterDriver driver : Arrays.asList(station.getEastOffsetDriver(), station.getNorthOffsetDriver(), station.getZenithOffsetDriver())) {
        if (driver.isSelected()) {
            // update estimated derivatives with derivative of the modification wrt station parameters
            double parameterDerivative = estimated.getParameterDerivatives(driver)[0];
            parameterDerivative += rangeRateErrorParameterDerivative(station, driver, state, delay);
            estimated.setParameterDerivatives(driver, parameterDerivative);
        }
    }
}
Also used : SpacecraftState(org.orekit.propagation.SpacecraftState) GroundStation(org.orekit.estimation.measurements.GroundStation) RangeRate(org.orekit.estimation.measurements.RangeRate) ParameterDriver(org.orekit.utils.ParameterDriver)

Example 24 with GroundStation

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

the class TurnAroundRangeTroposphericDelayModifier method modify.

/**
 * {@inheritDoc}
 */
@Override
public void modify(final EstimatedMeasurement<TurnAroundRange> estimated) throws OrekitException {
    final TurnAroundRange measurement = estimated.getObservedMeasurement();
    final GroundStation masterStation = measurement.getMasterStation();
    final GroundStation slaveStation = measurement.getSlaveStation();
    final SpacecraftState state = estimated.getStates()[0];
    final double[] oldValue = estimated.getEstimatedValue();
    // Update estimated value taking into account the tropospheric delay.
    // The tropospheric delay is directly added to the TurnAroundRange.
    final double masterDelay = rangeErrorTroposphericModel(masterStation, state);
    final double slaveDelay = rangeErrorTroposphericModel(slaveStation, state);
    final double[] newValue = oldValue.clone();
    newValue[0] = newValue[0] + masterDelay + slaveDelay;
    estimated.setEstimatedValue(newValue);
    // Update estimated derivatives with Jacobian of the measure wrt state
    final double[][] masterDjac = rangeErrorJacobianState(masterStation, state);
    final double[][] slaveDjac = rangeErrorJacobianState(slaveStation, state);
    final double[][] stateDerivatives = estimated.getStateDerivatives(0);
    for (int irow = 0; irow < stateDerivatives.length; ++irow) {
        for (int jcol = 0; jcol < stateDerivatives[0].length; ++jcol) {
            stateDerivatives[irow][jcol] += masterDjac[irow][jcol] + slaveDjac[irow][jcol];
        }
    }
    estimated.setStateDerivatives(0, stateDerivatives);
    // Update derivatives with respect to master station position
    for (final ParameterDriver driver : Arrays.asList(masterStation.getEastOffsetDriver(), masterStation.getNorthOffsetDriver(), masterStation.getZenithOffsetDriver())) {
        if (driver.isSelected()) {
            double parameterDerivative = estimated.getParameterDerivatives(driver)[0];
            parameterDerivative += rangeErrorParameterDerivative(masterStation, driver, state);
            estimated.setParameterDerivatives(driver, parameterDerivative);
        }
    }
    // Update derivatives with respect to slave station position
    for (final ParameterDriver driver : Arrays.asList(slaveStation.getEastOffsetDriver(), slaveStation.getNorthOffsetDriver(), slaveStation.getZenithOffsetDriver())) {
        if (driver.isSelected()) {
            double parameterDerivative = estimated.getParameterDerivatives(driver)[0];
            parameterDerivative += rangeErrorParameterDerivative(slaveStation, driver, state);
            estimated.setParameterDerivatives(driver, parameterDerivative);
        }
    }
}
Also used : SpacecraftState(org.orekit.propagation.SpacecraftState) GroundStation(org.orekit.estimation.measurements.GroundStation) TurnAroundRange(org.orekit.estimation.measurements.TurnAroundRange) ParameterDriver(org.orekit.utils.ParameterDriver)

Aggregations

GroundStation (org.orekit.estimation.measurements.GroundStation)24 SpacecraftState (org.orekit.propagation.SpacecraftState)19 AbsoluteDate (org.orekit.time.AbsoluteDate)14 Test (org.junit.Test)10 Context (org.orekit.estimation.Context)10 ObservedMeasurement (org.orekit.estimation.measurements.ObservedMeasurement)10 Propagator (org.orekit.propagation.Propagator)10 NumericalPropagatorBuilder (org.orekit.propagation.conversion.NumericalPropagatorBuilder)10 AngularAzEl (org.orekit.estimation.measurements.AngularAzEl)9 Range (org.orekit.estimation.measurements.Range)8 ParameterDriver (org.orekit.utils.ParameterDriver)8 RangeRate (org.orekit.estimation.measurements.RangeRate)7 TurnAroundRange (org.orekit.estimation.measurements.TurnAroundRange)7 TurnAroundRangeMeasurementCreator (org.orekit.estimation.measurements.TurnAroundRangeMeasurementCreator)5 Vector3D (org.hipparchus.geometry.euclidean.threed.Vector3D)4 GeodeticPoint (org.orekit.bodies.GeodeticPoint)4 AngularRadioRefractionModifier (org.orekit.estimation.measurements.modifiers.AngularRadioRefractionModifier)4 RangeTroposphericDelayModifier (org.orekit.estimation.measurements.modifiers.RangeTroposphericDelayModifier)4 EarthITU453AtmosphereRefraction (org.orekit.models.earth.EarthITU453AtmosphereRefraction)4 HashMap (java.util.HashMap)3