public class EclipseDetector extends AbstractDetector
This class finds eclipse events, i.e. satellite within umbra (total eclipse) or penumbra (partial eclipse).
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 using the following constructors:
Propagator.addEventDetector(EventDetector)
,
Serialized FormEventDetector.Action
Modifier and Type | Field and Description |
---|---|
static int |
ENTRY
Flag for eclipse entry detection (slopeSelection = 1).
|
static int |
ENTRY_EXIT
Flag for eclipse entry/exit detection (slopeSelection = 2).
|
static int |
EXIT
Flag for eclipse exit detection (slopeSelection = 0).
|
DEFAULT_MAXCHECK, DEFAULT_THRESHOLD
DECREASING, INCREASING, INCREASING_DECREASING
Constructor and Description |
---|
EclipseDetector(IDirection occulted,
PVCoordinatesProvider occulting,
double occultingRadius,
double maxCheck,
double threshold)
Build a new eclipse detector.
|
EclipseDetector(IDirection occulted,
PVCoordinatesProvider occulting,
double occultingRadius,
double maxCheck,
double threshold,
EventDetector.Action entry,
EventDetector.Action exit)
Build a new eclipse detector with defined actions when entering and exiting the eclipse.
|
EclipseDetector(IDirection occulted,
PVCoordinatesProvider occulting,
double occultingRadius,
double maxCheck,
double threshold,
EventDetector.Action entry,
EventDetector.Action exit,
boolean removeEntry,
boolean removeExit)
Build a new eclipse detector with defined actions when entering and exiting the eclipse.
|
EclipseDetector(PVCoordinatesProvider occulted,
double occultedRadiusIn,
GeometricBodyShape occultingBodyIn,
double lightingRatio,
double maxCheck,
double threshold)
Build a new eclipse detector based on a lighting ratio.
|
EclipseDetector(PVCoordinatesProvider occulted,
double occultedRadiusIn,
GeometricBodyShape occultingBodyIn,
double lightingRatio,
double maxCheck,
double threshold,
EventDetector.Action entry,
EventDetector.Action exit)
Build a new eclipse detector based on a lighting ratio.
|
EclipseDetector(PVCoordinatesProvider occulted,
double occultedRadiusIn,
GeometricBodyShape occultingBodyIn,
double lightingRatio,
double maxCheck,
double threshold,
EventDetector.Action entry,
EventDetector.Action exit,
boolean removeEntry,
boolean removeExit)
Build a new eclipse detector based on a lighting ratio.
|
EclipseDetector(PVCoordinatesProvider occulted,
double occultedRadiusIn,
PVCoordinatesProvider occulting,
double occultingRadius,
double lightingRatio,
double maxCheck,
double threshold)
Build a new eclipse detector based on a lighting ratio.
|
EclipseDetector(PVCoordinatesProvider occulted,
double occultedRadiusIn,
PVCoordinatesProvider occulting,
double occultingRadius,
double lightingRatio,
double maxCheck,
double threshold,
EventDetector.Action entry,
EventDetector.Action exit)
Build a new eclipse detector based on a lighting ratio.
|
EclipseDetector(PVCoordinatesProvider occulted,
double occultedRadiusIn,
PVCoordinatesProvider occulting,
double occultingRadius,
double lightingRatio,
double maxCheck,
double threshold,
EventDetector.Action entry,
EventDetector.Action exit,
boolean removeEntry,
boolean removeExit)
Build a new eclipse detector based on a lighting ratio.
|
EclipseDetector(PVCoordinatesProvider occulted,
double occultedRadiusIn,
PVCoordinatesProvider occulting,
double occultingRadius,
double lightingRatio,
int slopeSelection,
double maxCheck,
double threshold,
EventDetector.Action action,
boolean remove)
Constructor with slope selection.
|
Modifier and Type | Method and Description |
---|---|
EventDetector |
copy()
A copy of the detector.
|
EventDetector.Action |
eventOccurred(SpacecraftState s,
boolean increasing,
boolean forward)
Handle an eclipse event and choose what to do next.
|
double |
g(SpacecraftState s)
Compute the value of the switching function.
|
EventDetector.Action |
getActionAtEntry()
Returns action at entry detection.
|
EventDetector.Action |
getActionAtExit()
Returns action at exit detection.
|
PVCoordinatesProvider |
getOcculted()
Get the occulted body.
|
IDirection |
getOccultedDirection()
Returns the occulted body direction.
|
double |
getOccultedRadius()
Get the occulted body radius (m).
|
PVCoordinatesProvider |
getOcculting()
Get the occulting body.
|
LocalRadiusProvider |
getOccultingRadiusProvider()
Returns the occulting radius provider.
|
boolean |
isTotalEclipse()
Get the total eclipse detection flag.
|
boolean |
removeAtEntry()
Returns true if detection is removed after entry detection.
|
boolean |
removeAtExit()
Returns true if detection is removed after exit detection.
|
boolean |
shouldBeRemoved()
This method is called after
EventDetector.eventOccurred(fr.cnes.sirius.patrius.propagation.SpacecraftState, boolean, boolean) has been triggered. |
getMaxCheckInterval, getMaxIterationCount, getSlopeSelection, getThreshold, init, resetState
public static final int EXIT
public static final int ENTRY
public static final int ENTRY_EXIT
public EclipseDetector(IDirection occulted, PVCoordinatesProvider occulting, double occultingRadius, double maxCheck, double threshold)
The occulting body is a sphere and the occulted body is a direction; the concept of umbra/penumbra does not apply to this detector.
The default implementation behavior is to continue
propagation when
entering the eclipse and to stop
propagation when exiting the eclipse.
occulted
- the direction to be occultedocculting
- the occulting bodyoccultingRadius
- the occulting body radius (m)maxCheck
- maximal checking interval (s)threshold
- convergence threshold (s)public EclipseDetector(IDirection occulted, PVCoordinatesProvider occulting, double occultingRadius, double maxCheck, double threshold, EventDetector.Action entry, EventDetector.Action exit)
The occulting body is a sphere and the occulted body is a direction; the concept of umbra/penumbra does not apply to this detector.
occulted
- the direction to be occultedocculting
- the occulting bodyoccultingRadius
- the occulting body radius (m)maxCheck
- maximal checking interval (s)threshold
- convergence threshold (s)entry
- action performed when entering the eclipseexit
- action performed when exiting the eclipsepublic EclipseDetector(IDirection occulted, PVCoordinatesProvider occulting, double occultingRadius, double maxCheck, double threshold, EventDetector.Action entry, EventDetector.Action exit, boolean removeEntry, boolean removeExit)
The occulting body is a sphere and the occulted body is a direction; the concept of umbra/penumbra does not apply to this detector.
occulted
- the direction to be occultedocculting
- the occulting bodyoccultingRadius
- the occulting body radius (m)maxCheck
- maximal checking interval (s)threshold
- convergence threshold (s)entry
- action performed when entering the eclipseexit
- action performed when exiting the eclipseremoveEntry
- when the spacecraft point enters the zone.removeExit
- when the spacecraft point leaves the zone.public EclipseDetector(PVCoordinatesProvider occulted, double occultedRadiusIn, PVCoordinatesProvider occulting, double occultingRadius, double lightingRatio, double maxCheck, double threshold)
The lighting ratio, whose value is between 0 and 1, establishes when an eclipse event should be triggered. If 0,
an event is detected only when the occulted body is completely hidden (equivalent to an umbra detector), if 1, an
event is detected every time the occulted body is just partially hidden (equivalent to a penumbra detector).
As a general rule, the lighting ratio is equal to 1 - the ratio between the hidden apparent area of the occulted
body and its total apparent area.
The default implementation behavior is to continue
propagation when
entering the eclipse and to stop
propagation when exiting the eclipse.
occulted
- the occulted bodyoccultedRadiusIn
- the occulted body radius (m)occulting
- the occulting bodyoccultingRadius
- the occulting body radius (m)lightingRatio
- the lighting ratio: 0 when total eclipse events should be detected, 1
for penumbra events.maxCheck
- maximal checking interval (s)threshold
- convergence threshold (s)public EclipseDetector(PVCoordinatesProvider occulted, double occultedRadiusIn, PVCoordinatesProvider occulting, double occultingRadius, double lightingRatio, double maxCheck, double threshold, EventDetector.Action entry, EventDetector.Action exit)
The lighting ratio, whose value is between 0 and 1, establishes when an eclipse event should be triggered. If 0,
an event is detected only when the occulted body is completely hidden (equivalent to an umbra detector), if 1, an
event is detected every time the occulted body is just partially hidden (equivalent to a penumbra detector).
As a general rule, the lighting ratio is equal to 1 - the ratio between the hidden apparent area of the occulted
body and its total apparent area.
occulted
- the occulted bodyoccultedRadiusIn
- the occulted body radius (m)occulting
- the occulting bodyoccultingRadius
- the occulting body radius (m)lightingRatio
- the lighting ratio: 0 when total eclipse events should be detected, 1
for penumbra events.maxCheck
- maximal checking interval (s)threshold
- convergence threshold (s)entry
- action performed when entering the eclipseexit
- action performed when exiting the eclipsepublic EclipseDetector(PVCoordinatesProvider occulted, double occultedRadiusIn, PVCoordinatesProvider occulting, double occultingRadius, double lightingRatio, double maxCheck, double threshold, EventDetector.Action entry, EventDetector.Action exit, boolean removeEntry, boolean removeExit)
The lighting ratio, whose value is between 0 and 1, establishes when an eclipse event should be triggered. If 0,
an event is detected only when the occulted body is completely hidden (equivalent to an umbra detector), if 1, an
event is detected every time the occulted body is just partially hidden (equivalent to a penumbra detector).
As a general rule, the lighting ratio is equal to 1 - the ratio between the hidden apparent area of the occulted
body and its total apparent area.
occulted
- the occulted bodyoccultedRadiusIn
- the occulted body radius (m)occulting
- the occulting bodyoccultingRadius
- the occulting body radius (m)lightingRatio
- the lighting ratio: 0 when total eclipse events should be detected, 1
for penumbra events.maxCheck
- maximal checking interval (s)threshold
- convergence threshold (s)entry
- action performed when entering the eclipseexit
- action performed when exiting the eclipseremoveEntry
- when the spacecraft point enters the zone.removeExit
- when the spacecraft point leaves the zone.public EclipseDetector(PVCoordinatesProvider occulted, double occultedRadiusIn, GeometricBodyShape occultingBodyIn, double lightingRatio, double maxCheck, double threshold)
GeometricBodyShape
.
The lighting ratio, whose value is between 0 and 1, establishes when an eclipse event should be triggered. If 0,
an event is detected only when the occulted body is completely hidden (equivalent to an umbra detector), if 1, an
event is detected every time the occulted body is just partially hidden (equivalent to a penumbra detector).
As a general rule, the lighting ratio is equal to 1 - the ratio between the hidden apparent area of the occulted
body and its total apparent area.
The default implementation behavior is to continue
propagation when
entering the eclipse and to stop
propagation when exiting the eclipse.
occulted
- the occulted bodyoccultedRadiusIn
- the occulted body radius (m)occultingBodyIn
- the occulting bodylightingRatio
- the lighting ratio: 0 when total eclipse events should be detected, 1
for penumbra events.maxCheck
- maximal checking interval (s)threshold
- convergence threshold (s)public EclipseDetector(PVCoordinatesProvider occulted, double occultedRadiusIn, GeometricBodyShape occultingBodyIn, double lightingRatio, double maxCheck, double threshold, EventDetector.Action entry, EventDetector.Action exit)
GeometricBodyShape
.
The lighting ratio, whose value is between 0 and 1, establishes when an eclipse event should be triggered. If 0,
an event is detected only when the occulted body is completely hidden (equivalent to an umbra detector), if 1, an
event is detected every time the occulted body is just partially hidden (equivalent to a penumbra detector).
As a general rule, the lighting ratio is equal to 1 - the ratio between the hidden apparent area of the occulted
body and its total apparent area.
occulted
- the occulted bodyoccultedRadiusIn
- the occulted body radius (m)occultingBodyIn
- the occulting bodylightingRatio
- the lighting ratio: 0 when total eclipse events should be detected, 1
for penumbra events.maxCheck
- maximal checking interval (s)threshold
- convergence threshold (s)entry
- action performed when entering the eclipseexit
- action performed when exiting the eclipsepublic EclipseDetector(PVCoordinatesProvider occulted, double occultedRadiusIn, GeometricBodyShape occultingBodyIn, double lightingRatio, double maxCheck, double threshold, EventDetector.Action entry, EventDetector.Action exit, boolean removeEntry, boolean removeExit)
GeometricBodyShape
.
The lighting ratio, whose value is between 0 and 1, establishes when an eclipse event should be triggered. If 0,
an event is detected only when the occulted body is completely hidden (equivalent to an umbra detector), if 1, an
event is detected every time the occulted body is just partially hidden (equivalent to a penumbra detector).
As a general rule, the lighting ratio is equal to 1 - the ratio between the hidden apparent area of the occulted
body and its total apparent area.
occulted
- the occulted bodyoccultedRadiusIn
- the occulted body radius (m)occultingBodyIn
- the occulting bodylightingRatio
- the lighting ratio: 0 when total eclipse events should be detected, 1
for penumbra events.maxCheck
- maximal checking interval (s)threshold
- convergence threshold (s)entry
- action performed when entering the eclipseexit
- action performed when exiting the eclipseremoveEntry
- when the spacecraft point enters the zone.removeExit
- when the spacecraft point leaves the zone.public EclipseDetector(PVCoordinatesProvider occulted, double occultedRadiusIn, PVCoordinatesProvider occulting, double occultingRadius, double lightingRatio, int slopeSelection, double maxCheck, double threshold, EventDetector.Action action, boolean remove) throws ArithmeticException
occulted
- the occulted bodyoccultedRadiusIn
- the occulted body radius (m)occulting
- the occulting bodyoccultingRadius
- the occulting body radius (m)lightingRatio
- the lighting ratio: 0 when total eclipse events should be detected, 1
for penumbra events.maxCheck
- maximal checking interval (s)threshold
- convergence threshold (s)slopeSelection
- slope selectionaction
- action performed when entering/exiting the eclipse depending on slope selectionremove
- when the spacecraft point enters or exit the zone depending on slope selectionArithmeticException
- if occultingBodyRadius is NaN.public PVCoordinatesProvider getOcculting()
public PVCoordinatesProvider getOcculted()
public double getOccultedRadius()
public IDirection getOccultedDirection()
public LocalRadiusProvider getOccultingRadiusProvider()
public boolean isTotalEclipse()
public EventDetector.Action eventOccurred(SpacecraftState s, boolean increasing, boolean forward) throws PatriusException
eventOccurred
in interface EventDetector
eventOccurred
in class AbstractDetector
s
- the current state information : date, kinematics, attitudeincreasing
- if true, the value of the switching function increases when times increases
around eventforward
- if true, the integration variable (time) increases during integration.PatriusException
- if some specific error occurspublic boolean shouldBeRemoved()
EventDetector.eventOccurred(fr.cnes.sirius.patrius.propagation.SpacecraftState, boolean, boolean)
has been triggered. It returns true if the
current detector should be removed after first event detection. WARNING: this method
can be called only once a event has been triggered. Before, the value is not available.shouldBeRemoved
in interface EventDetector
shouldBeRemoved
in class AbstractDetector
public double g(SpacecraftState s) throws PatriusException
g
in interface EventDetector
g
in class AbstractDetector
s
- the current state information: date, kinematics, attitudePatriusException
- if some specific error occurspublic EventDetector copy()
The following attributes are not deeply copied:
PVCoordinatesProvider
PVCoordinatesProvider
LocalRadiusProvider
public EventDetector.Action getActionAtEntry()
public EventDetector.Action getActionAtExit()
public boolean removeAtEntry()
public boolean removeAtExit()
Copyright © 2019 CNES. All rights reserved.