Search in sources :

Example 11 with GroundStation

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

the class AngularIonosphericDelayModifier method modify.

@Override
public void modify(final EstimatedMeasurement<AngularAzEl> estimated) throws OrekitException {
    final AngularAzEl measure = estimated.getObservedMeasurement();
    final GroundStation station = measure.getStation();
    final SpacecraftState state = estimated.getStates()[0];
    final double delay = angularErrorIonosphericModel(station, state);
    // Delay is taken into account to shift the spacecraft position
    final double dt = delay / Constants.SPEED_OF_LIGHT;
    // Position of the spacecraft shifted of dt
    final SpacecraftState transitState = state.shiftedBy(-dt);
    // Update estimated value taking into account the ionospheric delay.
    final AbsoluteDate date = transitState.getDate();
    final Vector3D position = transitState.getPVCoordinates().getPosition();
    final Frame inertial = transitState.getFrame();
    // Elevation and azimuth in radians
    final double elevation = station.getBaseFrame().getElevation(position, inertial, date);
    final double baseAzimuth = station.getBaseFrame().getAzimuth(position, inertial, date);
    final double twoPiWrap = MathUtils.normalizeAngle(baseAzimuth, measure.getObservedValue()[0]) - baseAzimuth;
    final double azimuth = baseAzimuth + twoPiWrap;
    // Update estimated value taking into account the ionospheric delay.
    // Azimuth - elevation values
    estimated.setEstimatedValue(azimuth, elevation);
}
Also used : SpacecraftState(org.orekit.propagation.SpacecraftState) Frame(org.orekit.frames.Frame) GroundStation(org.orekit.estimation.measurements.GroundStation) Vector3D(org.hipparchus.geometry.euclidean.threed.Vector3D) AngularAzEl(org.orekit.estimation.measurements.AngularAzEl) AbsoluteDate(org.orekit.time.AbsoluteDate)

Example 12 with GroundStation

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

the class RangeIonosphericDelayModifier method modify.

@Override
public void modify(final EstimatedMeasurement<Range> estimated) throws OrekitException {
    final Range measurement = estimated.getObservedMeasurement();
    final GroundStation station = measurement.getStation();
    final SpacecraftState state = estimated.getStates()[0];
    final double[] oldValue = estimated.getEstimatedValue();
    final double delay = rangeErrorIonosphericModel(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 += rangeErrorParameterDerivative(station, driver, state, delay);
            estimated.setParameterDerivatives(driver, parameterDerivative);
        }
    }
}
Also used : SpacecraftState(org.orekit.propagation.SpacecraftState) GroundStation(org.orekit.estimation.measurements.GroundStation) Range(org.orekit.estimation.measurements.Range) ParameterDriver(org.orekit.utils.ParameterDriver)

Example 13 with GroundStation

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

the class TurnAroundRangeIonosphericDelayModifier method modify.

@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 ionospheric delay.
    // The ionospheric delay is directly added to the TurnAroundRange.
    final double masterDelay = rangeErrorIonosphericModel(masterStation, state);
    final double slaveDelay = rangeErrorIonosphericModel(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)

Example 14 with GroundStation

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

the class AngularTroposphericDelayModifier method modify.

@Override
public void modify(final EstimatedMeasurement<AngularAzEl> estimated) throws OrekitException {
    final AngularAzEl measure = estimated.getObservedMeasurement();
    final GroundStation station = measure.getStation();
    final SpacecraftState state = estimated.getStates()[0];
    final double delay = angularErrorTroposphericModel(station, state);
    // Delay is taken into account to shift the spacecraft position
    final double dt = delay / Constants.SPEED_OF_LIGHT;
    // Position of the spacecraft shifted of dt
    final SpacecraftState transitState = state.shiftedBy(-dt);
    // Update measurement value taking into account the ionospheric delay.
    final AbsoluteDate date = transitState.getDate();
    final Vector3D position = transitState.getPVCoordinates().getPosition();
    final Frame inertial = transitState.getFrame();
    // Elevation and azimuth in radians
    final double elevation = station.getBaseFrame().getElevation(position, inertial, date);
    final double baseAzimuth = station.getBaseFrame().getAzimuth(position, inertial, date);
    final double twoPiWrap = MathUtils.normalizeAngle(baseAzimuth, measure.getObservedValue()[0]) - baseAzimuth;
    final double azimuth = baseAzimuth + twoPiWrap;
    // Update estimated value taking into account the tropospheric delay.
    // Azimuth - elevation values
    estimated.setEstimatedValue(azimuth, elevation);
}
Also used : SpacecraftState(org.orekit.propagation.SpacecraftState) Frame(org.orekit.frames.Frame) GroundStation(org.orekit.estimation.measurements.GroundStation) Vector3D(org.hipparchus.geometry.euclidean.threed.Vector3D) AngularAzEl(org.orekit.estimation.measurements.AngularAzEl) AbsoluteDate(org.orekit.time.AbsoluteDate)

Example 15 with GroundStation

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

the class RangeTroposphericDelayModifier method modify.

/**
 * {@inheritDoc}
 */
@Override
public void modify(final EstimatedMeasurement<Range> estimated) throws OrekitException {
    final Range measurement = estimated.getObservedMeasurement();
    final GroundStation station = measurement.getStation();
    final SpacecraftState state = estimated.getStates()[0];
    final double[] oldValue = estimated.getEstimatedValue();
    final double delay = rangeErrorTroposphericModel(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 = 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 += rangeErrorParameterDerivative(station, driver, state, delay);
            estimated.setParameterDerivatives(driver, parameterDerivative);
        }
    }
}
Also used : SpacecraftState(org.orekit.propagation.SpacecraftState) GroundStation(org.orekit.estimation.measurements.GroundStation) Range(org.orekit.estimation.measurements.Range) 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