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_CHECK, DEFAULT_MAX_ITER, DEFAULT_THRESHOLD
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
NegateDetector(EventDetectionSettings eventDetectionSettings, 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(EventDetectionSettings detectionSettings, 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, isForward, withDetectionSettings, withHandler, withMaxCheck, withMaxCheck, withMaxIter, withThreshold
-
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.EventDetector
finish, getMaxCheckInterval, getMaxIterationCount, getThreshold
-
-
-
-
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(EventDetectionSettings eventDetectionSettings, EventHandler newHandler, EventDetector original)
Private constructor.- Parameters:
eventDetectionSettings
- event detection settings.newHandler
- event handler.original
- event detector.- Since:
- 13.0
-
-
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(EventDetectionSettings detectionSettings, EventHandler newHandler)
Description copied from class:AbstractDetector
Build a new instance.- Specified by:
create
in classAbstractDetector<NegateDetector>
- Parameters:
detectionSettings
- detection settingsnewHandler
- event handler to call at event occurrences- Returns:
- a new instance of the appropriate sub-type
-
-