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);
}
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);
}
}
}
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);
}
}
}
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);
}
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);
}
}
}
Aggregations