I am trying to propagate the same trajectory in three different frames, namely GCRF, Moon inertial and Earth-Moon barycenter-centered inertial to compare the perturbing accelerations acting on the spacecraft. I am using a NumericalPropagator with absolute PVA.
Since I’m running into some trouble, I have two questions:
is it possible to create an inertial frame which is always aligned with GCRF but centered on another body (Moon and EM barycenter in my case) ?
I am able to obtain correct results for the Earth and Moon centered propagations (which uses NewtonianAttraction for the central body and ThirdBodyAttraction for the other bodies) but not for the barycentric one. I have tried different combinations of ThirdBodyAttraction, SingleBodyAbsoluteAttraction, SingleBodyRelativeAttraction and InertialForces, but I still obtain a diverging trajectory. Which should be the correct forces to add to the propagator in order to obtain results consistent with Earth and Moon centered trajectories?
This is the code I developed: EarthMoonProp.java (10.9 KB)
Thank you in advance for the answer,