Class ExtremumApproachDetector
- All Implemented Interfaces:
EventDetector
This class finds extremum approach events (i.e. closest or farthest approach).
The default implementation behavior is to continue propagation at farthest approach and to
stop propagation at closest approach. This can be changed by calling
AbstractDetector.withHandler(EventHandler) after construction (go to the end of the documentation to see an example).
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 object coordinates provider will
therefore be driven by this detector (and hence by the propagator in which this detector is registered).
In order to avoid infinite recursion, care must be taken to have the secondary object provider being completely
independent from anything else. In particular, if the provider is a propagator, it should not be run
together in a propagators parallelizer with the propagator this detector is
registered in. It is fine however to configure two separate propagators PsA and PsB with similar settings for the
secondary object and one propagator Pm for the primary object and then use Psa in this detector registered within Pm
while Pm and Psb are run in the context of a propagators parallelizer.
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.
Also, it is possible to detect solely one type of event using an event slope filter. For
example in order to only detect closest approach, one should type the following :
ExtremumApproachDetector extremumApproachDetector = new ExtremumApproachDetector(secondaryPVProvider);
EventDetector closeApproachDetector = new EventSlopeFilter<ExtremumApproachDetector>(extremumApproachDetector,FilterType.TRIGGER_ONLY_INCREASING_EVENTS);
- Since:
- 11.3
- Author:
- Vincent Cucchietti
- See Also:
-
Field Summary
Fields inherited from class org.orekit.propagation.events.AbstractDetector
DEFAULT_MAX_CHECK, DEFAULT_MAX_ITER, DEFAULT_THRESHOLD -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedExtremumApproachDetector(EventDetectionSettings detectionSettings, EventHandler handler, PVCoordinatesProvider secondaryPVProvider) Constructor.ExtremumApproachDetector(PVCoordinatesProvider secondaryPVProvider) Constructor with default values. -
Method Summary
Modifier and TypeMethodDescriptionCompute the relative PV between primary and secondary objects.protected ExtremumApproachDetectorcreate(EventDetectionSettings detectionSettings, EventHandler newHandler) Build a new instance.doubleg(SpacecraftState s) Thegis positive when the primary object is getting further away from the secondary object and is negative when it is getting closer to it.Get the secondary position-velocity provider stored in this instance.Methods inherited from class org.orekit.propagation.events.AbstractDetector
checkIfForward, getDetectionSettings, getEventFunction, getHandler, init, isForward, withDetectionSettings, withHandler, withMaxCheck, withMaxCheck, withMaxIter, withThresholdMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.orekit.propagation.events.EventDetector
finish, getMaxCheckInterval, getMaxIterationCount, getThreshold, reset
-
Constructor Details
-
ExtremumApproachDetector
Constructor with default values.By default, the implemented behavior is to
continuepropagation at farthest approach and tostoppropagation at closest approach.- Parameters:
secondaryPVProvider- PVCoordinates provider of the other object with which we want to find out the extremum approach.
-
ExtremumApproachDetector
protected ExtremumApproachDetector(EventDetectionSettings detectionSettings, EventHandler handler, PVCoordinatesProvider secondaryPVProvider) Constructor.This constructor is to be used if the user wants to change the default behavior of the detector.
- Parameters:
detectionSettings- Detection settings.handler- Event handler to call at event occurrences.secondaryPVProvider- PVCoordinates provider of the other object with which we want to find out the extremum approach.- Since:
- 13.0
- See Also:
-
-
Method Details
-
g
Thegis positive when the primary object is getting further away from the secondary object and is negative when it is getting closer to it.- Parameters:
s- the current state information: date, kinematics, attitude- Returns:
- value of the switching function
-
computeDeltaPV
Compute the relative PV between primary and secondary objects.- Parameters:
s- Spacecraft state.- Returns:
- Relative position between primary (=s) and secondaryPVProvider.
-
create
protected ExtremumApproachDetector create(EventDetectionSettings detectionSettings, EventHandler newHandler) Build a new instance.- Specified by:
createin classAbstractDetector<ExtremumApproachDetector>- Parameters:
detectionSettings- detection settingsnewHandler- event handler to call at event occurrences- Returns:
- a new instance of the appropriate sub-type
-
getSecondaryPVProvider
Get the secondary position-velocity provider stored in this instance.- Returns:
- the secondary position-velocity provider stored in this instance
-