Question on State Transition Matrices & Covariance

Have you tried using Orekit’s KalmanEstimator ? :wink:

Or at least have you looked how it’s done there ? The computation of the state transition matrix is done in the method KalmanModel#getErrorStateTransitionMatrix.

If you’ve set the OrbitType of your propagator to equinoctial then your derivatives in mapper.getStateJacobian(nextStepState, jacobian); and mapper.getParametersJacobian(nextStepState, jacobianParam); should be with respect to equinoctial parameters.

So your code looks ok to me. Where exactly do you get an error ?

I don’t get an error per se but I get weird values… see the first line below. I would expect quite low values and potentially higher values on the last line (higher dependency of longitude wrt the other parameters):

jacobian(1,:): 0.9999929232378609 | -11179.473292758054 | 188284.5748993603 | -4.410319010145031 | -78.73060850174079 | 379122.96532085486 
jacobian(2,:): -5.037507530591889E-12 | 1.0000093190774522 | 0.002245084641970569 | -9.850898632262402E-8 | -1.3923259590635902E-6 | 0.0067217660739083765 
jacobian(3,:): 8.001539429059155E-11 | -0.0022902433206608034 | 1.0000051170604998 | 1.018971333109224E-9 | -1.28362688457843E-7 | 4.230109765430311E-4 
jacobian(4,:): -1.210830110639109E-16 | 1.0153031218483577E-8 | 6.209851278636877E-10 | 0.9999976080898223 | -0.0022226301236119364 | 6.447792758188713E-10 
jacobian(5,:): -7.349109716878387E-18 | 6.275543681919286E-10 | 3.840289417930982E-11 | 0.002245104871814292 | 0.9999974329999803 | -1.01699326272539E-8 
jacobian(6,:): -5.3448826054231894E-11 | 0.002263795142480988 | 1.3450309191657896E-4 | 4.614463776866222E-7 | 1.5249828449193317E-8 | 0.999994594142847``

Hi @benoist,

What kind of force models did you add to your propagator ?

I agree with you, but if you have only the central body gravity as a force model (pure Keplerian context).

Example: Equinoctial (mean anomaly) STM (obtained with derivative structures) for an elliptical orbit (a = 15000km, e = 0.125) after an hour of propagation.

  1. With only central body gravity:
	 1.000000000000e+00   0.000000000000e+00   0.000000000000e+00   0.000000000000e+00   0.000000000000e+00   0.000000000000e+00  
	 0.000000000000e+00   1.000000000000e+00   0.000000000000e+00   0.000000000000e+00   0.000000000000e+00   0.000000000000e+00  
	 0.000000000000e+00   0.000000000000e+00   1.000000000000e+00   0.000000000000e+00   0.000000000000e+00   0.000000000000e+00  
	 0.000000000000e+00   0.000000000000e+00   0.000000000000e+00   1.000000000000e+00   0.000000000000e+00   0.000000000000e+00  
	 0.000000000000e+00   0.000000000000e+00   0.000000000000e+00   0.000000000000e+00   1.000000000000e+00   0.000000000000e+00  
	-1.237184578301e-07  -1.325762416515e-14   2.442490654175e-15   0.000000000000e+00   0.000000000000e+00   1.000000000000e+00
  1. With a 20x20 Earth gravity potential added:
	 9.998719140385e-01   3.326050735226e+04  -1.993246493362e+03   1.309131780669e+04  -8.681147887369e+03   1.446851409025e+04  
	-3.153414290762e-11   9.997243930087e-01   3.895823310557e-04   1.585024642661e-04   6.013024534925e-04   8.130568846682e-05  
	-5.161113467635e-11   6.209358038102e-04   1.000557228680e+00   7.967632300848e-04   7.677996657246e-05   1.070777006354e-03  
	-3.455127225711e-11  -9.842738774145e-05   3.946960610649e-04   1.000000564658e+00  -3.391442457066e-04   1.314364659125e-04  
	 1.226147172524e-11   1.758417653152e-04  -9.046224373569e-05  -6.844086571906e-05   1.000254686174e+00   6.758629548939e-05  
	-1.236655265848e-07  -2.389731214895e-03  -7.607708945321e-04  -2.535056208532e-03  -1.371055164247e-04   9.979464548385e-01

So your STM looks good to me.
If you’re still unconvinced and think there is a bug in your code we’ll need more context (orbit, force model, propagation configuration etc.) to try and help you.

Cheers,
Maxime