Package org.orekit.propagation.events
Class FieldNegateDetector<T extends CalculusFieldElement<T>>
- java.lang.Object
-
- org.orekit.propagation.events.FieldAbstractDetector<FieldNegateDetector<T>,T>
-
- org.orekit.propagation.events.FieldNegateDetector<T>
-
- Type Parameters:
T
- type of the field element
- All Implemented Interfaces:
FieldEventDetector<T>
public class FieldNegateDetector<T extends CalculusFieldElement<T>> extends FieldAbstractDetector<FieldNegateDetector<T>,T>
An event detector that negates the sign on another event detector'sg
function.- Since:
- 12.0
- Author:
- Evan Ward, Luc Maisonobe
-
-
Field Summary
-
Fields inherited from class org.orekit.propagation.events.FieldAbstractDetector
DEFAULT_MAX_ITER, DEFAULT_MAXCHECK, DEFAULT_THRESHOLD
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
FieldNegateDetector(FieldAdaptableInterval<T> newMaxCheck, T newThreshold, int newMaxIter, FieldEventHandler<T> newHandler, FieldEventDetector<T> original)
Private constructor.FieldNegateDetector(FieldEventDetector<T> 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 FieldNegateDetector<T>
create(FieldAdaptableInterval<T> newMaxCheck, T newThreshold, int newMaxIter, FieldEventHandler<T> newHandler)
Build a new instance.T
g(FieldSpacecraftState<T> s)
Compute the value of the switching function.FieldEventDetector<T>
getOriginal()
Get the delegate event detector.void
init(FieldSpacecraftState<T> s0, FieldAbsoluteDate<T> t)
Initialize event handler at the start of a propagation.-
Methods inherited from class org.orekit.propagation.events.FieldAbstractDetector
getHandler, getMaxCheckInterval, getMaxIterationCount, getThreshold, isForward, withHandler, withMaxCheck, withMaxCheck, withMaxIter, withThreshold
-
-
-
-
Constructor Detail
-
FieldNegateDetector
public FieldNegateDetector(FieldEventDetector<T> original)
Create a new event detector that negates an existing event detector.This detector will be initialized with the same
FieldEventDetector.getMaxCheckInterval()
,FieldEventDetector.getThreshold()
, andFieldEventDetector.getMaxIterationCount()
asoriginal
. Initially this detector will use theFieldContinueOnEvent
event handler.- Parameters:
original
- detector.
-
FieldNegateDetector
protected FieldNegateDetector(FieldAdaptableInterval<T> newMaxCheck, T newThreshold, int newMaxIter, FieldEventHandler<T> newHandler, FieldEventDetector<T> 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 FieldEventDetector<T> getOriginal()
Get the delegate event detector.- Returns:
- the delegate event detector
-
init
public void init(FieldSpacecraftState<T> s0, FieldAbsoluteDate<T> t)
Description copied from class:FieldAbstractDetector
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 interfaceFieldEventDetector<T extends CalculusFieldElement<T>>
- Overrides:
init
in classFieldAbstractDetector<FieldNegateDetector<T extends CalculusFieldElement<T>>,T extends CalculusFieldElement<T>>
- Parameters:
s0
- initial statet
- target time for the integration
-
g
public T g(FieldSpacecraftState<T> s)
Description copied from class:FieldAbstractDetector
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 interfaceFieldEventDetector<T extends CalculusFieldElement<T>>
- Specified by:
g
in classFieldAbstractDetector<FieldNegateDetector<T extends CalculusFieldElement<T>>,T extends CalculusFieldElement<T>>
- Parameters:
s
- the current state information: date, kinematics, attitude- Returns:
- value of the switching function
-
create
protected FieldNegateDetector<T> create(FieldAdaptableInterval<T> newMaxCheck, T newThreshold, int newMaxIter, FieldEventHandler<T> newHandler)
Description copied from class:FieldAbstractDetector
Build a new instance.- Specified by:
create
in classFieldAbstractDetector<FieldNegateDetector<T extends CalculusFieldElement<T>>,T extends CalculusFieldElement<T>>
- Parameters:
newMaxCheck
- maximum checking intervalnewThreshold
- 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
-
-