Class FieldRecordAndContinue<T extends FieldEventDetector<E>,E extends CalculusFieldElement<E>>
- java.lang.Object
-
- org.orekit.propagation.events.handlers.FieldRecordAndContinue<T,E>
-
- Type Parameters:
T
- the type ofEventDetector
that this event handler will handle events for.E
- the type ofCalculusFieldElement
to use instead ofdouble
.
- All Implemented Interfaces:
FieldEventHandler<T,E>
public class FieldRecordAndContinue<T extends FieldEventDetector<E>,E extends CalculusFieldElement<E>> extends Object implements FieldEventHandler<T,E>
Handler that will record every time an event occurs and always returnAction.CONTINUE
.As this handler stores all observed events it may consume large amounts of memory depending on the duration of propagation and the frequency of events.
- Since:
- 9.3
- Author:
- Evan Ward
- See Also:
RecordAndContinue
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FieldRecordAndContinue.Event<T,F extends CalculusFieldElement<F>>
A single event detected during propagation.
-
Constructor Summary
Constructors Constructor Description FieldRecordAndContinue()
Create a new handler using anArrayList
to store events.FieldRecordAndContinue(List<FieldRecordAndContinue.Event<T,E>> events)
Create a handler using the given collection to store events.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Clear all stored events.Action
eventOccurred(FieldSpacecraftState<E> s, T detector, boolean increasing)
eventOccurred method mirrors the same interface method as inEventDetector
and its subclasses, but with an additional parameter that allows the calling method to pass in an object from the detector which would have potential additional data to allow the implementing class to determine the correct return state.List<FieldRecordAndContinue.Event<T,E>>
getEvents()
Get the events passed to this handler.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.orekit.propagation.events.handlers.FieldEventHandler
init, init, resetState
-
-
-
-
Constructor Detail
-
FieldRecordAndContinue
public FieldRecordAndContinue()
Create a new handler using anArrayList
to store events.
-
FieldRecordAndContinue
public FieldRecordAndContinue(List<FieldRecordAndContinue.Event<T,E>> events)
Create a handler using the given collection to store events.- Parameters:
events
- collection.
-
-
Method Detail
-
getEvents
public List<FieldRecordAndContinue.Event<T,E>> getEvents()
Get the events passed to this handler.Note the returned list of events is in the order the events were passed to this handler by calling
eventOccurred(FieldSpacecraftState, FieldEventDetector, boolean)
. This may or may not be chronological order.Also not that this method returns a view of the internal collection used to store events and calling any of this handler's methods may modify both the underlying collection and the returned view. If a snapshot of the events up to a certain point is needed create a copy of the returned collection.
- Returns:
- the events observed by the handler in the order they were observed.
-
clear
public void clear()
Clear all stored events.
-
eventOccurred
public Action eventOccurred(FieldSpacecraftState<E> s, T detector, boolean increasing)
Description copied from interface:FieldEventHandler
eventOccurred method mirrors the same interface method as inEventDetector
and its subclasses, but with an additional parameter that allows the calling method to pass in an object from the detector which would have potential additional data to allow the implementing class to determine the correct return state.- Specified by:
eventOccurred
in interfaceFieldEventHandler<T extends FieldEventDetector<E>,E extends CalculusFieldElement<E>>
- Parameters:
s
- SpaceCraft state to be used in the evaluationdetector
- object with appropriate type that can be used in determining correct return stateincreasing
- with the event occurred in an "increasing" or "decreasing" slope direction- Returns:
- the Action that the calling detector should pass back to the evaluation system
-
-