D
- type of the detectorT
- type of the field elementpublic abstract class FieldAbstractDetector<D extends FieldAbstractDetector<D,T>,T extends org.hipparchus.CalculusFieldElement<T>> extends Object implements FieldEventDetector<T>
Propagator.addEventDetector(EventDetector)
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MAX_ITER
Default cmaximum number of iterations in the event time search.
|
static double |
DEFAULT_MAXCHECK
Default maximum checking interval (s).
|
static double |
DEFAULT_THRESHOLD
Default convergence threshold (s).
|
Modifier | Constructor and Description |
---|---|
protected |
FieldAbstractDetector(FieldAdaptableInterval<T> maxCheck,
T threshold,
int maxIter,
FieldEventHandler<T> handler)
Build a new instance.
|
Modifier and Type | Method and Description |
---|---|
protected abstract D |
create(FieldAdaptableInterval<T> newMaxCheck,
T newThreshold,
int newMaxIter,
FieldEventHandler<T> newHandler)
Build a new instance.
|
abstract T |
g(FieldSpacecraftState<T> s)
Compute the value of the switching function.
|
FieldEventHandler<T> |
getHandler()
Get the handler.
|
FieldAdaptableInterval<T> |
getMaxCheckInterval()
Get maximal time interval between switching function checks.
|
int |
getMaxIterationCount()
Get maximal number of iterations in the event time search.
|
T |
getThreshold()
Get the convergence threshold in the event time search.
|
void |
init(FieldSpacecraftState<T> s0,
FieldAbsoluteDate<T> t)
Initialize event handler at the start of a propagation.
|
boolean |
isForward()
Check if the current propagation is forward or backward.
|
D |
withHandler(FieldEventHandler<T> newHandler)
Setup the event handler to call at event occurrences.
|
D |
withMaxCheck(double newMaxCheck)
Setup the maximum checking interval.
|
D |
withMaxCheck(FieldAdaptableInterval<T> newMaxCheck)
Setup the maximum checking interval.
|
D |
withMaxIter(int newMaxIter)
Setup the maximum number of iterations in the event time search.
|
D |
withThreshold(T newThreshold)
Setup the convergence threshold.
|
public static final double DEFAULT_MAXCHECK
public static final double DEFAULT_THRESHOLD
public static final int DEFAULT_MAX_ITER
protected FieldAbstractDetector(FieldAdaptableInterval<T> maxCheck, T threshold, int maxIter, FieldEventHandler<T> handler)
maxCheck
- maximum checking intervalthreshold
- convergence threshold (s)maxIter
- maximum number of iterations in the event time searchhandler
- event handler to call at event occurrencespublic void init(FieldSpacecraftState<T> s0, FieldAbsoluteDate<T> t)
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
init
in interface FieldEventDetector<T extends org.hipparchus.CalculusFieldElement<T>>
s0
- initial statet
- target time for the integrationpublic abstract T g(FieldSpacecraftState<T> s)
g
in interface FieldEventDetector<T extends org.hipparchus.CalculusFieldElement<T>>
s
- the current state information: date, kinematics, attitudepublic FieldAdaptableInterval<T> getMaxCheckInterval()
getMaxCheckInterval
in interface FieldEventDetector<T extends org.hipparchus.CalculusFieldElement<T>>
public int getMaxIterationCount()
getMaxIterationCount
in interface FieldEventDetector<T extends org.hipparchus.CalculusFieldElement<T>>
public T getThreshold()
getThreshold
in interface FieldEventDetector<T extends org.hipparchus.CalculusFieldElement<T>>
public D withMaxCheck(double newMaxCheck)
This will override a maximum checking interval if it has been configured previously.
newMaxCheck
- maximum checking interval (s)public D withMaxCheck(FieldAdaptableInterval<T> newMaxCheck)
This will override a maximum checking interval if it has been configured previously.
newMaxCheck
- maximum checking interval (s)public D withMaxIter(int newMaxIter)
This will override a number of iterations if it has been configured previously.
newMaxIter
- maximum number of iterations in the event time searchpublic D withThreshold(T newThreshold)
This will override a convergence threshold if it has been configured previously.
newThreshold
- convergence threshold (s)public D withHandler(FieldEventHandler<T> newHandler)
This will override a handler if it has been configured previously.
newHandler
- event handler to call at event occurrencespublic FieldEventHandler<T> getHandler()
getHandler
in interface FieldEventDetector<T extends org.hipparchus.CalculusFieldElement<T>>
protected abstract D create(FieldAdaptableInterval<T> newMaxCheck, T newThreshold, int newMaxIter, FieldEventHandler<T> newHandler)
newMaxCheck
- maximum checking intervalnewThreshold
- convergence threshold (s)newMaxIter
- maximum number of iterations in the event time searchnewHandler
- event handler to call at event occurrencespublic boolean isForward()
Copyright © 2002-2023 CS GROUP. All rights reserved.