Fix Issue #981 : Add the ability to consider LOFType as inertial frame when changing covariance frame in StateCovariance
Hey everyone,
Following the previously opened issue #981 (closed) and thread, i am creating this mr to solve the issue at hand.
How is it solved
To solve the issue of not being able to LOFType as pseudo-inertial while changing covariance frame, @MaximeJ and I came up with the following solution :
- Add a "isQuasiInertial()" method in
LOFType
similar to what is already done inOrbitRelativeFrame
. - Add an "***_INERTIAL" equivalent to already existing LOFTypes, except for EQW which is already pseudo-inertial.
- Change the "transformFromInertial(...)" method to freeze the transform if LOFType is considered pseudo-inertial.
This way, the changes happening in LOFType
are completely invisible to StateCovariance
which remains untouched. In addition, i re-added the tests from "Covariance Transformations for Satellite Flight Dynamics Operations by David A.Vallado" where covariance is converted from an ECI frame to NTW and RSW.
Tests were added to improve code coverage to 100%.
Note
In order for these changes to pass the tests, I unexpectedly had to change the tolerance delta of "testConstantOffset" in TabulatedLofOffsetTest
from 1.2e-15 to 1.48e-15. I believe this is due to the combination of the randomGenerator with the addition of new LOFTypes as changing the randgomGenerator seed impacts the needed tolerance for this test to pass.
Other
While working on LOFType
, I took the opportunity to add the "transformFromLOFType()" methods that were missing (there are now equivalent methods between rotation and transform)