Package org.orekit.propagation.events
Class FieldAbstractDetector<D extends FieldAbstractDetector<D,T>,T extends CalculusFieldElement<T>>
- java.lang.Object
-
- org.orekit.propagation.events.FieldAbstractDetector<D,T>
-
- Type Parameters:
D- type of the detectorT- type of the field element
- All Implemented Interfaces:
FieldEventDetector<T>
- Direct Known Subclasses:
FieldAltitudeDetector,FieldApsideDetector,FieldBetaAngleDetector,FieldBooleanDetector,FieldCylindricalShadowEclipseDetector,FieldDateDetector,FieldEclipseDetector,FieldElevationDetector,FieldElevationExtremumDetector,FieldEventEnablingPredicateFilter,FieldEventSlopeFilter,FieldExtremumApproachDetector,FieldFunctionalDetector,FieldImpulseManeuver,FieldLatitudeCrossingDetector,FieldLatitudeRangeCrossingDetector,FieldLongitudeCrossingDetector,FieldLongitudeRangeCrossingDetector,FieldNegateDetector,FieldNodeDetector,FieldParameterDrivenDateIntervalDetector,FieldRelativeDistanceDetector
public abstract class FieldAbstractDetector<D extends FieldAbstractDetector<D,T>,T extends CalculusFieldElement<T>> extends Object implements FieldEventDetector<T>
Common parts shared by several orbital events finders.- Author:
- Luc Maisonobe
- See Also:
Propagator.addEventDetector(EventDetector)
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_MAX_ITERDefault maximum number of iterations in the event time search.static doubleDEFAULT_MAXCHECKDefault maximum checking interval (s).static doubleDEFAULT_THRESHOLDDefault convergence threshold (s).
-
Constructor Summary
Constructors Modifier Constructor Description protectedFieldAbstractDetector(FieldAdaptableInterval<T> maxCheck, T threshold, int maxIter, FieldEventHandler<T> handler)Deprecated.as of 12.2protectedFieldAbstractDetector(FieldEventDetectionSettings<T> detectionSettings, FieldEventHandler<T> handler)Build a new instance.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected abstract Dcreate(FieldAdaptableInterval<T> newMaxCheck, T newThreshold, int newMaxIter, FieldEventHandler<T> newHandler)Deprecated.as of 12.2protected Dcreate(FieldEventDetectionSettings<T> detectionSettings, FieldEventHandler<T> newHandler)Build a new instance.FieldEventDetectionSettings<T>getDetectionSettings()Getter for the settings.FieldEventHandler<T>getHandler()Get the handler.FieldAdaptableInterval<T>getMaxCheckInterval()Get maximal time interval between switching function checks.intgetMaxIterationCount()Get maximal number of iterations in the event time search.TgetThreshold()Get the convergence threshold in the event time search.voidinit(FieldSpacecraftState<T> s0, FieldAbsoluteDate<T> t)Initialize event handler at the start of a propagation.booleanisForward()Check if the current propagation is forward or backward.DwithDetectionSettings(FieldEventDetectionSettings<T> newSettings)Set up the event detection settings.DwithHandler(FieldEventHandler<T> newHandler)Set up the event handler to call at event occurrences.DwithMaxCheck(double newMaxCheck)Set up the maximum checking interval.DwithMaxCheck(FieldAdaptableInterval<T> newMaxCheck)Set up the maximum checking interval.DwithMaxIter(int newMaxIter)Set up the maximum number of iterations in the event time search.DwithThreshold(T newThreshold)Set up the convergence threshold.-
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.FieldEventDetector
finish, g
-
-
-
-
Field Detail
-
DEFAULT_MAXCHECK
public static final double DEFAULT_MAXCHECK
Default maximum checking interval (s).- See Also:
- Constant Field Values
-
DEFAULT_THRESHOLD
public static final double DEFAULT_THRESHOLD
Default convergence threshold (s).- See Also:
- Constant Field Values
-
DEFAULT_MAX_ITER
public static final int DEFAULT_MAX_ITER
Default maximum number of iterations in the event time search.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
FieldAbstractDetector
@Deprecated protected FieldAbstractDetector(FieldAdaptableInterval<T> maxCheck, T threshold, int maxIter, FieldEventHandler<T> handler)
Deprecated.as of 12.2Build a new instance.- Parameters:
maxCheck- maximum checking intervalthreshold- convergence threshold (s)maxIter- maximum number of iterations in the event time searchhandler- event handler to call at event occurrences
-
FieldAbstractDetector
protected FieldAbstractDetector(FieldEventDetectionSettings<T> detectionSettings, FieldEventHandler<T> handler)
Build a new instance.- Parameters:
detectionSettings- event detection settingshandler- event handler to call at event occurrences- Since:
- 12.2
-
-
Method Detail
-
init
public void init(FieldSpacecraftState<T> s0, FieldAbsoluteDate<T> 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:
initin interfaceFieldEventDetector<D extends FieldAbstractDetector<D,T>>- Parameters:
s0- initial statet- target time for the integration
-
getDetectionSettings
public FieldEventDetectionSettings<T> getDetectionSettings()
Getter for the settings.- Specified by:
getDetectionSettingsin interfaceFieldEventDetector<D extends FieldAbstractDetector<D,T>>- Returns:
- detection settings
-
getMaxCheckInterval
public FieldAdaptableInterval<T> getMaxCheckInterval()
Get maximal time interval between switching function checks.- Specified by:
getMaxCheckIntervalin interfaceFieldEventDetector<D extends FieldAbstractDetector<D,T>>- Returns:
- maximal time interval (s) between switching function checks
-
getMaxIterationCount
public int getMaxIterationCount()
Get maximal number of iterations in the event time search.- Specified by:
getMaxIterationCountin interfaceFieldEventDetector<D extends FieldAbstractDetector<D,T>>- Returns:
- maximal number of iterations in the event time search
-
getThreshold
public T getThreshold()
Get the convergence threshold in the event time search.- Specified by:
getThresholdin interfaceFieldEventDetector<D extends FieldAbstractDetector<D,T>>- Returns:
- convergence threshold (s)
-
withMaxCheck
public D withMaxCheck(double newMaxCheck)
Set up the maximum checking interval.This will override a maximum checking interval if it has been configured previously.
- Parameters:
newMaxCheck- maximum checking interval (s)- Returns:
- a new detector with updated configuration (the instance is not changed)
- Since:
- 12.0
-
withMaxCheck
public D withMaxCheck(FieldAdaptableInterval<T> newMaxCheck)
Set up the maximum checking interval.This will override a maximum checking interval if it has been configured previously.
- Parameters:
newMaxCheck- maximum checking interval (s)- Returns:
- a new detector with updated configuration (the instance is not changed)
- Since:
- 12.0
-
withMaxIter
public D withMaxIter(int newMaxIter)
Set up the maximum number of iterations in the event time search.This will override a number of iterations if it has been configured previously.
- Parameters:
newMaxIter- maximum number of iterations in the event time search- Returns:
- a new detector with updated configuration (the instance is not changed)
- Since:
- 6.1
-
withThreshold
public D withThreshold(T newThreshold)
Set up the convergence threshold.This will override a convergence threshold if it has been configured previously.
- Parameters:
newThreshold- convergence threshold (s)- Returns:
- a new detector with updated configuration (the instance is not changed)
- Since:
- 6.1
-
withDetectionSettings
public D withDetectionSettings(FieldEventDetectionSettings<T> newSettings)
Set up the event detection settings.This will override settings previously configured.
- Parameters:
newSettings- new event detection settings- Returns:
- a new detector with updated configuration (the instance is not changed)
- Since:
- 12.2
-
withHandler
public D withHandler(FieldEventHandler<T> newHandler)
Set up the event handler to call at event occurrences.This will override a handler if it has been configured previously.
- Parameters:
newHandler- event handler to call at event occurrences- Returns:
- a new detector with updated configuration (the instance is not changed)
- Since:
- 6.1
-
getHandler
public FieldEventHandler<T> getHandler()
Get the handler.- Specified by:
getHandlerin interfaceFieldEventDetector<D extends FieldAbstractDetector<D,T>>- Returns:
- event handler to call at event occurrences
-
create
@Deprecated protected abstract D create(FieldAdaptableInterval<T> newMaxCheck, T newThreshold, int newMaxIter, FieldEventHandler<T> newHandler)
Deprecated.as of 12.2Build a new instance.- 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
-
create
protected D create(FieldEventDetectionSettings<T> detectionSettings, FieldEventHandler<T> newHandler)
Build a new instance.- Parameters:
detectionSettings- detection settingsnewHandler- event handler to call at event occurrences- Returns:
- a new instance of the appropriate sub-type
- Since:
- 12.2
-
isForward
public boolean isForward()
Check if the current propagation is forward or backward.- Returns:
- true if the current propagation is forward
- Since:
- 7.2
-
-