Class EclipseDetector
- java.lang.Object
-
- org.orekit.propagation.events.AbstractDetector<EclipseDetector>
-
- org.orekit.propagation.events.EclipseDetector
-
- All Implemented Interfaces:
EventDetector
public class EclipseDetector extends AbstractDetector<EclipseDetector>
Finder for satellite eclipse related events.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()
orwithPenumbra()
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 tostop
propagation when exiting the eclipse.
This can be changed by callingAbstractDetector.withHandler(EventHandler)
after construction.- Author:
- Pascal Parraud, Luc Maisonobe
- See Also:
Propagator.addEventDetector(EventDetector)
-
-
Field Summary
-
Fields inherited from class org.orekit.propagation.events.AbstractDetector
DEFAULT_MAX_ITER, DEFAULT_MAXCHECK, DEFAULT_THRESHOLD
-
-
Constructor Summary
Constructors Constructor Description EclipseDetector(PVCoordinatesProvider occulted, double occultedRadius, OneAxisEllipsoid occulting)
Build a new eclipse detector.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected EclipseDetector
create(double newMaxCheck, double newThreshold, int nawMaxIter, EventHandler<? super EclipseDetector> newHandler)
Build a new instance.double
g(SpacecraftState s)
Compute the value of the switching function.PVCoordinatesProvider
getOcculted()
Getter for the occulted body.double
getOccultedRadius()
Getter for the occultedRadius.OneAxisEllipsoid
getOcculting()
Getter for the occulting body.boolean
getTotalEclipse()
Get the total eclipse detection flag.EclipseDetector
withPenumbra()
Setup the detector to penumbra detection.EclipseDetector
withUmbra()
Setup the detector to full umbra detection.-
Methods inherited from class org.orekit.propagation.events.AbstractDetector
eventOccurred, getHandler, getMaxCheckInterval, getMaxIterationCount, getThreshold, init, isForward, resetState, withHandler, withMaxCheck, withMaxIter, withThreshold
-
-
-
-
Constructor Detail
-
EclipseDetector
public EclipseDetector(PVCoordinatesProvider 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_MAXCHECK
) 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:
- 10.0
-
-
Method Detail
-
create
protected EclipseDetector create(double newMaxCheck, double newThreshold, int nawMaxIter, EventHandler<? super EclipseDetector> newHandler)
Build a new instance.- Specified by:
create
in classAbstractDetector<EclipseDetector>
- Parameters:
newMaxCheck
- maximum checking interval (s)newThreshold
- convergence threshold (s)nawMaxIter
- 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
-
withUmbra
public EclipseDetector 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()
-
withPenumbra
public EclipseDetector 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:
withUmbra()
-
getOcculting
public OneAxisEllipsoid getOcculting()
Getter for the occulting body.- Returns:
- the occulting body
-
getOcculted
public PVCoordinatesProvider getOcculted()
Getter for the occulted body.- Returns:
- the occulted body
-
getOccultedRadius
public double getOccultedRadius()
Getter for the occultedRadius.- Returns:
- the occultedRadius
-
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
public double g(SpacecraftState s)
Compute the value of the switching function. This function becomes negative when entering the region of shadow and positive when exiting.- Specified by:
g
in interfaceEventDetector
- Specified by:
g
in classAbstractDetector<EclipseDetector>
- Parameters:
s
- the current state information: date, kinematics, attitude- Returns:
- value of the switching function
-
-