Expected Rotation different from manually computed rotation

Hello everyone,

So I’ve been working on the issue #964 and to improve numerical precision, i added a direct conversion method from LOFType to LOFType in the LOFType class without having to resort to an inertial “pivot” frame.

For example, in the case where we want to convert a covariance from NTW to RTN, instead of doing :
NTW -> Inertial frame -> RTN.
We could directly do :

The problem here is that when I build this rotation using the Rotation class from hipparchus, my test is failing whereas if i build the rotation matrix myself, the test is passing.

You’ll find attached the unit test I’m talking about. In this test, I want to express a covariance matrix, initially expressed in the NTW coordinate system, in the RTN(=RSW=QSW) coordinate system. This test is using tests cases from this Vallado’s paper. In this particular case, a very small rotation around the orbital momentum is needed as the NTW and the RTN are almost identical.

I don’t know why the rotation obtained from the Rotation’s constructor is different from what i manually compute and I’m currently out of ideas. That is why I’m now requesting your help !


RotationProblemTest.java (6.9 KB)

Hi Vincent,

looks to me as if in one case you define the rotation matrix in the RTN frame while in the other you define it in the inertial frame.


Hello Romain,

Now that you mention it, I’m going to take a look at it with your idea in mind.

Thank you,

Hi Romain,

This was indeed the solution ! I’m now composing rotation to and from the ECI in which the given PVCoordinates are defined so now it works as expected.

Thank you for your insight :+1: