Hi Noel,
I think there is some noise of 1m/s sigma no ? Because the residuals show a 1m/s final standard deviation when I run the OD on it. Anyway the errors are so large that it is not a problem.
So… I found a bug in your code
It’s actually a small typo… that has dire consequences.
It is where you set up the min/max of the drag coefficient.
You wrote:
if (cdEstimated) {
for (final ParameterDriver driver : propagatorBuilder.getPropagationParametersDrivers().getDrivers()) {
if (driver.getName().equals(DragSensitive.DRAG_COEFFICIENT)) {
driver.setSelected(true);
}
if (parser.containsKey(ParameterKey.DRAG_CD_MIN)) {
driver.setMinValue(parser.getDouble(ParameterKey.DRAG_CD_MIN));
}
if (parser.containsKey(ParameterKey.DRAG_CD_MAX)) {
driver.setMaxValue(parser.getDouble(ParameterKey.DRAG_CD_MAX));
}
}
}
What’s happening here is that you’re looping on ALL the propagation drivers (even those that are not selected for estimation) and setting their min/max to respectively 0/20 in the case you sent me.
The drag coefficient is happy with that, but the gravity coefficients of the Earth, Sun and Moon… not really.
When you set µ(Earth) = GM(earth) max to 20, it automatically checks that its current value is not higher than that. Since its current value is around 3.986e14, it is set to 20.
So the Earth mass and gravity are divided by about 2e13, it is quite a dramatic loss of weight
By then your orbit and OD are completely off the chart. And it explains the weird results you’ve been getting since 2 weeks.
So what you need to do is incorporate the part:
if (parser.containsKey(ParameterKey.DRAG_CD_MIN)) {
driver.setMinValue(parser.getDouble(ParameterKey.DRAG_CD_MIN));
}
if (parser.containsKey(ParameterKey.DRAG_CD_MAX)) {
driver.setMaxValue(parser.getDouble(ParameterKey.DRAG_CD_MAX));
}
Into the loop
if (driver.getName().equals(DragSensitive.DRAG_COEFFICIENT)) {
driver.setSelected(true);
}
With that I get the following final iteration
Iteration Number: 4, Evaluations performed: 5, Altitude (km): 474.9533425428784, ΔP(m): 0.000514, ΔV(m/s): 0.000000158, RMS: 1.089395345571, nb Range-rate: 2042/2042
The estimated Cartesian parameters: {2019-06-11T16:35:29.149, P(-5253153.081935317, -4400321.643770282, 79996.07599597143), V(-559.0399478765471, 763.992472405819, 7585.013897366148), A(6.505766337336994, 5.4495774208334, -0.09907112361208954)}
Position separation (m) 92.80720297547316, Velocity separation (m/s) 0.042960846134871646
Estimated orbital parameters changes:
1 Px +40.918064682744 (final value: -5253153.081935317000)
2 Py -26.643770282157 (final value: -4400321.643770282000)
3 Pz -78.924004028566 (final value: 79996.075995971430)
4 Vx -0.039947876547 (final value: -559.039947876547)
5 Vy -0.007527594181 (final value: 763.992472405819)
6 Vz +0.013897366148 (final value: 7585.013897366148)
Estimated propagator parameters changes:
1 drag coefficient -0.499086423900 (final value: 1.500913576100)
Estimated measurements parameters changes:
Estimated orbit: Cartesian parameters: {2019-06-11T16:35:29.149, P(-5253153.081935317, -4400321.643770282, 79996.07599597143), V(-559.0399478765471, 763.992472405819, 7585.013897366148), A(6.505766337336994, 5.4495774208334, -0.09907112361208954)}
Estimated orbital parameters changes:
1 Px +40.918064682744 (final value: -5253153.081935317000)
2 Py -26.643770282157 (final value: -4400321.643770282000)
3 Pz -78.924004028566 (final value: 79996.075995971430)
4 Vx -0.039947876547 (final value: -559.039947876547)
5 Vy -0.007527594181 (final value: 763.992472405819)
6 Vz +0.013897366148 (final value: 7585.013897366148)
Estimated propagator parameters changes:
1 drag coefficient -0.499086423900 (final value: 1.500913576100)
Estimated measurements parameters changes:
Number of iterations: 4
Number of evaluations: 5
Measurements type: range-rate
number of measurements: 2042
residuals min value : -3.8618207602457915
residuals max value : 3.2141390786164266
residuals mean value : -0.027685765570733413
residuals σ : 1.0893102463210969
[Px = -5253153.081935317, Py = -4400321.643770282, Pz = 79996.07599597143, Vx = -559.0399478765471, Vy = 763.992472405819, Vz = 7585.013897366148]
[drag coefficient = 1.5009135761004808]
[]
Covariances:
27.752537426374765
29.591865288539864
41.23772020764571
0.033527693705399306
0.03219533856498905
0.02079745262867609
0.8839836987491664
wall clock run time (s): 45.407000000000004
Which is much more realistic.
However the drag coefficient is off by -0.5 (25% of its “real” value), which is not very good.
The standard deviation (σ) of the drag coefficient is 0.88 (last value of the covariances column) which means that it is hardly observable since its σ is of the same order of magnitude than its value.
You can improve that a little with more measurements and a longer orbital arc…
But you already have quite a number of measurements on a 14h arc. I suspect range rate measurements are not the best to estimate the drag coefficient.
This is something you should probably analyse after you’ve fixed the bug.
Cheers,
Maxime