Hi everyone!
I’ve been asking in recent posts about the different process noise models available in Orekit, and I’ve been working with the UnivariateProcessNoise using the UnivariateFunctions defined (using polynomials).
I am programming in Python and the thing is that using those functions works perfectly fine. However, when I try to use own defined functions using PythonUnivariateFunction I get the following error:
>
Java stacktrace:
java.lang.RuntimeException: type error
at org.hipparchus.analysis.PythonUnivariateFunction.value(Native Method)
at org.orekit.estimation.sequential.UnivariateProcessNoise.getInertialOrbitalProcessNoiseMatrix(UnivariateProcessNoise.java:213)
at org.orekit.estimation.sequential.UnivariateProcessNoise.getProcessNoiseMatrix(UnivariateProcessNoise.java:174)
at org.orekit.estimation.sequential.AbstractKalmanEstimationCommon.getNormalizedProcessNoise(AbstractKalmanEstimationCommon.java:508)
at org.orekit.estimation.sequential.UnscentedKalmanModel.getProcessNoiseMatrix(UnscentedKalmanModel.java:186)
at org.orekit.estimation.sequential.UnscentedKalmanModel.getProcessNoiseMatrix(UnscentedKalmanModel.java:47)
at org.hipparchus.filtering.kalman.unscented.UnscentedKalmanFilter.predictionAndCorrectionSteps(UnscentedKalmanFilter.java:126)
at org.hipparchus.filtering.kalman.unscented.UnscentedKalmanFilter.estimationStep(UnscentedKalmanFilter.java:105)
at org.orekit.estimation.sequential.UnscentedKalmanEstimator.estimationStep(UnscentedKalmanEstimator.java:123)
The functions I am defining are of the following kind:
class std_radial_pos(PythonUnivariateFunction):
def value(self, t):
return np.sqrt(C * t**3 + 0.1)
being C a constant.
I am defining similar functions in LVLH frame for XYZ position and XYZ velocity. Also, for Cd and Cr are defined using Constant from UnivariateFunctions.
If anyone knows what could be happening it would be of tremendous help
.
Thank you so much in advance,
Antonio.