I am trying to propagate orbits around Lagrange points and in order to validate the propagation, I use the JPL JWST Horizons’ ephemeris as reference and starting point of the propagation.
I face a very strange behaviour. Indeed, propagating without central body and with only Earth, Moon and Sun single body attractions, in Solar System Barycenter reference frame I end up with a position error of more than 2km after 1.5 days (I also added inertial acceleration but for SSB, I checked, the acceleration is indeed 0.). Introducing Jupiter perturbation reduces the error to ~200m.
The very strange thing is that I compared these 2 propagations with a classical propagation with an Earth-centered and luni-solar third body propagator (without jupiter then) and this propagator gives the best results.
The propagation without central body and Jupiter added is the second best at ~25m of the classical Earth-centered propagator (cf. plot).
I do not succeed to explain this behaviour. In my opinion, single body propagation (with Earth, Sun and Moon single body attraction) and earth-centered J2000 lunisolar propagation have to be equivalent.
The inertial acceleration of earth-centered J2000 reference frame seems to me (correct me if I am mistaking) taken into account in the differential acceleration of the solar 3rd body perturbation.
If you have any explanation for this, I would be very glad to hear it.
Many thanks in advance !

Please find attached the python script (I use Orekit with Python through Jpype) used to generate the data, and the reference OEM (sorry, I was mistaking, the test case was on Orion DRO instead of JWST but I have had the same behaviour with JWST case). Hope this could help.

I’ve noticed that if I use the Sun instead of the Solar System Barycenter frame as integration_frame the results look more consistent (see below). But that’s not what I would call an explanation

So I have no idea what’s happening. For the gas giants, I’d say it’s related to the movement of the Sun with respect to the SSB. For Mars, I have no clue because its impact on the movement of SSB is negligible.

Thank you very much to have taken the time to have a look into the problem. Very weird that adding Venus seems to give worser results than adding Mars…one other explanation could lie in the ‘reference’ trajectory. I mean, would it be possible that the JPL ephemeris for Orion be generated using simple Earth centered propagator with third body perturbations ? If so, what we would see as an improvement could be instead a degradation…I’ll dig a bit into this.
Again thanks a lot for your investigation !

I have tried something else to get rid of JPL ephemeris. To do so, I have started from a simply geo orbit I have propagated in two ways :

with classical propagator: Earth-centered propagator (0x0 Earth potential, only central attraction) + lunisolar third body acceleration

with no central body propagator: in some inertial reference frame, I add earth, Moon and Sun forces. I tried in two inertial reference frames : J2000 and Sun Solar Barycenter.

Here are the results of the differencies between the no central body propagation and classical Earth-centered propagation:

In blue, the differences using Sun Solar Barycenter as reference frame for the no central body propagation and in green using J2000.
The 2 propagators agree quite well when using Sun Solar Barycenter (less than 1km after 1.5 days) but not at all when integrating in J2000. I suspect a problem with the inertial forces, given that there are zero in Sun Solar Barycenter.
Secondly, I end up again with the similar behaviour that we have seen previously. Indeed, adding Jupiter and Saturn to the no central body propagator improves the results (gain of roughly one order of magnitude in position).

I supsect something with the bodies ephemerides that somehow must integrate the whole solar systems acceleration. But what I don’t understand is that these ephemerides are used in both propagators to compute the bodies accelerations (being 3rd body or single body attraction) so there is still a mystery to me…
Please find attached the new script corresponding to this case. If you have any illumination… valid_propags_orekit_2.py (6.9 KB)

I did some investigations about this subject and about my suspicion about the inertial accelerations being wrong when integrating in a non-inertial or pseudo inertial reference frame (such as J2000).
To do so, I numerically integrated the equation of motion of an initial state retrieved from a reference ephemeride using Dopri853 scipy integrator and did the same propagated with orekit (same propagator as in previous posts). In my force models, I added the inertial acceleration of the frame origin (inertial forces are also added on Orekit side, the force model is the same in both propagators). And below is what I obtain in terms of position error (‘custom’ is my own propagation using Dopri853 integrator):

We can clearly see the custom propagation is quite correct ( 1km error at end of the 4 days propagation) while orekit is very far from it.
If I set to zero the inertial acceleration in my custom propagator, I obtain this:

The two propagators agree perfectly. So I think this demonstrates that the inertial acceleration is not taken into account when propagating in an pseudo inertial reference frame such as J2000.
Or perhaps I have made a mistake in the configuration of the inertial forces ? Below is the configuration of my Orekit propagator:

What I don’t get in your code snippet is that you take J2000 as reference inertial frame when defining the InertialForces and then you propagate… in J2000?
In that case, the inertial forces will indeed be zero (looking at the code here with s.getFrame() == referenceInertialFrame)

Thanks a lot for your very prompt answer !
There were two possibilities: an error in the computation of the inertial acceleration or a bad configuration of the inertial force from my part. This is definitively the latter !
Indeed, I have changed the inertial frame to ICRF in the inertial forces and this works nicely now (see below the results):

Custom and orekit propagators agree very well now. So thank you !
On my side, I thought that the frame to be given in InertialForces’ constructor was the integration frame. I was thinking that Orekit would add the inertial forces due to the pseudo-inertiallity of the J2000 reference frame (implicitly with respect to ICRF which is the most inertial reference frame of Orekit). I was fooled by the Javadoc of the constructer which define the frame as ‘pseudo-inertial’. In my mind, ICRF is purely inertial (of course, there does not exist a perfectly inertial reference frame, so all are pseudo-inertial, but the level of inertiallity of ICRF and J2000 is not the same in my opinion).