Hi all!
It looks like the AngularTroposphericDelayModifier overrides the value of the elevation instead of applying a tropospheric biais to the estimated value. Please find below the code that cause problems:
final TrackingCoordinates tc = station.getBaseFrame().getTrackingCoordinates(position, inertial, date);
final double twoPiWrap = MathUtils.normalizeAngle(tc.getAzimuth(), measure.getObservedValue()[0]) - tc.getAzimuth();
final double azimuth = tc.getAzimuth() + twoPiWrap;
// Update estimated value taking into account the tropospheric delay.
// Azimuth - elevation values
estimated.modifyEstimatedValue(this, azimuth, tc.getElevation());
The test to reproduce the issue is (We shall juste replace ExtendedOrbit by a KeplerianOrbit):
@Test
public void test() {
Bias<AngularAzEl> bias = new Bias<>(new String[]{"az-bias", "el-bias"}, new double[]{0.0, 0.5}, new double[]{1.0, 1.0}, new double[]{0.0, 0.0}, new double[]{10.0, 10.0});
AngularTroposphericDelayModifier tropo = new AngularTroposphericDelayModifier(ModifiedSaastamoinenModel.getStandardModel());
GroundStation station = new GroundStation(
new TopocentricFrame(new OneAxisEllipsoid(Constants.EIGEN5C_EARTH_EQUATORIAL_RADIUS, Constants.WGS84_EARTH_FLATTENING, Frames.getEarthCenteredGpsFrame()),
new GeodeticPoint(0.0, 0.0, 100.0), "station"));
AngularAzEl azEl = new AngularAzEl(station, AbsoluteDate.ARBITRARY_EPOCH, new double[]{1.0, 1.0}, new double[]{1.0, 1.0}, new double[]{1.0, 1.0},
new ObservableSatellite(0));
azEl.getParametersDrivers().forEach(driver -> driver.setReferenceDate(AbsoluteDate.ARBITRARY_EPOCH));
EstimatedMeasurementBase<AngularAzEl> estimated = azEl.estimateWithoutDerivatives(0, 0, new SpacecraftState[]{new SpacecraftState(
ExtendedOrbit.fromKeplerian(6800000.0, 0.01, 0.0, 0.0, 0.0, 4.7, PositionAngleType.MEAN, AbsoluteDate.ARBITRARY_EPOCH))});
System.out.println("Estimated: " + FastMath.toDegrees(estimated.getEstimatedValue()[1]));
tropo.modifyWithoutDerivatives(estimated);
System.out.println("After tropo: " + FastMath.toDegrees(estimated.getEstimatedValue()[1]));
bias.modifyWithoutDerivatives(estimated);
System.out.println("After Bias: " + FastMath.toDegrees(estimated.getEstimatedValue()[1]));
EstimatedMeasurementBase<AngularAzEl> estimated2 = azEl.estimateWithoutDerivatives(0, 0, new SpacecraftState[]{new SpacecraftState(
ExtendedOrbit.fromKeplerian(6800000.0, 0.01, 0.0, 0.0, 0.0, 4.7, PositionAngleType.MEAN, AbsoluteDate.ARBITRARY_EPOCH))});
System.out.println(" ");
System.out.println("Estimated (2): " + FastMath.toDegrees(estimated2.getEstimatedValue()[1]));
bias.modifyWithoutDerivatives(estimated2);
System.out.println("After Bias (2): " + FastMath.toDegrees(estimated2.getEstimatedValue()[1]));
tropo.modifyWithoutDerivatives(estimated2);
System.out.println("After Tropo (2): " + FastMath.toDegrees(estimated2.getEstimatedValue()[1]));
}
The printed values are:
Estimated: 10.661668302996699
After tropo: 10.661705095552644
After Bias: 39.3095948520938
Estimated (2): 10.661668302996699
After Bias (2): 39.309558059537856
After Tropo (2): 10.661705095552644
We can see that after the application of the tropospheric delay, the bias is removed. But, it shall not be removed and the final value must be β39.3095948520938β for βAfter Tropo (2)β.
A more general question about this class. Shall we remove it?
In my opinion, yes we should because the effect of the troposphere for angular measurements is modelised by the AngularRadioRefractionModifier
.
What do you think?
Best regards,
Bryan