Class ElevationDetector
- java.lang.Object
-
- org.orekit.propagation.events.AbstractDetector<ElevationDetector>
-
- org.orekit.propagation.events.ElevationDetector
-
- All Implemented Interfaces:
EventDetector
public class ElevationDetector extends AbstractDetector<ElevationDetector>
Finder for satellite raising/setting events that allows for the setting of azimuth and/or elevation bounds or a ground azimuth/elevation mask input. Each calculation be configured to use atmospheric refraction as well.The default implementation behavior is to
continue
propagation at raising and tostop
propagation at setting. This can be changed by callingAbstractDetector.withHandler(EventHandler)
after construction.- Since:
- 6.1
- Author:
- Hank Grabowski
-
-
Field Summary
-
Fields inherited from class org.orekit.propagation.events.AbstractDetector
DEFAULT_MAX_ITER, DEFAULT_MAXCHECK, DEFAULT_THRESHOLD
-
-
Constructor Summary
Constructors Modifier Constructor Description ElevationDetector(double maxCheck, double threshold, TopocentricFrame topo)
Creates an instance of Elevation detector based on passed in topocentric frame and overrides of default maximal checking interval and convergence threshold values.ElevationDetector(TopocentricFrame topo)
Creates an instance of Elevation detector based on passed in topocentric frame and the minimum elevation angle.protected
ElevationDetector(AdaptableInterval maxCheck, double threshold, int maxIter, EventHandler handler, double minElevation, ElevationMask mask, AtmosphericRefractionModel refractionModel, TopocentricFrame topo)
Protected constructor with full parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ElevationDetector
create(AdaptableInterval newMaxCheck, double newThreshold, int newMaxIter, EventHandler newHandler)
Build a new instance.double
g(SpacecraftState s)
Compute the value of the switching function.ElevationMask
getElevationMask()
Returns the currently configured elevation mask.double
getMinElevation()
Returns the currently configured minimum valid elevation value.AtmosphericRefractionModel
getRefractionModel()
Returns the currently configured refraction model.TopocentricFrame
getTopocentricFrame()
Returns the currently configured topocentric frame definitions.ElevationDetector
withConstantElevation(double newMinElevation)
Setup the minimum elevation for detection.ElevationDetector
withElevationMask(ElevationMask newElevationMask)
Setup the elevation mask for detection using the passed in mask object.ElevationDetector
withRefraction(AtmosphericRefractionModel newRefractionModel)
Setup the elevation detector to use an atmospheric refraction model in its calculations.-
Methods inherited from class org.orekit.propagation.events.AbstractDetector
getHandler, getMaxCheckInterval, getMaxIterationCount, getThreshold, init, isForward, withHandler, withMaxCheck, withMaxCheck, withMaxIter, withThreshold
-
-
-
-
Constructor Detail
-
ElevationDetector
public ElevationDetector(TopocentricFrame topo)
Creates an instance of Elevation detector based on passed in topocentric frame and the minimum elevation angle.uses default values for maximal checking interval (
AbstractDetector.DEFAULT_MAXCHECK
) and convergence threshold (AbstractDetector.DEFAULT_THRESHOLD
).- Parameters:
topo
- reference to a topocentric model- See Also:
withConstantElevation(double)
,withElevationMask(ElevationMask)
,withRefraction(AtmosphericRefractionModel)
-
ElevationDetector
public ElevationDetector(double maxCheck, double threshold, TopocentricFrame topo)
Creates an instance of Elevation detector based on passed in topocentric frame and overrides of default maximal checking interval and convergence threshold values.- Parameters:
maxCheck
- maximum checking interval (s)threshold
- maximum divergence threshold (s)topo
- reference to a topocentric model- See Also:
withConstantElevation(double)
,withElevationMask(ElevationMask)
,withRefraction(AtmosphericRefractionModel)
-
ElevationDetector
protected ElevationDetector(AdaptableInterval maxCheck, double threshold, int maxIter, EventHandler handler, double minElevation, ElevationMask mask, AtmosphericRefractionModel refractionModel, TopocentricFrame topo)
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 occurrencesminElevation
- minimum elevation in radians (rad)mask
- reference to elevation maskrefractionModel
- reference to refraction modeltopo
- reference to a topocentric model
-
-
Method Detail
-
create
protected ElevationDetector create(AdaptableInterval newMaxCheck, double newThreshold, int newMaxIter, EventHandler newHandler)
Build a new instance.- Specified by:
create
in classAbstractDetector<ElevationDetector>
- 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
-
getElevationMask
public ElevationMask getElevationMask()
Returns the currently configured elevation mask.- Returns:
- elevation mask
(null if instance has been configured with
withConstantElevation(double)
- See Also:
withElevationMask(ElevationMask)
-
getMinElevation
public double getMinElevation()
Returns the currently configured minimum valid elevation value.- Returns:
- minimum elevation value
(
Double.NaN
if instance has been configured withwithElevationMask(ElevationMask)
- See Also:
withConstantElevation(double)
-
getRefractionModel
public AtmosphericRefractionModel getRefractionModel()
Returns the currently configured refraction model.- Returns:
- refraction model
- See Also:
withRefraction(AtmosphericRefractionModel)
-
getTopocentricFrame
public TopocentricFrame getTopocentricFrame()
Returns the currently configured topocentric frame definitions.- Returns:
- topocentric frame definition
-
g
public double g(SpacecraftState s)
Compute the value of the switching function. This function measures the difference between the current elevation (and azimuth if necessary) and the reference mask or minimum value.- Specified by:
g
in interfaceEventDetector
- Specified by:
g
in classAbstractDetector<ElevationDetector>
- Parameters:
s
- the current state information: date, kinematics, attitude- Returns:
- value of the switching function
-
withConstantElevation
public ElevationDetector withConstantElevation(double newMinElevation)
Setup the minimum elevation for detection.This will override an elevation mask if it has been configured as such previously.
- Parameters:
newMinElevation
- minimum elevation for visibility in radians (rad)- Returns:
- a new detector with updated configuration (the instance is not changed)
- Since:
- 6.1
- See Also:
getMinElevation()
-
withElevationMask
public ElevationDetector withElevationMask(ElevationMask newElevationMask)
Setup the elevation mask for detection using the passed in mask object.- Parameters:
newElevationMask
- elevation mask to use for the computation- Returns:
- a new detector with updated configuration (the instance is not changed)
- Since:
- 6.1
- See Also:
getElevationMask()
-
withRefraction
public ElevationDetector withRefraction(AtmosphericRefractionModel newRefractionModel)
Setup the elevation detector to use an atmospheric refraction model in its calculations.To disable the refraction when copying an existing elevation detector, call this method with a null argument.
- Parameters:
newRefractionModel
- refraction model to use for the computation- Returns:
- a new detector with updated configuration (the instance is not changed)
- Since:
- 6.1
- See Also:
getRefractionModel()
-
-