Package org.orekit.propagation.events
Class NegateDetector
- java.lang.Object
-
- org.orekit.propagation.events.AbstractDetector<NegateDetector>
-
- org.orekit.propagation.events.NegateDetector
-
- All Implemented Interfaces:
EventDetector
public class NegateDetector extends AbstractDetector<NegateDetector>
An event detector that negates the sign on another event detector'sg
function.- Author:
- Evan Ward
-
-
Field Summary
-
Fields inherited from class org.orekit.propagation.events.AbstractDetector
DEFAULT_MAX_ITER, DEFAULT_MAXCHECK, DEFAULT_THRESHOLD
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
NegateDetector(AdaptableInterval newMaxCheck, double newThreshold, int newMaxIter, EventHandler newHandler, EventDetector original)
Private constructor.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(AdaptableInterval newMaxCheck, double newThreshold, int newMaxIter, EventHandler newHandler)
Build a new instance.double
g(SpacecraftState s)
Compute the value of the switching function.EventDetector
getOriginal()
Get the delegate event detector.void
init(SpacecraftState s0, AbsoluteDate t)
Initialize event handler at the start of a propagation.-
Methods inherited from class org.orekit.propagation.events.AbstractDetector
getDetectionSettings, getHandler, getMaxCheckInterval, getMaxIterationCount, getThreshold, isForward, withDetectionSettings, withHandler, withMaxCheck, 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.
-
NegateDetector
protected NegateDetector(AdaptableInterval newMaxCheck, double newThreshold, int newMaxIter, EventHandler newHandler, EventDetector original)
Private constructor.- Parameters:
newMaxCheck
- max check interval.newThreshold
- convergence threshold in seconds.newMaxIter
- max iterations.newHandler
- event handler.original
- event detector.
-
-
Method Detail
-
getOriginal
public EventDetector getOriginal()
Get the delegate event detector.- Returns:
- the delegate event detector
- Since:
- 10.2
-
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 interface:EventDetector
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.- Parameters:
s
- the current state information: date, kinematics, attitude- Returns:
- value of the switching function
-
create
protected NegateDetector create(AdaptableInterval newMaxCheck, double newThreshold, int newMaxIter, EventHandler 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
-
-