Adding Event Detector inside KMF

Hello all,

I have a question about how to add an event detector to a KMF. I have created a custom event detector class to use with my KMF but I’m having trouble adding it to my KMF propagator.
It seems that the event detector can only be added to a propagator and not a propagator builder. I’m currently using a propagator builder to build my KMF.
I tried using a propagator and adding an event detector instead but the KMF only uses a propagator builder apparently.

Is there a way to have both the KMF and the event detector working.

Any help is greatly appreciated.

Thanks!

Hi,

You are right it is not possible for the user to add an event detector directly in the builder. This is because those builders are meant for OD and are not supposed to bother about events other than the internal ones of their force models. The only exception is the ImpulseManeuver, which can now be added (see develop branch and incoming release of Orekit 12.2).
If you must, a workaround is to add a dummy ForceModel returning zero acceleration and providing a detector.

Cheers,
Romain.

Thank you very much! I’ll give that a try.

@OrbitExplorer - just a thought about a possible alternative. If you don’t need the detection to literally occur while the orbit solver is in-progress, perhaps feed the finished propagation result into an interpolator of some kind and use that to detect your event? I know an orbit read in as an OEM file can be run through an event detector.

Thank you @baubin ! I needed to detect the event as it happened but I’ll keep that in mind for the future.