org.orekit.propagation.events
Class EventState

java.lang.Object
  extended by org.orekit.propagation.events.EventState
All Implemented Interfaces:
Serializable

public class EventState
extends Object
implements Serializable

This class handles the state for one event detector during integration steps.

This class is heavily based on the class with the same name from the Apache commons-math library. The changes performed consist in replacing raw types (double and double arrays) with space dynamics types (AbsoluteDate, SpacecraftState).

Each time the propagator proposes a step, the event detector should be checked. This class handles the state of one detector during one propagation step, with references to the state at the end of the preceding step. This information is used to determine if the detector should trigger an event or not during the proposed step (and hence the step should be reduced to ensure the event occurs at a bound rather than inside the step).

See Orekit issue 110 for more information. Default constructor changed in order to instanciate a bracketing solver, to solve the bracketing exception.

Author:
Luc Maisonobe
See Also:
Serialized Form

Constructor Summary
EventState(EventDetector detector)
          Simple constructor.
EventState(EventDetector detector, UnivariateSolver solver)
          Constructor allowing the user to provide the solver used in switch detection.
 
Method Summary
 boolean evaluateStep(OrekitStepInterpolator interpolator)
          Evaluate the impact of the proposed step on the event detector.
See Orekit issue 110 for more information.
 boolean evaluateStep(SpacecraftState state)
          Evaluate the impact of the proposed step on the event handler.
 EventDetector getEventDetector()
          Get the underlying event detector.
 AbsoluteDate getEventTime()
          Get the occurrence time of the event triggered in the current step.
 boolean isPendingReset()
          Check if some reset is being triggered.
 void reinitializeBegin(SpacecraftState state0)
          Reinitialize the beginning of the step.
 boolean removeDetector()
          Check if the current detector should be removed at the end of the current step.
 SpacecraftState reset(SpacecraftState oldState)
          Let the event detector reset the state if it wants.
 void stepAccepted(SpacecraftState state)
          Acknowledge the fact the step has been accepted by the propagator.
 boolean stop()
          Check if the propagation should be stopped at the end of the current step.
 void storeState(SpacecraftState state0)
          Reinitialize event state with provided time and state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventState

public EventState(EventDetector detector,
                  UnivariateSolver solver)
Constructor allowing the user to provide the solver used in switch detection.

Parameters:
detector - monitored event detector
solver - the UnivariateSolver used in switch detection

EventState

public EventState(EventDetector detector)
Simple constructor. The default solver used in switch detection is the Brent solver.

Parameters:
detector - monitored event detector
Method Detail

getEventDetector

public EventDetector getEventDetector()
Get the underlying event detector.

Returns:
underlying event detector

reinitializeBegin

public void reinitializeBegin(SpacecraftState state0)
                       throws OrekitException
Reinitialize the beginning of the step.

Parameters:
state0 - state value at the beginning of the step
Throws:
OrekitException - if the event detector value cannot be evaluated at the beginning of the step

isPendingReset

public boolean isPendingReset()
Check if some reset is being triggered.

Returns:
true is some reset is being triggered

storeState

public void storeState(SpacecraftState state0)
                throws OrekitException
Reinitialize event state with provided time and state.

Parameters:
state0 - SpacecraftState current state
Throws:
OrekitException - SpacecraftState

evaluateStep

public boolean evaluateStep(SpacecraftState state)
                     throws OrekitException
Evaluate the impact of the proposed step on the event handler. In that case, the step is of null size (the provided date should be equal to t0)

Parameters:
state - current state
Returns:
true if the event handler triggers an event before the end of the proposed step
Throws:
OrekitException - SpacecraftState

evaluateStep

public boolean evaluateStep(OrekitStepInterpolator interpolator)
                     throws OrekitException,
                            TooManyEvaluationsException,
                            NoBracketingException
Evaluate the impact of the proposed step on the event detector.
See Orekit issue 110 for more information. Default constructor changed in order to instanciate a bracketing solver, to solve the bracketing exception.

Parameters:
interpolator - step interpolator for the proposed step
Returns:
true if the event detector triggers an event before the end of the proposed step (this implies the step should be rejected)
Throws:
OrekitException - if the switching function cannot be evaluated
TooManyEvaluationsException - if an event cannot be located
NoBracketingException - if bracketing cannot be performed

getEventTime

public AbsoluteDate getEventTime()
Get the occurrence time of the event triggered in the current step.

Returns:
occurrence time of the event triggered in the current step.

stepAccepted

public void stepAccepted(SpacecraftState state)
                  throws OrekitException
Acknowledge the fact the step has been accepted by the propagator.

Parameters:
state - value of the state vector at the end of the step
Throws:
OrekitException - if the value of the switching function cannot be evaluated

stop

public boolean stop()
Check if the propagation should be stopped at the end of the current step.

Returns:
true if the propagation should be stopped

removeDetector

public boolean removeDetector()
Check if the current detector should be removed at the end of the current step.

Returns:
true if the detector should be removed

reset

public SpacecraftState reset(SpacecraftState oldState)
                      throws OrekitException
Let the event detector reset the state if it wants.

Parameters:
oldState - value of the state vector at the beginning of the next step
Returns:
new state (null if no reset is needed)
Throws:
OrekitException - if the state cannot be reset by the event detector


Copyright © 2016 CNES. All Rights Reserved.