Hello community,
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,
Alberto
Hi @Alberto
For the first question, you can refer to the Frames documentation of Orekit (Orekit – Frames). I think the section “User-defined frames” could help you.
For the second question, did you tried to remove the InertialForces? Indeed, the frame you use to define the baryAbsPva is an inertial frame. So, you are performing an orbit propagation in a inertial frame. Inertial forces are used for propagation in non inertial frames, like around Lagragian points.
Best regards,
Bryan
Hi @bcazabonne and thank you for the answer.
Yes in fact I tried both SingleBodyAbsoluteAttraction
and SingleBodyRelativeAttraction
with/without InertialForces
but this does not help me to overcome the issue. Indeed when the InertialForces
is present the acceleration due to this force is always zero, so the results are the same with and without adding it.
I also checked again the initial state doing a round-trip conversion but it seems to be correct.
Best Regards,
Alberto
Hi @Alberto,
For the first question, just adding a little more detail to @bcazabonne’s answer from what I have done
- Create/implement a custom
TransformProvider
whose getTransform
method might be as follows (beware the following is a Python syntax, you should be able to port to Java very easily)
def getTransform(self, date):
return Transform(date, self.body.getPVCoordinates(date, self.frame).negate())
where body
is the body to which a transform is required (in your case Moon) and frame
is the frame that needs to be transformed (in your case GCRF).
- Next step is to create a frame using this custom transform we created
Frame(frame, origin_transform_provider, body_name + '/' + frame.getName(), True)
I hope this is helpful.
It’s quite an interesting study you are attempting with the 2nd question, looking forward to how it develops.
1 Like