Class FieldEclipseDetector<T extends CalculusFieldElement<T>>
- java.lang.Object
-
- org.orekit.propagation.events.FieldAbstractDetector<FieldEclipseDetector<T>,T>
-
- org.orekit.propagation.events.FieldEclipseDetector<T>
-
- Type Parameters:
T
- the type of the field elements
- All Implemented Interfaces:
FieldEventDetector<T>
public class FieldEclipseDetector<T extends CalculusFieldElement<T>> extends FieldAbstractDetector<FieldEclipseDetector<T>,T>
Finder for satellite eclipse related events.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 tostop
propagation when exiting the eclipse. This can be changed by callingFieldAbstractDetector.withHandler(FieldEventHandler)
after construction.- Author:
- Pascal Parraud
- See Also:
FieldPropagator.addEventDetector(FieldEventDetector)
-
-
Field Summary
-
Fields inherited from class org.orekit.propagation.events.FieldAbstractDetector
DEFAULT_MAX_ITER, DEFAULT_MAXCHECK, DEFAULT_THRESHOLD
-
-
Constructor Summary
Constructors Modifier Constructor Description FieldEclipseDetector(Field<T> field, ExtendedPositionProvider occulted, double occultedRadius, OneAxisEllipsoid occulting)
Build a new eclipse detector.FieldEclipseDetector(Field<T> field, OccultationEngine occultationEngine)
Build a new eclipse detector.protected
FieldEclipseDetector(FieldEventDetectionSettings<T> detectionSettings, FieldEventHandler<T> handler, OccultationEngine occultationEngine, T margin, boolean totalEclipse)
Protected constructor with full parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected FieldEclipseDetector<T>
create(FieldEventDetectionSettings<T> detectionSettings, FieldEventHandler<T> newHandler)
Build a new instance.T
g(FieldSpacecraftState<T> s)
Compute the value of the switching function.T
getMargin()
Get the angular margin used for eclipse detection.OccultationEngine
getOccultationEngine()
Get the occultation engine.boolean
getTotalEclipse()
Get the total eclipse detection flag.FieldEclipseDetector<T>
withMargin(T newMargin)
Setup a margin to angle detection.FieldEclipseDetector<T>
withPenumbra()
Setup the detector to penumbra detection.FieldEclipseDetector<T>
withUmbra()
Setup the detector to full umbra detection.-
Methods inherited from class org.orekit.propagation.events.FieldAbstractDetector
getDetectionSettings, getHandler, init, isForward, withDetectionSettings, withHandler, withMaxCheck, withMaxCheck, withMaxIter, withThreshold
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.orekit.propagation.events.FieldEventDetector
finish, getMaxCheckInterval, getMaxIterationCount, getThreshold
-
-
-
-
Constructor Detail
-
FieldEclipseDetector
public FieldEclipseDetector(Field<T> field, 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 (
FieldAbstractDetector.DEFAULT_MAXCHECK
) and convergence threshold (FieldAbstractDetector.DEFAULT_THRESHOLD
).- Parameters:
field
- field used by defaultocculted
- the body to be occultedoccultedRadius
- the radius of the body to be occulted (m)occulting
- the occulting body- Since:
- 12.0
-
FieldEclipseDetector
public FieldEclipseDetector(Field<T> field, OccultationEngine occultationEngine)
Build a new eclipse detector.The new instance is a total eclipse (umbra) detector with default values for maximal checking interval (
FieldAbstractDetector.DEFAULT_MAXCHECK
) and convergence threshold (FieldAbstractDetector.DEFAULT_THRESHOLD
).- Parameters:
field
- field used by defaultoccultationEngine
- occultation engine- Since:
- 12.0
-
FieldEclipseDetector
protected FieldEclipseDetector(FieldEventDetectionSettings<T> detectionSettings, FieldEventHandler<T> handler, OccultationEngine occultationEngine, T 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
- event 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:
- 13.0
-
-
Method Detail
-
create
protected FieldEclipseDetector<T> create(FieldEventDetectionSettings<T> detectionSettings, FieldEventHandler<T> newHandler)
Build a new instance.- Specified by:
create
in classFieldAbstractDetector<FieldEclipseDetector<T extends CalculusFieldElement<T>>,T extends CalculusFieldElement<T>>
- Parameters:
detectionSettings
- detection settingsnewHandler
- event handler to call at event occurrences- Returns:
- a new instance of the appropriate sub-type
-
withUmbra
public FieldEclipseDetector<T> 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 FieldEclipseDetector<T> 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()
-
withMargin
public FieldEclipseDetector<T> withMargin(T newMargin)
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 T getMargin()
Get the angular margin used for eclipse detection.- Returns:
- angular margin used for eclipse detection (rad)
- Since:
- 12.0
-
getOccultationEngine
public OccultationEngine 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
public T g(FieldSpacecraftState<T> s)
Compute the value of the switching function. This function becomes negative when entering the region of shadow and positive when exiting.- Parameters:
s
- the current state information: date, kinematics, attitude- Returns:
- value of the switching function
-
-