Class AttitudesSwitcher.InstantaneousSwitch
- java.lang.Object
-
- org.orekit.propagation.events.AdapterDetector
-
- org.orekit.attitudes.AttitudesSwitcher.InstantaneousSwitch
-
- All Implemented Interfaces:
EventDetector
,EventHandler
- Enclosing class:
- AttitudesSwitcher
public class AttitudesSwitcher.InstantaneousSwitch extends AdapterDetector
Switch specification. Reset derivatives due to instantaneous change of attitude.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Action
eventOccurred(SpacecraftState s, EventDetector detector, boolean increasing)
Handle an event.protected AttitudeProvider
getFuture()
Protected getter for future attitude provider.EventHandler
getHandler()
Get the handler.protected AttitudeProvider
getPast()
Protected getter for past attitude provider.protected AttitudeSwitchHandler
getSwitchHandler()
Protected getter for switch handle.void
init(SpacecraftState s0, AbsoluteDate t)
Initialize event handler at the start of a propagation.protected boolean
isSwitchOnDecrease()
Protected getter for switch-on-decrease flag.protected boolean
isSwitchOnIncrease()
Protected getter for switch-on-increase flag.SpacecraftState
resetState(EventDetector detector, SpacecraftState oldState)
Reset the state prior to continue propagation.-
Methods inherited from class org.orekit.propagation.events.AdapterDetector
finish, g, getDetectionSettings, getDetector
-
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
getMaxCheckInterval, getMaxIterationCount, getThreshold
-
Methods inherited from interface org.orekit.propagation.events.handlers.EventHandler
finish, init
-
-
-
-
Method Detail
-
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 initializes the handler.
- Specified by:
init
in interfaceEventDetector
- Overrides:
init
in classAdapterDetector
- Parameters:
s0
- initial statet
- target time for the integration
-
eventOccurred
public Action eventOccurred(SpacecraftState s, EventDetector detector, boolean increasing)
Handle an event.- 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
-
getSwitchHandler
protected AttitudeSwitchHandler getSwitchHandler()
Protected getter for switch handle.- Returns:
- switch handler
-
getFuture
protected AttitudeProvider getFuture()
Protected getter for future attitude provider.- Returns:
- future provider
-
getPast
protected AttitudeProvider getPast()
Protected getter for past attitude provider.- Returns:
- pas provider
-
isSwitchOnDecrease
protected boolean isSwitchOnDecrease()
Protected getter for switch-on-decrease flag.- Returns:
- flag
-
isSwitchOnIncrease
protected boolean isSwitchOnIncrease()
Protected getter for switch-on-increase flag.- Returns:
- flag
-
getHandler
public EventHandler getHandler()
Get the handler.- Specified by:
getHandler
in interfaceEventDetector
- Overrides:
getHandler
in classAdapterDetector
- Returns:
- event handler to call at event occurrences
-
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_STATE
indicator. 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_STATE
indicator, this function will never be called, and it is safe to simply return null.The default implementation simply return its argument.
- Specified by:
resetState
in interfaceEventHandler
- Parameters:
detector
- object with appropriate type that can be used in determining correct return stateoldState
- old state- Returns:
- new state
-
-