Class AltitudeDetector
- java.lang.Object
-
- org.orekit.propagation.events.AbstractDetector<AltitudeDetector>
-
- org.orekit.propagation.events.AltitudeDetector
-
- All Implemented Interfaces:
EventDetector
public class AltitudeDetector extends AbstractDetector<AltitudeDetector>
Finder for satellite altitude crossing events.This class finds altitude events (i.e. satellite crossing a predefined altitude level above ground).
The default implementation behavior is to
continue
propagation when ascending and tostop
propagation when descending. This can be changed by callingAbstractDetector.withHandler(EventHandler)
after construction.- Author:
- 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 Modifier Constructor Description AltitudeDetector(double maxCheck, double threshold, double altitude, BodyShape bodyShape)
Build a new altitude detector.AltitudeDetector(double maxCheck, double altitude, BodyShape bodyShape)
Build a new altitude detector.AltitudeDetector(double altitude, BodyShape bodyShape)
Build a new altitude detector.protected
AltitudeDetector(AdaptableInterval maxCheck, double threshold, int maxIter, EventHandler handler, double altitude, BodyShape bodyShape)
Protected constructor with full parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AltitudeDetector
create(AdaptableInterval newMaxCheck, double newThreshold, int newMaxIter, EventHandler newHandler)
Build a new instance.double
g(SpacecraftState s)
Compute the value of the switching function.double
getAltitude()
Get the threshold altitude value.BodyShape
getBodyShape()
Get the body shape.-
Methods inherited from class org.orekit.propagation.events.AbstractDetector
getHandler, getMaxCheckInterval, getMaxIterationCount, getThreshold, init, isForward, withHandler, withMaxCheck, withMaxCheck, withMaxIter, withThreshold
-
-
-
-
Constructor Detail
-
AltitudeDetector
public AltitudeDetector(double altitude, BodyShape bodyShape)
Build a new altitude detector.This simple constructor takes default values for maximal checking interval (
AbstractDetector.DEFAULT_MAXCHECK
) and convergence threshold (AbstractDetector.DEFAULT_THRESHOLD
).- Parameters:
altitude
- threshold altitude valuebodyShape
- body shape with respect to which altitude should be evaluated
-
AltitudeDetector
public AltitudeDetector(double maxCheck, double altitude, BodyShape bodyShape)
Build a new altitude detector.This simple constructor takes default value for convergence threshold (
AbstractDetector.DEFAULT_THRESHOLD
).The maximal interval between altitude checks should be smaller than the half duration of the minimal pass to handle, otherwise some short passes could be missed.
- Parameters:
maxCheck
- maximal checking interval (s)altitude
- threshold altitude value (m)bodyShape
- body shape with respect to which altitude should be evaluated
-
AltitudeDetector
public AltitudeDetector(double maxCheck, double threshold, double altitude, BodyShape bodyShape)
Build a new altitude detector.The maximal interval between altitude checks should be smaller than the half duration of the minimal pass to handle, otherwise some short passes could be missed.
The maximal interval between altitude checks should be smaller than the half duration of the minimal pass to handle, otherwise some short passes could be missed.
- Parameters:
maxCheck
- maximal checking interval (s)threshold
- convergence threshold (s)altitude
- threshold altitude value (m)bodyShape
- body shape with respect to which altitude should be evaluated
-
AltitudeDetector
protected AltitudeDetector(AdaptableInterval maxCheck, double threshold, int maxIter, EventHandler handler, double altitude, BodyShape bodyShape)
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:
maxCheck
- maximum checking intervalthreshold
- convergence threshold (s)maxIter
- maximum number of iterations in the event time searchhandler
- event handler to call at event occurrencesaltitude
- threshold altitude value (m)bodyShape
- body shape with respect to which altitude should be evaluated- Since:
- 6.1
-
-
Method Detail
-
create
protected AltitudeDetector create(AdaptableInterval newMaxCheck, double newThreshold, int newMaxIter, EventHandler newHandler)
Build a new instance.- Specified by:
create
in classAbstractDetector<AltitudeDetector>
- Parameters:
newMaxCheck
- maximum checking interval (s)newThreshold
- convergence threshold (s)newMaxIter
- 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
-
getAltitude
public double getAltitude()
Get the threshold altitude value.- Returns:
- the threshold altitude value (m)
-
getBodyShape
public BodyShape getBodyShape()
Get the body shape.- Returns:
- the body shape
-
g
public double g(SpacecraftState s)
Compute the value of the switching function. This function measures the difference between the current altitude and the threshold altitude.- Specified by:
g
in interfaceEventDetector
- Specified by:
g
in classAbstractDetector<AltitudeDetector>
- Parameters:
s
- the current state information: date, kinematics, attitude- Returns:
- value of the switching function
-
-