Custom Maneuver in Python

Hi everyone :slight_smile:

I’m trying to implement an impulsive maneuver event detector in Python where the direction and magnitude are defined based on the state at the time of the maneuver.

From my understanding, this is not possible with the native ImpulseManeuver class and i am therefore trying to implement my own by subclassing the PythonAbstractDetector class.
I am trying to combine the guide at Constructing FunctionalDetector in Python - Orekit with the jave source code for ImpulseManeuver in order to define my custom maneuver.

The issue is that the handler nested within the maneuver detector cannot seem to access the maneuver trigger event. In particular, when asking to print the type of the T parameter passed to the handler’s overloaded eventOccurred method, i get a “PythonAbstractDetector”, which doesn’t have a trigger parameter.

Here is a python script reproducing the error: (4.3 KB)

I have also tried subclassing the ImpulseManeuver class in order to overload its resetState to implement my custom maneuver, but i believe this is impossible, as no Python sublclassing specific class is present (ie. there is no “PythonImpulseManeuver”).

I don’t really know how to procede, any suggestions?

Many thanks!