Propagation Method Discrepancies

Hi, I am using Orekit’s numerical propagator. I am doing propagation at a certain step size to get states over a given interval. The two methods produce different results for the states and method 2 is significantly faster than method 1. I was wondering what the correct way to do the propagation is and why there are discrepancies. Note: Everything about propagation setup and initialization is the exact same except the below parts.

Method 1:

var initalDate = ...
var finalDate = ...
var step = ...

propagator.propagate(initialDate);
        
List<SpacecraftState> states = new ArrayList<>();
AbsoluteDate extrapDate = initialDate;
while(extrapDate.compareTo(finalDate) <= 0) {
    states.add(propagator.propagate(extrapDate));
    extrapDate = extrapDate.shiftedBy(step);
}

Method 2:

var initalDate = ...
var finalDate = ...
var step = ...

List<SpacecraftState> states = new ArrayList<>();
propagator.setStepHandler(step, states::add);

propagator.propagate(initialDate, finalDate);

The step handler method is the recommended way. It is indeed much faster than the first one because the underlying integrator can select step sizes that are larger than the output step, so the computation load is driven by the dynamics and not by the external sampling.

1 Like

One additional comment: make sure you select a very low tolerance for the integrator step size handling if you use for example Dormand-Prince 8(5, 3) integrator. In the tutorials, we used 10m, but it is way too huge. We now have a tendency to select 0.001m as the position tolerance. With these settings, the two methods should probably give more similar results.

1 Like