Class EclipseDetector
- All Implemented Interfaces:
EventDetector
This class finds eclipse events, i.e. satellite within umbra (total eclipse) or penumbra (partial eclipse).
The occulted body is given through a PVCoordinatesProvider and its radius in meters. It is modeled as a sphere.
Since v10.0 the occulting body is a OneAxisEllipsoid, before it was modeled as a sphere.
It was changed to precisely model Solar eclipses by the Earth, especially for Low Earth Orbits.
If you want eclipses by a spherical occulting body, set its flattening to 0. when defining its OneAxisEllipsoid model..
The withUmbra() or withPenumbra() methods will tell you if the event is triggered when complete umbra/lighting
is achieved or when entering/living the penumbra zone.
The default behavior is detecting complete umbra/lighting events.
If you want to have both, you'll need to set up two distinct detectors.
The default implementation behavior is to continue
propagation when entering the eclipse and to stop propagation
when exiting the eclipse.
This can be changed by calling AbstractDetector.withHandler(EventHandler) after construction.
- Author:
- Pascal Parraud, Luc Maisonobe
- See Also:
-
Field Summary
Fields inherited from class org.orekit.propagation.events.AbstractDetector
DEFAULT_MAX_CHECK, DEFAULT_MAX_ITER, DEFAULT_THRESHOLD -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedEclipseDetector(EventDetectionSettings detectionSettings, EventHandler handler, OccultationEngine occultationEngine, double margin, boolean totalEclipse) Protected constructor with full parameters.EclipseDetector(ExtendedPositionProvider occulted, double occultedRadius, OneAxisEllipsoid occulting) Build a new eclipse detector.EclipseDetector(OccultationEngine occultationEngine) Build a new eclipse detector. -
Method Summary
Modifier and TypeMethodDescriptionprotected EclipseDetectorcreate(EventDetectionSettings detectionSettings, EventHandler newHandler) Build a new instance.doubleg(SpacecraftState s) Compute the value of the switching function.doubleGet the angular margin used for eclipse detection.Get the occultation engine.booleanGet the total eclipse detection flag.withMargin(double newMargin) Setup a margin to angle detection.Setup the detector to penumbra detection.Setup the detector to full umbra detection.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
-
EclipseDetector
public EclipseDetector(ExtendedPositionProvider occulted, double occultedRadius, OneAxisEllipsoid occulting) Build a new eclipse detector.The new instance is a total eclipse (umbra) detector with default values for maximal checking interval (
AbstractDetector.DEFAULT_MAX_CHECK) and convergence threshold (AbstractDetector.DEFAULT_THRESHOLD).- Parameters:
occulted- the body to be occultedoccultedRadius- the radius of the body to be occulted (m)occulting- the occulting body- Since:
- 12.0
-
EclipseDetector
Build a new eclipse detector.The new instance is a total eclipse (umbra) detector with default values for maximal checking interval (
AbstractDetector.DEFAULT_MAX_CHECK) and convergence threshold (AbstractDetector.DEFAULT_THRESHOLD).- Parameters:
occultationEngine- occultation engine- Since:
- 12.0
-
EclipseDetector
protected EclipseDetector(EventDetectionSettings detectionSettings, EventHandler handler, OccultationEngine occultationEngine, double margin, boolean totalEclipse) Protected constructor with full parameters.This constructor is not public as users are expected to use the builder API with the various
withXxx()methods to set up the instance in a readable manner without using a huge amount of parameters.- Parameters:
detectionSettings- detection settingshandler- event handler to call at event occurrencesoccultationEngine- occultation enginemargin- to apply to eclipse angle (rad)totalEclipse- umbra (true) or penumbra (false) detection flag- Since:
- 12.2
-
-
Method Details
-
create
Build a new instance.- Specified by:
createin classAbstractDetector<EclipseDetector>- Parameters:
detectionSettings- detection settingsnewHandler- event handler to call at event occurrences- Returns:
- a new instance of the appropriate sub-type
-
withUmbra
Setup the detector to full umbra detection.This will override a penumbra/umbra flag if it has been configured previously.
- Returns:
- a new detector with updated configuration (the instance is not changed)
- Since:
- 6.1
- See Also:
-
withPenumbra
Setup the detector to penumbra detection.This will override a penumbra/umbra flag if it has been configured previously.
- Returns:
- a new detector with updated configuration (the instance is not changed)
- Since:
- 6.1
- See Also:
-
withMargin
Setup a margin to angle detection.A positive margin implies eclipses are "larger" hence entry occurs earlier and exit occurs later than a detector with 0 margin.
- Parameters:
newMargin- angular margin to apply to eclipse detection (rad)- Returns:
- a new detector with updated configuration (the instance is not changed)
- Since:
- 12.0
-
getMargin
public double getMargin()Get the angular margin used for eclipse detection.- Returns:
- angular margin used for eclipse detection (rad)
- Since:
- 12.0
-
getOccultationEngine
Get the occultation engine.- Returns:
- occultation engine
- Since:
- 12.0
-
getTotalEclipse
public boolean getTotalEclipse()Get the total eclipse detection flag.- Returns:
- the total eclipse detection flag (true for umbra events detection, false for penumbra events detection)
-
g
Description copied from interface:EventDetectorCompute the value of the switching function. This function must be continuous (at least in its roots neighborhood), as the integrator will need to find its roots to locate the events.- Parameters:
s- the current state information: date, kinematics, attitude- Returns:
- value of the switching function
-