Hello,
I’m working with the Orekit Python (version 12.2) to propagate an orbit using a NumericalPropagator with the Dormand-Prince method. However, I’m encountering an issue where the setStepHandler() method isn’t recognized or doesn’t seem to work.
Here’s what I’ve tried:
- Using
setStepHandler()directly on aNumericalPropagatorobject, but I get errors indicating that the method is not available. - Attempted casting the
NumericalPropagatortoPropagatorusingcast_()to access inherited interface methods (such assetStepHandler()), but I still get errors related to method access.
I have read in an old post in the forum that the point nr 2 (using cast_) could solve the issue but I am not able to make it work. I have tried different formulations, all of them give me error.
As an example of my code:
from org.orekit.propagation.numerical import NumericalPropagator
from org.orekit.propagation import Propagator
Create propagator instance
propagator = NumericalPropagator(integrator)
Attempt to cast propagator to Propagator interface
propagator = propagator.cast_(Propagator)
Now attempt to set step handler
propagator.setStepHandler(step_size, step_handler)
Does someone know how to solve this issue and use setStepHandler method in Python on a NumericalPropagator?
Thanks