# CartesianOrbit: JacobianWrtParameters

I encountered an interesting issue while using the CartesianOrbit class. My goal is to approximate a covariance in cartesian elements into a covariance in Keplerian elements.

To my knowledge this should be done as follows:

``````CartesianOrbit initialGuess = new CartesianOrbit(.....)

// Orbital covariance matrix initialization
final double[][] dYdC = new double;
initialGuess.getJacobianWrtParameters(getPositionAngle, dYdC);
final RealMatrix Jac = inv(MatrixUtils.createRealMatrix(dYdC));
final RealMatrix orbitalP = Jac.multiply(cartesianlP.multiply(Jac.transpose()));
``````

However under the CartesianOrbit class ` getJacobianWrtParameters()` is only defined in the parent Orbit.java class, which essentially takes the inverse of the jacobian w.r.t cartesian elements (but in this case that’s always the identity matrix.

Am I missing a way to get the Jacobian with respect to Parameters for a cartesian orbit?

Welcome to the Orekit forum!

What you could try is to convert your `initialGuess` into a `KeplerianOrbit` using `OrbitType.KEPLERIAN.convertType(initialGuess)` and call the `getJacobianWrtParameters()` method

Regards,
Bryan

Please also see the following description for the Jacobian methods of Orekit:

`getJacobianWrtParameters` : `Compute the Jacobian of the Cartesian parameters with respect to the orbital parameters`

`getJacobianWrtCartesian` : `Compute the Jacobian of the orbital parameters with respect to the Cartesian parameters`

In the description, the “orbital parameters” are defined by the orbit type you use when calling the method. Therefore, using a `CartesianOrbit` you will have identity matrices. dC/dC and dC/dC
If you convert your orbit into a `KeplerianOrbit`, you will have :

• getJacobianWrtParameters : dC/dK
• getJacobianWrtCartesian dK/dC