public class EclipseDetector extends AbstractDetector<EclipseDetector>
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.
Propagator.addEventDetector(EventDetector)
DEFAULT_MAX_ITER, DEFAULT_MAXCHECK, DEFAULT_THRESHOLD
Constructor and Description |
---|
EclipseDetector(PVCoordinatesProvider occulted,
double occultedRadius,
OneAxisEllipsoid occulting)
Build a new eclipse detector.
|
Modifier and Type | Method and 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.
|
eventOccurred, getHandler, getMaxCheckInterval, getMaxIterationCount, getThreshold, init, isForward, resetState, withHandler, withMaxCheck, withMaxIter, withThreshold
public EclipseDetector(PVCoordinatesProvider occulted, double occultedRadius, OneAxisEllipsoid occulting)
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
).
occulted
- the body to be occultedoccultedRadius
- the radius of the body to be occulted (m)occulting
- the occulting bodyprotected EclipseDetector create(double newMaxCheck, double newThreshold, int nawMaxIter, EventHandler<? super EclipseDetector> newHandler)
create
in class AbstractDetector<EclipseDetector>
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 occurrencespublic EclipseDetector withUmbra()
This will override a penumbra/umbra flag if it has been configured previously.
withPenumbra()
public EclipseDetector withPenumbra()
This will override a penumbra/umbra flag if it has been configured previously.
withUmbra()
public OneAxisEllipsoid getOcculting()
public PVCoordinatesProvider getOcculted()
public double getOccultedRadius()
public boolean getTotalEclipse()
public double g(SpacecraftState s)
g
in interface EventDetector
g
in class AbstractDetector<EclipseDetector>
s
- the current state information: date, kinematics, attitudeCopyright © 2002-2022 CS GROUP. All rights reserved.