Package org.orekit.propagation.events
Class NegateDetector
- java.lang.Object
-
- org.orekit.propagation.events.AbstractDetector<NegateDetector>
-
- org.orekit.propagation.events.NegateDetector
-
- All Implemented Interfaces:
Serializable
,EventDetector
public class NegateDetector extends AbstractDetector<NegateDetector>
An event detector that negates the sign on another event detector'sg
function.- Author:
- Evan Ward
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.orekit.propagation.events.AbstractDetector
DEFAULT_MAX_ITER, DEFAULT_MAXCHECK, DEFAULT_THRESHOLD
-
-
Constructor Summary
Constructors Constructor Description NegateDetector(EventDetector original)
Create a new event detector that negates an existing event detector.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected NegateDetector
create(double newMaxCheck, double newThreshold, int newMaxIter, EventHandler<? super NegateDetector> newHandler)
Build a new instance.double
g(SpacecraftState s)
Compute the value of the switching function.void
init(SpacecraftState s0, AbsoluteDate t)
Initialize event handler at the start of a propagation.-
Methods inherited from class org.orekit.propagation.events.AbstractDetector
eventOccurred, getHandler, getMaxCheckInterval, getMaxIterationCount, getThreshold, isForward, resetState, withHandler, withMaxCheck, withMaxIter, withThreshold
-
-
-
-
Constructor Detail
-
NegateDetector
public NegateDetector(EventDetector original)
Create a new event detector that negates an existing event detector.This detector will be initialized with the same
EventDetector.getMaxCheckInterval()
,EventDetector.getThreshold()
, andEventDetector.getMaxIterationCount()
asoriginal
. Initially this detector will use theContinueOnEvent
event handler.- Parameters:
original
- detector.
-
-
Method Detail
-
init
public void init(SpacecraftState s0, AbsoluteDate t)
Description copied from class:AbstractDetector
Initialize event handler at the start of a propagation.This method is called once at the start of the propagation. It may be used by the event handler to initialize some internal data if needed.
The default implementation does nothing
This implementation sets the direction of propagation and initializes the event handler. If a subclass overrides this method it should call
super.init(s0, t)
.- Specified by:
init
in interfaceEventDetector
- Overrides:
init
in classAbstractDetector<NegateDetector>
- Parameters:
s0
- initial statet
- target time for the integration
-
g
public double g(SpacecraftState s)
Description copied from class:AbstractDetector
Compute the value of the switching function. This function must be continuous (at least in its roots neighborhood), as the integrator will need to find its roots to locate the events.- Specified by:
g
in interfaceEventDetector
- Specified by:
g
in classAbstractDetector<NegateDetector>
- Parameters:
s
- the current state information: date, kinematics, attitude- Returns:
- value of the switching function
-
create
protected NegateDetector create(double newMaxCheck, double newThreshold, int newMaxIter, EventHandler<? super NegateDetector> newHandler)
Description copied from class:AbstractDetector
Build a new instance.- Specified by:
create
in classAbstractDetector<NegateDetector>
- Parameters:
newMaxCheck
- maximum checking interval (s)newThreshold
- convergence threshold (s)newMaxIter
- maximum number of iterations in the event time searchnewHandler
- event handler to call at event occurrences- Returns:
- a new instance of the appropriate sub-type
-
-