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:
FieldAbstractGeographicalDetector,FieldAbstractTopocentricDetector,FieldAngularSeparationDetector,FieldApsideDetector,FieldBetaAngleDetector,FieldBooleanDetector,FieldCylindricalShadowEclipseDetector,FieldDateDetector,FieldEclipseDetector,FieldExtremumAngularSeparationDetector,FieldExtremumApproachDetector,FieldFunctionalDetector,FieldNegateDetector,FieldNodeDetector,FieldParameterDrivenDateIntervalDetector,FieldPlaneCrossingDetector,FieldRelativeDistanceDetector,FieldSingleDateDetector,FieldTimeIntervalDetector
public abstract class FieldAbstractDetector<D extends FieldAbstractDetector<D,T>,T extends CalculusFieldElement<T>>
extends Object
implements FieldEventDetector<T>
Common parts shared by several events finders.
It should only be implemented by detectors able to accept any handler.
- Author:
- Luc Maisonobe
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doubleDefault maximum checking interval (s).static final intDefault maximum number of iterations in the event time search.static final doubleDefault convergence threshold (s). -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedFieldAbstractDetector(FieldEventDetectionSettings<T> detectionSettings, FieldEventHandler<T> handler) Build a new instance.protectedFieldAbstractDetector(EventFunction eventFunction, FieldEventDetectionSettings<T> detectionSettings, FieldEventHandler<T> handler) Build a new instance with an event function. -
Method Summary
Modifier and TypeMethodDescriptionstatic <W extends CalculusFieldElement<W>>
booleancheckIfForward(FieldSpacecraftState<W> state, FieldAbsoluteDate<W> targetDate) Check if propagation is forward or not.protected abstract Dcreate(FieldEventDetectionSettings<T> detectionSettings, FieldEventHandler<T> newHandler) Build a new instance.Getter for the settings.Get the event function.Get the handler.voidinit(FieldSpacecraftState<T> s0, FieldAbsoluteDate<T> t) Initialize event detector at the start of a propagation.booleanCheck if the current propagation is forward or backward.toEventDetector(EventHandler eventHandler) Build non-Field instance.withDetectionSettings(FieldEventDetectionSettings<T> newSettings) Set up the event detection settings.withHandler(FieldEventHandler<T> newHandler) Set up the event handler to call at event occurrences.withMaxCheck(double newMaxCheck) Set up the maximum checking interval.withMaxCheck(FieldAdaptableInterval<T> newMaxCheck) Set up the maximum checking interval.withMaxIter(int newMaxIter) Set up the maximum number of iterations in the event time search.withThreshold(T newThreshold) Set up the convergence threshold.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.orekit.propagation.events.FieldEventDetector
finish, g, getMaxCheckInterval, getMaxIterationCount, getThreshold, reset
-
Field Details
-
DEFAULT_MAX_CHECK
public static final double DEFAULT_MAX_CHECKDefault maximum checking interval (s).- See Also:
-
DEFAULT_THRESHOLD
public static final double DEFAULT_THRESHOLDDefault convergence threshold (s).- See Also:
-
DEFAULT_MAX_ITER
public static final int DEFAULT_MAX_ITERDefault maximum number of iterations in the event time search.- See Also:
-
-
Constructor Details
-
FieldAbstractDetector
protected FieldAbstractDetector(EventFunction eventFunction, FieldEventDetectionSettings<T> detectionSettings, FieldEventHandler<T> handler) Build a new instance with an event function.- Parameters:
eventFunction- event functiondetectionSettings- event detection settingshandler- event handler to call at event occurrences- Since:
- 14.0
-
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 Details
-
checkIfForward
public static <W extends CalculusFieldElement<W>> boolean checkIfForward(FieldSpacecraftState<W> state, FieldAbsoluteDate<W> targetDate) Check if propagation is forward or not.- Type Parameters:
W- field type- Parameters:
state- initial statetargetDate- target propagation date- Returns:
- forward flag
- Since:
- 13.0
-
getEventFunction
Description copied from interface:FieldEventDetectorGet the event function. It defines g both for double and Field.- Specified by:
getEventFunctionin interfaceFieldEventDetector<D extends FieldAbstractDetector<D,T>> - Returns:
- event function
-
init
Initialize event detector at the start of a propagation.This method is called once at the start of the propagation. It may be used by the event detector to initialize some internal data if needed.
The default implementation initializes the handler.
- Specified by:
initin interfaceFieldEventDetector<D extends FieldAbstractDetector<D,T>> - Parameters:
s0- initial statet- target time for the integration
-
getDetectionSettings
Getter for the settings.- Specified by:
getDetectionSettingsin interfaceFieldEventDetector<D extends FieldAbstractDetector<D,T>> - Returns:
- detection settings
-
withMaxCheck
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
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
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
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
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
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
Get the handler.- Specified by:
getHandlerin interfaceFieldEventDetector<D extends FieldAbstractDetector<D,T>> - Returns:
- event handler to call at event occurrences
-
create
protected abstract 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
-
toEventDetector
Build non-Field instance.- Parameters:
eventHandler- event handler- Returns:
- event detector
- Since:
- 14.0
-