Class GroundAtNightEventFunction
- java.lang.Object
-
- org.orekit.propagation.events.functions.GroundAtNightEventFunction
-
- All Implemented Interfaces:
EventFunction
public class GroundAtNightEventFunction extends Object implements EventFunction
Event function for ground location being at night.The
gfunction of this detector is positive when ground is at night (i.e. Sun is below dawn/dusk elevation angle).- Since:
- 14.0
- Author:
- Luc Maisonobe, Romain Serra
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedGroundAtNightEventFunction(TopocentricFrame topocentricFrame, ExtendedPositionProvider sun, double dawnDuskElevation, AtmosphericRefractionModel refractionModel)Private constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleandependsOnTimeOnly()Method returning true if and only if the event function does not depend on dependent variables, just the independent one i.e. time.<T extends CalculusFieldElement<T>>
Tvalue(FieldSpacecraftState<T> state)Evaluate Field function.doublevalue(SpacecraftState state)Evaluate function.-
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.functions.EventFunction
dependsOnMainVariablesOnly
-
-
-
-
Constructor Detail
-
GroundAtNightEventFunction
protected GroundAtNightEventFunction(TopocentricFrame topocentricFrame, ExtendedPositionProvider sun, double dawnDuskElevation, AtmosphericRefractionModel refractionModel)
Private constructor.- Parameters:
topocentricFrame- ground location from which measurement is performedsun- provider for Sun positiondawnDuskElevation- Sun elevation below which we consider night is dark enough (rad)refractionModel- reference to refraction model (null if refraction should be ignored),
-
-
Method Detail
-
value
public double value(SpacecraftState state)
Description copied from interface:EventFunctionEvaluate function.- Specified by:
valuein interfaceEventFunction- Parameters:
state- spacecraft state- Returns:
- value
-
value
public <T extends CalculusFieldElement<T>> T value(FieldSpacecraftState<T> state)
Evaluate Field function. By default, calls the non-Field version. This is suitable for detection but not be for applications like automatic differentiation, where a proper implementation should be used instead.The function is positive when ground is at night (i.e. Sun is below dawn/dusk elevation angle).
This function only depends on date, not on the actual position of the spacecraft.
- Specified by:
valuein interfaceEventFunction- Type Parameters:
T- field type- Parameters:
state- spacecraft state- Returns:
- value
-
dependsOnTimeOnly
public boolean dependsOnTimeOnly()
Description copied from interface:EventFunctionMethod returning true if and only if the event function does not depend on dependent variables, just the independent one i.e. time. This information is used for performance in propagation and derivatives correction with switches in the dynamics.- Specified by:
dependsOnTimeOnlyin interfaceEventFunction- Returns:
- flag
-
-