Class AttitudesSequence.Switch
- java.lang.Object
-
- org.orekit.attitudes.AttitudesSequence.Switch
-
- All Implemented Interfaces:
EventDetector,EventHandler
- Enclosing class:
- AttitudesSequence
public class AttitudesSequence.Switch extends Object implements EventDetector, EventHandler
Switch specification.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ActioneventOccurred(SpacecraftState s, EventDetector detector, boolean increasing)Handle an event.doubleg(SpacecraftState s)Compute the value of the switching function.EventHandlergetHandler()Get the handler.AdaptableIntervalgetMaxCheckInterval()Get maximal time interval between switching function checks.intgetMaxIterationCount()Get maximal number of iterations in the event time search.doublegetThreshold()Get the convergence threshold in the event time search.voidinit(SpacecraftState s0, AbsoluteDate t)Initialize event handler at the start of a propagation.SpacecraftStateresetState(EventDetector detector, SpacecraftState oldState)Reset the state prior to continue propagation.-
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.EventDetector
finish, getDetectionSettings
-
Methods inherited from interface org.orekit.propagation.events.handlers.EventHandler
finish, init
-
-
-
-
Method Detail
-
getThreshold
public double getThreshold()
Get the convergence threshold in the event time search.- Specified by:
getThresholdin interfaceEventDetector- Returns:
- convergence threshold (s)
-
getMaxCheckInterval
public AdaptableInterval getMaxCheckInterval()
Get maximal time interval between switching function checks.- Specified by:
getMaxCheckIntervalin interfaceEventDetector- Returns:
- maximal time interval (s) between switching function checks
-
getMaxIterationCount
public int getMaxIterationCount()
Get maximal number of iterations in the event time search.- Specified by:
getMaxIterationCountin interfaceEventDetector- Returns:
- maximal number of iterations in the event time search
-
init
public void init(SpacecraftState s0, AbsoluteDate t)
Initialize event handler at the start of a propagation.This method is called once at the start of the propagation. It may be used by the event handler to initialize some internal data if needed.
The default implementation does nothing
- Specified by:
initin interfaceEventDetector- Parameters:
s0- initial statet- target time for the integration
-
g
public double g(SpacecraftState s)
Compute the value of the switching function. This function must be continuous (at least in its roots neighborhood), as the integrator will need to find its roots to locate the events.- Specified by:
gin interfaceEventDetector- Parameters:
s- the current state information: date, kinematics, attitude- Returns:
- value of the switching function
-
getHandler
public EventHandler getHandler()
Get the handler.- Specified by:
getHandlerin interfaceEventDetector- Returns:
- event handler to call at event occurrences
-
eventOccurred
public Action eventOccurred(SpacecraftState s, EventDetector detector, boolean increasing)
Handle an event.- Specified by:
eventOccurredin interfaceEventHandler- Parameters:
s- SpaceCraft state to be used in the evaluationdetector- object with appropriate type that can be used in determining correct return stateincreasing- with the event occurred in an "increasing" or "decreasing" slope direction- Returns:
- the Action that the calling detector should pass back to the evaluation system
-
resetState
public SpacecraftState resetState(EventDetector detector, SpacecraftState oldState)
Reset the state prior to continue propagation.This method is called after the step handler has returned and before the next step is started, but only when
EventHandler.eventOccurred(org.orekit.propagation.SpacecraftState, org.orekit.propagation.events.EventDetector, boolean)has itself returned theAction.RESET_STATEindicator. It allows the user to reset the state for the next step, without perturbing the step handler of the finishing step. If theEventHandler.eventOccurred(org.orekit.propagation.SpacecraftState, org.orekit.propagation.events.EventDetector, boolean)never returns theAction.RESET_STATEindicator, this function will never be called, and it is safe to simply return null.The default implementation simply return its argument.
- Specified by:
resetStatein interfaceEventHandler- Parameters:
detector- object with appropriate type that can be used in determining correct return stateoldState- old state- Returns:
- new state
-
-