Class FieldRelativeDistanceDetector<T extends CalculusFieldElement<T>>
- java.lang.Object
-
- org.orekit.propagation.events.FieldAbstractDetector<FieldRelativeDistanceDetector<T>,T>
-
- org.orekit.propagation.events.FieldRelativeDistanceDetector<T>
-
- All Implemented Interfaces:
FieldEventDetector<T>
public class FieldRelativeDistanceDetector<T extends CalculusFieldElement<T>> extends FieldAbstractDetector<FieldRelativeDistanceDetector<T>,T>
Detector of specific value for the distance relative to another trajectory (using the Euclidean norm).The default implementation behavior is to
stop
propagation. This can be changed by callingFieldAbstractDetector.withHandler(org.orekit.propagation.events.handlers.FieldEventHandler)
after construction.As this detector needs two objects (moving relative to each other), it embeds one
coordinates provider
for the secondary object and is registered as an event detector in the propagator of the primary object. The secondary objectcoordinates provider
will therefore be driven by this detector (and hence by the propagator in which this detector is registered).For efficiency reason during the event search loop, it is recommended to have the secondary provider be an analytical propagator or an ephemeris. A numerical propagator as a secondary propagator works but is expected to be computationally costly.
- Since:
- 12.1
- Author:
- Romain Serra
- See Also:
FieldPropagator.addEventDetector(FieldEventDetector)
-
-
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
FieldRelativeDistanceDetector(FieldAdaptableInterval<T> maxCheck, T threshold, int maxIter, FieldEventHandler<T> handler, FieldPVCoordinatesProvider<T> secondaryPVProvider, T distanceThreshold)
Constructor.FieldRelativeDistanceDetector(FieldPVCoordinatesProvider<T> secondaryPVProvider, T distanceThreshold)
Constructor with default values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected FieldRelativeDistanceDetector<T>
create(FieldAdaptableInterval<T> newMaxCheck, T newThreshold, int newMaxIter, FieldEventHandler<T> newHandler)
Build a new instance.T
g(FieldSpacecraftState<T> s)
Theg
is positive when the relative distance is larger or equal than the threshold, non-positive otherwise.T
getDistanceThreshold()
Get the relative distance threshold.FieldPVCoordinatesProvider<T>
getSecondaryPVProvider()
Get the secondary position-velocity provider stored in this instance.-
Methods inherited from class org.orekit.propagation.events.FieldAbstractDetector
getHandler, getMaxCheckInterval, getMaxIterationCount, getThreshold, init, isForward, withHandler, withMaxCheck, withMaxCheck, withMaxIter, withThreshold
-
-
-
-
Constructor Detail
-
FieldRelativeDistanceDetector
public FieldRelativeDistanceDetector(FieldPVCoordinatesProvider<T> secondaryPVProvider, T distanceThreshold)
Constructor with default values.By default, the implemented behavior is to
stop
propagation at detection.- Parameters:
secondaryPVProvider
- PVCoordinates provider of the other object defining relative distance.distanceThreshold
- Relative distance threshold for event detection
-
FieldRelativeDistanceDetector
protected FieldRelativeDistanceDetector(FieldAdaptableInterval<T> maxCheck, T threshold, int maxIter, FieldEventHandler<T> handler, FieldPVCoordinatesProvider<T> secondaryPVProvider, T distanceThreshold)
Constructor.This constructor is to be used if the user wants to change the default behavior of the detector.
- Parameters:
maxCheck
- Maximum checking interval.threshold
- Convergence threshold (s).maxIter
- Maximum number of iterations in the event time search.handler
- Event handler to call at event occurrences.secondaryPVProvider
- PVCoordinates provider of the other object defining relative distance.distanceThreshold
- Relative distance threshold for event detection- See Also:
FieldEventHandler
-
-
Method Detail
-
g
public T g(FieldSpacecraftState<T> s)
Theg
is positive when the relative distance is larger or equal than the threshold, non-positive otherwise.- Specified by:
g
in interfaceFieldEventDetector<T extends CalculusFieldElement<T>>
- Specified by:
g
in classFieldAbstractDetector<FieldRelativeDistanceDetector<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 FieldRelativeDistanceDetector<T> create(FieldAdaptableInterval<T> newMaxCheck, T newThreshold, int newMaxIter, FieldEventHandler<T> newHandler)
Build a new instance.- Specified by:
create
in classFieldAbstractDetector<FieldRelativeDistanceDetector<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
-
getSecondaryPVProvider
public FieldPVCoordinatesProvider<T> getSecondaryPVProvider()
Get the secondary position-velocity provider stored in this instance.- Returns:
- the secondary position-velocity provider stored in this instance
-
getDistanceThreshold
public T getDistanceThreshold()
Get the relative distance threshold.- Returns:
- threshold triggering detection
-
-