Hello everyone,
I built my own DragSensitive using TimeSpanMap for the drivers, and then used it to run an OD. Everything seems to work fine in the OD itself, but I have a problem when getting the normalized parameters after the OD is complete. I’m estimating 4 CDs and for all 4 of them, the normalized parameters returned are identical (even though the OD estimated 4 different values)
The propagator built using these parameters has (not surprisingly) a constant CD equal to the first one estimated. I think this is a bug and the code is repeating the first normalized parameter of the CD for as many times as needed. Thoughts?
I extract the parameters using the getSelectedNormalizedParameters method from the PropagatorBuilder used to build the estimator (BatchLSEstimator).
I pasted here the class I created to generate the DragSensitive object. From there all I did is add it to my PropagatorBuilder, activate the estimation of the Cd and then run the OD.
Ah and I think I found a second issue, this time when estimating with the Kalman Filter.
I don’t think KalmanEstimator supports ParameterDriver build using TimeSpanMap. This is the error I got:
orekit.JavaError: <super: <class 'JavaError'>, <JavaError object>>
Java stacktrace:
org.orekit.errors.OrekitIllegalStateException: Cd parameter contains several span in its value TimeSpanMap, the getValue(date) method must be called
at org.orekit.utils.ParameterDriver.getValue(ParameterDriver.java:645)
at org.orekit.utils.ParameterDriver.getNormalizedValue(ParameterDriver.java:587)
at org.orekit.estimation.sequential.KalmanModel.<init>(KalmanModel.java:270)
at org.orekit.estimation.sequential.KalmanEstimator.<init>(KalmanEstimator.java:111)
at org.orekit.estimation.sequential.KalmanEstimatorBuilder.build(KalmanEstimatorBuilder.java:76)
I’m currently using version 12.0.1, but I had a look on the master branch on Gitlab at the KalmanEstimationCommon class and there is always the call to ParameterDriver.getNormalizedValue() without specifying any date.
Regarding the 1st issue. Looking at AbstractPropagatorBuilder#getSelectedNormalizedParameters there’s a loop on the TimeSpanMap but then there’s a call to driver.getNormalizedValue(AbsoluteDate.ARBITRARY_EPOCH);
So yes, I think it’s not calling the proper date on this one. Could you open an issue on the forge, please?
For the 2nd issue, indeed Kalman filters are not meant to be used with TimeSpan-ed parameter drivers. A Kalman is estimating the parameters at every step (i.e. measurement received) so the notion of TimeSpan-ed parameter isn’t really relevant here.
Do you agree with that? Maybe the documentation could be improved though
For the Kalman estimation I’m not sure I agree. In theory I would agree with you, but I’ve been running Kalman ODs with TimeSpanDragForce and estimating multiple CDs successfully.
The later ones remain unmodified until the observations reach the time on which that particular CD is defined. However, the “older CDs” (the ones of previous CD arcs) are continuously modified until the last measurement is processed. Initially I would have expected for the Kalman Filter to only modify one CD at a time, but that never happened in all the OD logs I’ve seen (in the last 5-6 months).
For example, a typical log of one of my ODs run with KF looks something like:
I think the issue you experienced can be somehow related to 1643. We need a mechanism to better select the parameters within the TimeSpanMap and activate the estimation or not depending on current date.
Could you open an issue for the Kalman and link it to 1643?
Don’t know when it will be fixed though, contributions welcome