I am learning how to use Numerical Propagator by “orekit-tutorials-10.3\src\main\java\org\orekit\tutorials\propagation\EphemerisMode.java”
I cannot understand why we must use this follow function to store the integrated ephemeris:
// Propagation with storage of the results in an integrated ephemeris
final SpacecraftState finalState = propagator.propagate(initialDate.shiftedBy(6000));

or, it will run error, it will say "Find why “ephemeris” could be null "

Ephemeris propagation mode is close to the Master mode of the propagation. Close because a handler is added to the orbit propagator in order to perform some actions during steps. For the ephemeris mode, the handler is called for the integration steps and the action is mainly performed for the last step for which an ephemeris is generated using the orbital states stored by the integrator during the integration process. That’s why we usually call this ephemeris an integrated ephemeris.

Therefore, you need to perform an orbit propagation using the `propagate` method of the numerical propagator in order to let the ephemeris mode working.

If you want to learn about numerical propagation in Orekit, I can recommend you to first look at the `SlaveMode` and `MasterMode` tutorials. They are, IMHO, propagation modes that are easier to understand and mostly used.

Best regards,
Bryan

Hi Byyan,

Thank you！ It is very helpful !

Best regards,
Tang Geshi

Hi Bryan,
I came across a strange case When I try to use MasterMode.java from tutorials “.\orekit-tutorials-10.3\src\main\java\org\orekit\tutorials\propagation” and modify the orbit to what I want to test.
The initial kepler orbit as follow:

``````        double a       =  6872646.35761074;
double e       =        0.00074728;
double lM       =FastMath.toRadians(284.85658);   //e < 0 when LM  <= 284.85657;  ???
``````

When the lM be set to less than 284.85657, it will run error when execute to line 145:

``````          final SpacecraftState finalState = propagator.propagate(initialDate.shiftedBy(630.));
``````

it will report an error information:

``````         invalid parameter eccentricity: -0 not in range [0, ∞]
``````

But when the lM be set to 284.85658 or more than this value, it works.

I also find this phenomenon is correlated with the degree of gravity field, when I change the degree to 8, it also works, but when I change the degree to 10 or higher, it will run this error.

`````` The attachment is the code I used.

Would you please check this problem? Thank you!
``````

MasterMode.java (9.3 KB)

After I change the integrator from DormandPrince853Integrator to ClassicalRungeKuttaIntegrator, it works no matter what lM value or gravity field degree.

Best regards
TangGeshi

That’s a strange behavior.
I will try to check it.

However, I think that’s because the dynamical model used in the tutorial is not really representative of the real perturbations acting on a satellite at this altitude (i.e. ~500km). It could be more representative by adding the drag effect and the Lunar-Solar point masses perturbations.

The objective of the tutorial is to provide basic information to help users initializing and configuring the different objects of Orekit to perform an orbit propagation. At the end, the user can adapt the tutorial to match it’s own initial data.

Regards,
Bryan

Hi Bryan
I had added the real perturbations including 64X64 gravity field, drag force, Lunar-Solar point masses perturbations and other 8 planets point masses perturbations, but it behave same, only the value of lM is different. But when Runge-Kutta integrator is used, all works well.
I wonder whether is there any problem in DormandPrince853Integrator.
Thank you!
Best regards,
TangGeshi

Now you have a very complete perturbations model

Here, you can try two things:

1. Propagating in circular elements by using `propagator.setOrbitType(OrbitType.CIRCULAR)` before running the propagator.

2. Initializing an initial step size for the integrator by using `integrator.setInitialStepSize(step)` just after initializing the integrator. Here, `integrator` represents the `DormandPrince853Integrator`. I don’t know the exact value of `step` that you can set, you can try several values between the min and max step of the integrator.

Bryan

Hi, Bryan,

I had changed the orbit type to OrbitType.CIRCULAR mode, it works well now.
Thank you so much!

Best regards
Tang Geshi