Package org.orekit.propagation.events
Class AdapterDetector
- java.lang.Object
-
- org.orekit.propagation.events.AdapterDetector
-
- All Implemented Interfaces:
EventDetector
public class AdapterDetector extends Object implements EventDetector
Base class for adapting an existing detector.This class is intended to be a base class for changing behaviour of a wrapped existing detector. This base class delegates all its methods to the wrapped detector. Classes extending it can therefore override only the methods they want to change.
- Since:
- 9.3
- Author:
- Luc Maisonobe
-
-
Constructor Summary
Constructors Constructor Description AdapterDetector(EventDetector detector)
Build an adaptor wrapping an existing detector.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
finish(SpacecraftState state)
This method finalizes the event detector's job.double
g(SpacecraftState s)
Compute the value of the switching function.EventDetectionSettings
getDetectionSettings()
Getter for the settings.EventDetector
getDetector()
Get the wrapped detector.EventHandler
getHandler()
Get the handler.void
init(SpacecraftState s0, AbsoluteDate t)
Initialize event handler at the start of a propagation.-
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
getMaxCheckInterval, getMaxIterationCount, getThreshold
-
-
-
-
Constructor Detail
-
AdapterDetector
public AdapterDetector(EventDetector detector)
Build an adaptor wrapping an existing detector.- Parameters:
detector
- detector to wrap
-
-
Method Detail
-
getDetector
public EventDetector getDetector()
Get the wrapped detector.- Returns:
- wrapped detector
-
init
public void init(SpacecraftState s0, AbsoluteDate t)
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
- Specified by:
init
in interfaceEventDetector
- Parameters:
s0
- initial statet
- target time for the integration
-
g
public double g(SpacecraftState s)
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
- Parameters:
s
- the current state information: date, kinematics, attitude- Returns:
- value of the switching function
-
getHandler
public EventHandler getHandler()
Get the handler.- Specified by:
getHandler
in interfaceEventDetector
- Returns:
- event handler to call at event occurrences
-
finish
public void finish(SpacecraftState state)
This method finalizes the event detector's job.- Specified by:
finish
in interfaceEventDetector
- Parameters:
state
- state at propagation end
-
getDetectionSettings
public EventDetectionSettings getDetectionSettings()
Getter for the settings.- Specified by:
getDetectionSettings
in interfaceEventDetector
- Returns:
- detection settings
-
-