Hi!

I'm trying to write my own orbit propagator in C++/Matlab.

I was searching for a tool on the web that could help me validate my computations.

I found GMAT and I find this is a great software!

While trying to validate my own program I happened to find something weird I really don't understand.

Using a very simple propagator (only force = central + J2) I had a slight disconnection between my ephemeris and GMAT ephemeris that starts after around 100s of simulation and seems to be reduced after 300s.

From the way it looks I have the feeling that it comes from the GMAT ephemeris because my plot is smooth and regular while GMAT plot isn't.

I tried to compare the data using the central gravitational potential alone and I found the same disconnection.

Is it a normal behavior of the propagator ? Did I do something wrong in my setup ?

Attached you will find the script file and two plots from Matlab: position and velocity over 500s.

The left parts of the plots are comparisons between my propagator ("ORBIT", blue) and GMAT (red).

The right parts are the differences between the 2 ephemeris files ("ORBIT" - GMAT).

For my software I use a fixed-step (1s) RK4 integrator and a Cartesian propagator.

Thanks a lot!

Max

PS: Sorry for my english...