Adaptable max checking interval for event detectors
A key feature that is missing from the existing event detecting architecture, is the ability to dynamically change the maximum checking interval based on the current SpacecraftState
or some condition. A key use-case for this would be to be able to detect short infrequent events during a large search window, where a small interval would have to be set in order to capture every event, at the expense of a long computation time.
The suggestion is to replace the current no-argument withMaxCheckInterval() method in event detectors with a method that would take the current state as an argument withMaxCheckInterval(state)
. A default implementation would simply always return the same value, but users could register a custom method using something like:
EventDetector detector = new SomeDetector().
withThreshold(aTinyThreshold).
withMaxCheck(state -> closeToEventPredicate(state) ? 1.0 : 100.0);
See the original forum post here and a similar issue #87 (closed).