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);