I have been using the
EventBasedManoeuvreTriggers to perform low-thrust manoeuvres only when the spacecraft is not in eclipse. To do so, I have created an
EclipseDetector, and I have used the eclipse detector and its Negate as start and stop triggers for the manoeuvre as follows:
ManeuverTriggers triggers =
new EventBasedManeuverTriggers(eclipseDetector, new NegateDetector(eclipseDetector));
propagator.addForceModel(new Maneuver(null, triggers, propulsionModel));
To my surprise, with such an implementation, the manoeuvre is performed when the spacecraft is in eclipse and not the opposite as I would have expected. In fact, according to the
EventBasedManoeuvreTriggers docs, the firing detectors only detect increasing sign changes and, according to the
EclipseDetector docs, the detector increases its sign when exiting the eclipse. Therefor I would have expected the aforementioned implementation to work. Instead, to have it working properly I had to switch the position of the detectors in the trigger as follows:
ManeuverTriggers triggers =
new EventBasedManeuverTriggers(new NegateDetector(eclipseDetector), eclipseDetector);
Am I missing something? Or this is the expected behaviour.
Thanks in advance for the help,
Sorry for the late reply.
Please be aware that
EventBasedManeuverTriggers has been obsoleted by
StartStopEventsTrigger since Orekit 11.1. The class was not declared as deprecated though, I am sorry about this, I just forgot. The
EventBasedManeuverTriggers has been removed from the development branch that will become the future 12.0 version.
StartStopEventsTrigger class is however more difficult to use because it is an abstract class and needs to be specialized by user code. The reason is that the trigger feature is used by continuous maneuvers which are force model, and all force models must be compatible with fields. So there is a (ugly) hack that allows to convert on the fly regular event detectors into field detectors. The javadoc explains how to implement this hack for any detector that users may need, look at the
convertStopDetector javadoc in the abstract class for details.
Could you have a look at this new class and check it it behaves properly with respect to its documentation about the function signs ?
sorry for the very late reply. I haven’t been able to work on this for a while. I am checking the
StartStopEventsTrigger class and I would like to use it with
BooleanDetectors (I am now combining the eclipse detector with other detectors that I need); however I cannot seem to make it work correctly the
convertStopDetector. Would it be possible to have an example on how to implement them with a
Thanks in advance.
I know its an old thread but its relevant to what I’m trying to do as well. Are there any available examples using the StartStopEventsTrigger in orekit v12?
Welcome to the forum!
There are examples of implementation of
StartStopEventsTrigger in the tests, in ConfigurableLowThrustManeuverTest and StartStopEventTriggerTest.
Are there python examples?
Not to my knowledge no…
Maybe if you explain a bit more what you’re trying to achieve we could try to walk you through it
I’d like to use shifted ascending node detectors as start stop events for a continuous burn.
Here’s some pseudo code:
ascending_node_detector = NodeDetector(frame)
forward_shifted_detector = EventShifter(ascending_node_detector, 300s)
backward_shifted_detector = EventShifter(ascending_node_detector, -300s)
maneuver_trigger = StartStopEventsTrigger(backward_shifted_detector, forward_shifted_detector)
maneuver = Maneuver(attitude_override, maneuver_trigger, propulsion_model)
This is all in python. What happens when I try this is that StartStopEventsTrigger results in a “Not Implemented” exception. I gather that I need to convert my forward and backward shifted event detectors to “FieldDetectors” but I don’t understand the distinction or exactly how to do that.
Ah yes ok,
StartStopEventsTrigger is an abstract class in Java so there are some methods you need to implement:
There’s a Java example of this here.
In Python, you’ll need to subclass
PythonStartStopEventsTrigger to implement the unimplemented methods.
I’ll just add that if you’re not doing any Field computation, you don’t need to have a real implementation, you can just return None or whatever the expected type is.
Yes, thanks @Serrof!
Also, @jakemashburn, beware that both detectors need to be positive at the same time for triggering the maneuver (see the Javadoc of StartStopEventsTrigger).
So you will probably need to negate the first event detector
forward_shifted_detector if you want to thrust around the ascending node.
Thank you both very much for your help!
Sorry that I hijacked the thread a bit but hopefully this is still generally helpful for others working with StartStopEventsTrigger.
Hi all! I found this post very useful for what I am doing as well, thank you! @jakemashburn could you provide an example of a python implementation of that class using
PythonStartStopEventsTriggerwhen you get it?