public class ExtremaThreeBodiesAngleDetector extends AbstractDetector implements MultiEventDetector
ExtremaLatitudeDetector.MIN
, ExtremaLatitudeDetector.MAX
and
ExtremaLatitudeDetector.MIN_MAX
for both.
The default implementation behavior is to stop
propagation at minimum or/and
maximum angle between three bodies depending on extremum type defined. This can be changed by overriding one of the
following constructors :
ExtremaThreeBodiesAngleDetector
or
ExtremaThreeBodiesAngleDetector
: the defined action is performed at maximal OR/AND minimal angle depending on slope
selection defined.
ExtremaThreeBodiesAngleDetector
or
ExtremaThreeBodiesAngleDetector
: the defined actions are performed at minimal AND maximal angle.
A multi spacecraft propagation could be performed using the following constructors :
ExtremaThreeBodiesAngleDetector
: the defined action is performed at maximal OR/AND minimal angle depending on slope
selection defined.
ExtremaThreeBodiesAngleDetector
: the defined actions are performed at minimal AND maximal angle.
EventDetector
,
Serialized FormModifier and Type | Class and Description |
---|---|
static class |
ExtremaThreeBodiesAngleDetector.BodyOrder
Bodies order type.
|
EventDetector.Action
Modifier and Type | Field and Description |
---|---|
static int |
MAX
Flag for local maximum angle detection (g decreasing).
|
static int |
MIN
Flag for local minimum angle detection (g increasing).
|
static int |
MIN_MAX
Flag for both local minimum and maximum angle detection.
|
actionAtEntry, actionAtExit, DEFAULT_MAXCHECK, DEFAULT_MAXITER, DEFAULT_THRESHOLD, removeAtEntry, removeAtExit, shouldBeRemovedFlag
DECREASING, INCREASING, INCREASING_DECREASING
DECREASING, INCREASING, INCREASING_DECREASING
Constructor and Description |
---|
ExtremaThreeBodiesAngleDetector(PVCoordinatesProvider bodyA,
PVCoordinatesProvider bodyB,
ExtremaThreeBodiesAngleDetector.BodyOrder bodyC,
double maxCheck,
double threshold,
EventDetector.Action actionMin,
EventDetector.Action actionMax)
Constructor for the min and max three bodies angle detector with specified action for both minimum and maximum.
|
ExtremaThreeBodiesAngleDetector(PVCoordinatesProvider bodyA,
PVCoordinatesProvider bodyB,
ExtremaThreeBodiesAngleDetector.BodyOrder bodyC,
double maxCheck,
double threshold,
EventDetector.Action actionMin,
EventDetector.Action actionMax,
boolean removeMin,
boolean removeMax)
Constructor for the min and max three bodies angle detector with specified action for both minimum and maximum.
|
ExtremaThreeBodiesAngleDetector(PVCoordinatesProvider bodyA,
PVCoordinatesProvider bodyB,
ExtremaThreeBodiesAngleDetector.BodyOrder bodyC,
int extremumType)
Simple constructor for the min and max three bodies angle detector.
|
ExtremaThreeBodiesAngleDetector(PVCoordinatesProvider bodyA,
PVCoordinatesProvider bodyB,
ExtremaThreeBodiesAngleDetector.BodyOrder bodyC,
int extremumType,
double maxCheck,
double threshold)
Constructor for the min and max three bodies angle detector with defined maximum check and convergence threshold.
|
ExtremaThreeBodiesAngleDetector(PVCoordinatesProvider bodyA,
PVCoordinatesProvider bodyB,
ExtremaThreeBodiesAngleDetector.BodyOrder bodyC,
int extremumType,
double maxCheck,
double threshold,
EventDetector.Action action)
Constructor for the min and max three bodies angle detector with specified action when extrema is detected.
|
ExtremaThreeBodiesAngleDetector(PVCoordinatesProvider bodyA,
PVCoordinatesProvider bodyB,
ExtremaThreeBodiesAngleDetector.BodyOrder bodyC,
int extremumType,
double maxCheck,
double threshold,
EventDetector.Action action,
boolean remove)
Constructor for the min and max three bodies angle detector with specified action when extrema is detected.
|
ExtremaThreeBodiesAngleDetector(PVCoordinatesProvider firstBody,
PVCoordinatesProvider secondBody,
PVCoordinatesProvider thirdBody,
double maxCheck,
double threshold,
EventDetector.Action actionMin,
EventDetector.Action actionMax)
Constructor for the min and max three bodies angle detector with specified action for both
minimum and maximum.
|
ExtremaThreeBodiesAngleDetector(PVCoordinatesProvider firstBody,
PVCoordinatesProvider secondBody,
PVCoordinatesProvider thirdBody,
double maxCheck,
double threshold,
EventDetector.Action actionMin,
EventDetector.Action actionMax,
boolean removeMin,
boolean removeMax)
Constructor for the min and max three bodies angle detector with specified action for both
minimum and maximum.
|
ExtremaThreeBodiesAngleDetector(PVCoordinatesProvider firstBody,
PVCoordinatesProvider secondBody,
PVCoordinatesProvider thirdBody,
int extremumType)
Constructor for the min and max three bodies angle detector.
|
ExtremaThreeBodiesAngleDetector(PVCoordinatesProvider firstBody,
PVCoordinatesProvider secondBody,
PVCoordinatesProvider thirdBody,
int extremumType,
double maxCheck,
double threshold)
Constructor for the min and max three bodies angle detector.
|
ExtremaThreeBodiesAngleDetector(PVCoordinatesProvider firstBody,
PVCoordinatesProvider secondBody,
PVCoordinatesProvider thirdBody,
int extremumType,
double maxCheck,
double threshold,
EventDetector.Action action)
Constructor for the min and max three bodies angle detector with specified action when
extrema is detected.
|
ExtremaThreeBodiesAngleDetector(PVCoordinatesProvider firstBody,
PVCoordinatesProvider secondBody,
PVCoordinatesProvider thirdBody,
int extremumType,
double maxCheck,
double threshold,
EventDetector.Action action,
boolean remove)
Constructor for the min and max three bodies angle detector with specified action when
extrema is detected.
|
ExtremaThreeBodiesAngleDetector(String firstBody,
String secondBody,
String thirdBody,
double maxCheck,
double threshold,
EventDetector.Action actionMin,
EventDetector.Action actionMax)
Constructor for the min and max three bodies angle detector with specified action for both
minimum and maximum.
|
ExtremaThreeBodiesAngleDetector(String firstBody,
String secondBody,
String thirdBody,
double maxCheck,
double threshold,
EventDetector.Action actionMin,
EventDetector.Action actionMax,
boolean removeMin,
boolean removeMax)
Constructor for the min and max three bodies angle detector with specified action for both
minimum and maximum.
|
ExtremaThreeBodiesAngleDetector(String firstBody,
String secondBody,
String thirdBody,
int extremumType,
double maxCheck,
double threshold,
EventDetector.Action action)
Constructor for the min and max three bodies angle detector with specified action when
extrema is detected.
|
ExtremaThreeBodiesAngleDetector(String firstBody,
String secondBody,
String thirdBody,
int extremumType,
double maxCheck,
double threshold,
EventDetector.Action action,
boolean remove)
Constructor for the min and max three bodies angle detector with specified action when
extrema is detected.
|
Modifier and Type | Method and Description |
---|---|
EventDetector |
copy()
A copy of the detector.
|
EventDetector.Action |
eventOccurred(Map<String,SpacecraftState> s,
boolean increasing,
boolean forward)
Handle an event and choose what to do next.
|
EventDetector.Action |
eventOccurred(SpacecraftState s,
boolean increasing,
boolean forward)
Handle a min or max angle event and choose what to do next.
|
boolean |
filterEvent(Map<String,SpacecraftState> states,
boolean increasing,
boolean forward)
Filter last event: returns true if the last event is a false detection, false otherwise.
|
double |
g(Map<String,SpacecraftState> s)
Compute the value of the switching function.
|
double |
g(SpacecraftState state)
Compute the value of the switching function.
|
PVCoordinatesProvider |
getFirstBody()
Get 1st body
|
String |
getInSpacecraftId1()
Get the first spacecraft id
|
String |
getInSpacecraftId2()
Get the second spacecraft id
|
String |
getInSpacecraftId3()
Get the third spacecraft id
|
PVCoordinatesProvider |
getSecondBody()
Get 2nd body
|
PVCoordinatesProvider |
getThirdBody()
Get 3rd body
|
void |
init(Map<String,SpacecraftState> s0,
AbsoluteDate t)
Initialize event handler at the start of a propagation.
|
void |
init(SpacecraftState s0,
AbsoluteDate t)
Initialize event handler at the start of a propagation.
|
Map<String,SpacecraftState> |
resetStates(Map<String,SpacecraftState> oldStates)
Reset the states (including additional states) prior to continue propagation.
|
filterEvent, getActionAtEntry, getActionAtExit, getMaxCheckInterval, getMaxIterationCount, getSlopeSelection, getThreshold, isRemoveAtEntry, isRemoveAtExit, logEventsOverTimeInterval, resetState, setMaxCheckInterval, setMaxIter, shouldBeRemoved
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMaxCheckInterval, getMaxIterationCount, getSlopeSelection, getThreshold, shouldBeRemoved
public static final int MIN
public static final int MAX
public static final int MIN_MAX
public ExtremaThreeBodiesAngleDetector(PVCoordinatesProvider firstBody, PVCoordinatesProvider secondBody, PVCoordinatesProvider thirdBody, int extremumType)
If v21 is the vector from the second body to the first body and v23 is the vector from the second body to the third body, the detected angle will be the angle (in the range 0-Π) between v21 and v23.
The default implementation behavior is to stop
propagation when the expected
extrema is reached.
public ExtremaThreeBodiesAngleDetector(PVCoordinatesProvider firstBody, PVCoordinatesProvider secondBody, PVCoordinatesProvider thirdBody, int extremumType, double maxCheck, double threshold)
If v21 is the vector from the second body to the first body and v23 is the vector from the second body to the third body, the detected angle will be the angle (in the range 0-Π) between v21 and v23.
The default implementation behavior is to stop
propagation when the expected
extrema is reached.
firstBody
- the body "1"secondBody
- the body "2"thirdBody
- the body "3"extremumType
- MIN
for minimal angle detection,
MAX
for maximal angle detection or
MIN_MAX
for both minimal and maximal angle
detectionmaxCheck
- maximum check (see AbstractDetector
)threshold
- convergence threshold (see AbstractDetector
)public ExtremaThreeBodiesAngleDetector(PVCoordinatesProvider firstBody, PVCoordinatesProvider secondBody, PVCoordinatesProvider thirdBody, double maxCheck, double threshold, EventDetector.Action actionMin, EventDetector.Action actionMax)
If v21 is the vector from the second body to the first body and v23 is the vector from the second body to the third body, the detected angle will be the angle (in the range 0-Π) between v21 and v23.
firstBody
- the body "1"secondBody
- the body "2"thirdBody
- the body "3"maxCheck
- maximum check (see AbstractDetector
)threshold
- convergence threshold (see AbstractDetector
)actionMin
- action to be performed when the expected local minimum is reachedactionMax
- action to be performed when the expected local maximum is reachedpublic ExtremaThreeBodiesAngleDetector(PVCoordinatesProvider firstBody, PVCoordinatesProvider secondBody, PVCoordinatesProvider thirdBody, double maxCheck, double threshold, EventDetector.Action actionMin, EventDetector.Action actionMax, boolean removeMin, boolean removeMax)
If v21 is the vector from the second body to the first body and v23 is the vector from the second body to the third body, the detected angle will be the angle (in the range 0-Π) between v21 and v23.
firstBody
- the body "1"secondBody
- the body "2"thirdBody
- the body "3"maxCheck
- maximum check (see AbstractDetector
)threshold
- convergence threshold (see AbstractDetector
)actionMin
- action to be performed when the expected local minimum is reachedactionMax
- action to be performed when the expected local maximum is reachedremoveMin
- true if detector should be removed when the expected local minimum is
reachedremoveMax
- true if detector should be removed when the expected local maximum is
reachedpublic ExtremaThreeBodiesAngleDetector(PVCoordinatesProvider firstBody, PVCoordinatesProvider secondBody, PVCoordinatesProvider thirdBody, int extremumType, double maxCheck, double threshold, EventDetector.Action action)
If v21 is the vector from the second body to the first body and v23 is the vector from the second body to the third body, the detected angle will be the angle (in the range 0-Π) between v21 and v23.
firstBody
- the body "1"secondBody
- the body "2"thirdBody
- the body "3"extremumType
- MIN
for minimal angle detection,
MAX
for maximal angle detection or
MIN_MAX
for both minimal and maximal angle
detectionmaxCheck
- maximum check (see AbstractDetector
)threshold
- convergence threshold (see AbstractDetector
)action
- action to be performed when the expected extrema is reached.public ExtremaThreeBodiesAngleDetector(PVCoordinatesProvider firstBody, PVCoordinatesProvider secondBody, PVCoordinatesProvider thirdBody, int extremumType, double maxCheck, double threshold, EventDetector.Action action, boolean remove)
If v21 is the vector from the second body to the first body and v23 is the vector from the second body to the third body, the detected angle will be the angle (in the range 0-Π) between v21 and v23.
firstBody
- the body "1"secondBody
- the body "2"thirdBody
- the body "3"extremumType
- MIN
for minimal angle detection,
MAX
for maximal angle detection or
MIN_MAX
for both minimal and maximal angle
detectionmaxCheck
- maximum check (see AbstractDetector
)threshold
- convergence threshold (see AbstractDetector
)action
- action to be performed when the expected extrema is reached.remove
- true if detector should be removed when the expected extrema is reached.
NB : If remove is true, it means detector should be removed at detection, so the value
of attributes removeMIN and removeMAX must be decided according extremumType. Doing
it, we ensure that detector will be removed well at propagation when calling method
eventOccured (in which the value of attribute shouldBeRemoved is decided). In this
case, users should better create an ExtremaThreeBodiesAngleDetector with constructor
ExtremaThreeBodiesAngleDetector(PVCoordinatesProvider,
PVCoordinatesProvider, PVCoordinatesProvider, double, double, EventDetector.Action,
EventDetector.Action, boolean, boolean)
public ExtremaThreeBodiesAngleDetector(PVCoordinatesProvider bodyA, PVCoordinatesProvider bodyB, ExtremaThreeBodiesAngleDetector.BodyOrder bodyC, int extremumType)
Simple constructor for the min and max three bodies angle detector. The orbit of one of the three bodies is implicitly the one which is propagated by the propagator associated to this event detector.
The default implementation behavior is to stop
propagation when the expected
extrema is reached.
If v21 is the vector from the second body to the first body and v23 is the vector from the second body to the third body, the detected angle will be the angle (in the range 0-Π) between v21 and v23.
bodyA
- first body (if the body C is the second or third body), second body otherwise.bodyB
- third body (if the body C is the first or second body), second body otherwise.bodyC
- position within the constellation of the body whose orbit will be propagated by
the propagator associated to this event detector.extremumType
- MIN
for minimal angle detection,
MAX
for maximal angle detection or
MIN_MAX
for both minimal and maximal angle
detection.public ExtremaThreeBodiesAngleDetector(PVCoordinatesProvider bodyA, PVCoordinatesProvider bodyB, ExtremaThreeBodiesAngleDetector.BodyOrder bodyC, int extremumType, double maxCheck, double threshold)
Constructor for the min and max three bodies angle detector with defined maximum check and convergence threshold. The orbit of one of the three bodies is implicitly the one which is propagated by the propagator associated to this event detector.
The default implementation behavior is to stop
propagation when the expected
extrema is reached.
If v21 is the vector from the second body to the first body and v23 is the vector from the second body to the third body, the detected angle will be the angle (in the range 0-Π) between v21 and v23.
bodyA
- first body (if the body C is the second or third body), second body otherwisebodyB
- third body (if the body C is the first or second body), second body otherwisebodyC
- position within the constellation of the body whose orbit will be propagated by
the propagator associated to this event detectorextremumType
- MIN
for minimal angle detection,
MAX
for maximal angle detection or
MIN_MAX
for both minimal and maximal angle
detectionmaxCheck
- maximum check (see AbstractDetector
)threshold
- convergence threshold (see AbstractDetector
)public ExtremaThreeBodiesAngleDetector(PVCoordinatesProvider bodyA, PVCoordinatesProvider bodyB, ExtremaThreeBodiesAngleDetector.BodyOrder bodyC, double maxCheck, double threshold, EventDetector.Action actionMin, EventDetector.Action actionMax)
Constructor for the min and max three bodies angle detector with specified action for both minimum and maximum. The orbit of one of the three bodies is implicitly the one which is propagated by the propagator associated to this event detector.
If v21 is the vector from the second body to the first body and v23 is the vector from the second body to the third body, the detected angle will be the angle (in the range 0-Π) between v21 and v23.
bodyA
- first body (if the body C is the second or third body), second body otherwise.bodyB
- third body (if the body C is the first or second body), second body otherwise.bodyC
- position within the constellation of the body whose orbit will be propagated by
the propagator associated to this event detector.maxCheck
- maximum check (see AbstractDetector
)threshold
- convergence threshold (see AbstractDetector
)actionMin
- action to be perform when the expected local minimum is reached.actionMax
- action to be perform when the expected local maximum is reached.public ExtremaThreeBodiesAngleDetector(PVCoordinatesProvider bodyA, PVCoordinatesProvider bodyB, ExtremaThreeBodiesAngleDetector.BodyOrder bodyC, double maxCheck, double threshold, EventDetector.Action actionMin, EventDetector.Action actionMax, boolean removeMin, boolean removeMax)
Constructor for the min and max three bodies angle detector with specified action for both minimum and maximum. The orbit of one of the three bodies is implicitly the one which is propagated by the propagator associated to this event detector.
If v21 is the vector from the second body to the first body and v23 is the vector from the second body to the third body, the detected angle will be the angle (in the range 0-Π) between v21 and v23.
bodyA
- first body (if the body C is the second or third body), second body otherwise.bodyB
- third body (if the body C is the first or second body), second body otherwise.bodyC
- position within the constellation of the body whose orbit will be propagated by
the propagator associated to this event detector.maxCheck
- maximum check (see AbstractDetector
)threshold
- convergence threshold (see AbstractDetector
)actionMin
- action to be perform when the expected local minimum is reachedactionMax
- action to be perform when the expected local maximum is reachedremoveMin
- true if detector should be removed when the expected local minimum is
reachedremoveMax
- true if detector should be removed when the expected local maximum is
reachedpublic ExtremaThreeBodiesAngleDetector(PVCoordinatesProvider bodyA, PVCoordinatesProvider bodyB, ExtremaThreeBodiesAngleDetector.BodyOrder bodyC, int extremumType, double maxCheck, double threshold, EventDetector.Action action)
Constructor for the min and max three bodies angle detector with specified action when extrema is detected. The orbit of one of the three bodies is implicitly the one which is propagated by the propagator associated to this event detector.
If v21 is the vector from the second body to the first body and v23 is the vector from the second body to the third body, the detected angle will be the angle (in the range 0-Π) between v21 and v23.
bodyA
- first body (if the body C is the second or third body), second body otherwise.bodyB
- third body (if the body C is the first or second body), second body otherwise.bodyC
- position within the constellation of the body whose orbit will be propagated by
the propagator associated to this event detector.extremumType
- the extremum type : MIN
for
minimal angle detection, MAX
for maximal angle
detection or MIN_MAX
for both minimal and
maximal angle detectionmaxCheck
- maximum check (see AbstractDetector
)threshold
- convergence threshold (see AbstractDetector
)action
- action to be perform when the expected local maximum is reachedpublic ExtremaThreeBodiesAngleDetector(PVCoordinatesProvider bodyA, PVCoordinatesProvider bodyB, ExtremaThreeBodiesAngleDetector.BodyOrder bodyC, int extremumType, double maxCheck, double threshold, EventDetector.Action action, boolean remove)
Constructor for the min and max three bodies angle detector with specified action when extrema is detected. The orbit of one of the three bodies is implicitly the one which is propagated by the propagator associated to this event detector.
If v21 is the vector from the second body to the first body and v23 is the vector from the second body to the third body, the detected angle will be the angle (in the range 0-Π) between v21 and v23.
bodyA
- first body (if the body C is the second or third body), second body otherwisebodyB
- third body (if the body C is the first or second body), second body otherwisebodyC
- position within the constellation of the body whose orbit will be propagated by
the propagator associated to this event detectorextremumType
- the extremum type : MIN
for
minimal angle detection, MAX
for maximal angle
detection or MIN_MAX
for both minimal and
maximal angle detectionmaxCheck
- maximum check (see AbstractDetector
)threshold
- convergence threshold (see AbstractDetector
)action
- action to be perform when the expected local maximum is reachedremove
- true if detector should be removed when the expected extrema is reached.
NB : If remove is true, it means detector should be removed at detection, so the value
of attributes removeMIN and removeMAX must be decided according extremumType. Doing
it, we ensure that detector will be removed well at propagation when calling method
eventOccured (in which the value of attribute shouldBeRemoved is decided). In this
case, users should better create an ExtremaThreeBodiesAngleDetector with constructor
ExtremaThreeBodiesAngleDetector(PVCoordinatesProvider,
PVCoordinatesProvider, BodyOrder, double, double, EventDetector.Action, EventDetector.Action,
boolean, boolean)
.public ExtremaThreeBodiesAngleDetector(String firstBody, String secondBody, String thirdBody, double maxCheck, double threshold, EventDetector.Action actionMin, EventDetector.Action actionMax)
If v21 is the vector from the second body to the first body and v23 is the vector from the second body to the third body, the detected angle will be the angle (in the range 0-Π) between v21 and v23.
firstBody
- the body "1" idsecondBody
- the body "2" idthirdBody
- the body "3" idmaxCheck
- maximum check (see AbstractDetector
)threshold
- convergence threshold (see AbstractDetector
)actionMin
- action to be performed when the expected local minimum is reachedactionMax
- action to be performed when the expected local maximum is reachedpublic ExtremaThreeBodiesAngleDetector(String firstBody, String secondBody, String thirdBody, double maxCheck, double threshold, EventDetector.Action actionMin, EventDetector.Action actionMax, boolean removeMin, boolean removeMax)
If v21 is the vector from the second body to the first body and v23 is the vector from the second body to the third body, the detected angle will be the angle (in the range 0-Π) between v21 and v23.
firstBody
- the body "1" idsecondBody
- the body "2" idthirdBody
- the body "3" idmaxCheck
- maximum check (see AbstractDetector
)threshold
- convergence threshold (see AbstractDetector
)actionMin
- action to be performed when the expected local minimum is reachedactionMax
- action to be performed when the expected local maximum is reachedremoveMin
- true if detector should be removed when the expected local minimum is
reached.removeMax
- true if detector should be removed when the expected local maximum is
reached.public ExtremaThreeBodiesAngleDetector(String firstBody, String secondBody, String thirdBody, int extremumType, double maxCheck, double threshold, EventDetector.Action action)
If v21 is the vector from the second body to the first body and v23 is the vector from the second body to the third body, the detected angle will be the angle (in the range 0-Π) between v21 and v23.
firstBody
- the body "1" idsecondBody
- the body "2" idthirdBody
- the body "3" idextremumType
- MIN
for minimal angle detection,
MAX
for maximal angle detection or
MIN_MAX
for both minimal and maximal angle
detectionmaxCheck
- maximum check (see AbstractDetector
)threshold
- convergence threshold (see AbstractDetector
)action
- action to be performed when the expected extrema is reached.public ExtremaThreeBodiesAngleDetector(String firstBody, String secondBody, String thirdBody, int extremumType, double maxCheck, double threshold, EventDetector.Action action, boolean remove)
If v21 is the vector from the second body to the first body and v23 is the vector from the second body to the third body, the detected angle will be the angle (in the range 0-Π) between v21 and v23.
firstBody
- the body "1" idsecondBody
- the body "2" idthirdBody
- the body "3" idextremumType
- MIN
for minimal angle detection,
MAX
for maximal angle detection or
MIN_MAX
for both minimal and maximal angle
detectionmaxCheck
- maximum check (see AbstractDetector
)threshold
- convergence threshold (see AbstractDetector
)action
- action to be performed when the expected extrema is reached.remove
- true if detector should be removed when the expected extrema is reached.
NB : If remove is true, it means detector should be removed at detection, so the value
of attributes removeMIN and removeMAX must be decided according extremumType. Doing
it, we ensure that detector will be removed well at propagation when calling method
eventOccured (in which the value of attribute shouldBeRemoved is decided). In this
case, users should better create an ExtremaThreeBodiesAngleDetector with constructor
ExtremaThreeBodiesAngleDetector(String, String, String, double,
double, EventDetector.Action, EventDetector.Action, boolean, boolean)
public void init(SpacecraftState s0, AbsoluteDate t)
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.
init
in interface EventDetector
init
in class AbstractDetector
s0
- initial statet
- target time for the integrationpublic EventDetector.Action eventOccurred(SpacecraftState s, boolean increasing, boolean forward) throws PatriusException
The default implementation behavior is to stop
propagation when the angle is
reached.
eventOccurred
in interface EventDetector
eventOccurred
in class AbstractDetector
s
- the current state information : date, kinematics, attitudeincreasing
- if true, the value of the switching function increases when times increases
around eventforward
- if true, the integration variable (time) increases during integration.PatriusException
- if some specific error occurspublic double g(SpacecraftState state) throws PatriusException
g
in interface EventDetector
g
in class AbstractDetector
state
- the current state information: date, kinematics, attitude for forces and events
computation, mass provider, and additional statesPatriusException
- if some specific error occurspublic PVCoordinatesProvider getFirstBody()
public PVCoordinatesProvider getSecondBody()
public PVCoordinatesProvider getThirdBody()
public void init(Map<String,SpacecraftState> s0, AbsoluteDate t)
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.
init
in interface MultiEventDetector
s0
- map of initial statest
- target time for the integrationpublic double g(Map<String,SpacecraftState> s) throws PatriusException
This function must be continuous (at least in its roots neighborhood), as the integrator will need to find its roots to locate the events.
g
in interface MultiEventDetector
s
- the current states information: date, kinematics, attitudes for forces
and events computation, and additional states for each statesPatriusException
- if some specific error occurspublic EventDetector.Action eventOccurred(Map<String,SpacecraftState> s, boolean increasing, boolean forward) throws PatriusException
The scheduling between this method and the MultiOrekitStepHandler method handleStep is to call this method first
and handleStep
afterwards. This scheduling allows the propagator to pass true
as the
isLast
parameter to the step handler to make it aware the step will be the last one if this method
returns EventDetector.Action.STOP
. As the interpolator may be
used to navigate back throughout the last step MultiOrekitStepNormalizer does for example), user code called by
this method and user code called by step handlers may experience apparently out of order values of the
independent time variable. As an example, if the same user object implements both this MultiEventDetector
interface and the MultiOrekitFixedStepHandler interface, a forward integration may
call its eventOccurred
method with a state at 2000-01-01T00:00:10 first and call its
handleStep
method with a state at 2000-01-01T00:00:09 afterwards. Such out of order calls are
limited to the size of the integration step for MultiOrekitStepHandler and to the size of the fixed step for
MultiOrekitFixedStepHandler.
eventOccurred
in interface MultiEventDetector
s
- the current states information: date, kinematics, attitude for forces
and events computation, and additional states for each statesincreasing
- if true, the value of the switching function increases
when times increases around event (note that increase is measured with respect
to physical time, not with respect to propagation which may go backward in time)forward
- if true, the integration variable (time) increases during integration.EventDetector.Action.STOP
,
EventDetector.Action.RESET_STATE
,
EventDetector.Action.RESET_DERIVATIVES
,
EventDetector.Action.CONTINUE
PatriusException
- if some specific error occurspublic Map<String,SpacecraftState> resetStates(Map<String,SpacecraftState> oldStates) throws PatriusException
This method is called after the step handler has returned and before the next step is started, but only when
MultiEventDetector.eventOccurred(java.util.Map<java.lang.String, fr.cnes.sirius.patrius.propagation.SpacecraftState>, boolean, boolean)
has itself returned the
EventDetector.Action.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 the
MultiEventDetector.eventOccurred(java.util.Map<java.lang.String, fr.cnes.sirius.patrius.propagation.SpacecraftState>, boolean, boolean)
never returns the
EventDetector.Action.RESET_STATE
indicator, this function will
never be called, and it is safe to simply return null.
resetStates
in interface MultiEventDetector
oldStates
- old statesPatriusException
- if the states cannot be resetedpublic String getInSpacecraftId1()
public String getInSpacecraftId2()
public String getInSpacecraftId3()
public EventDetector copy()
The following attributes are not deeply copied:
PVCoordinatesProvider
PVCoordinatesProvider
PVCoordinatesProvider
copy
in interface EventDetector
public boolean filterEvent(Map<String,SpacecraftState> states, boolean increasing, boolean forward) throws PatriusException
This method is called right before #eventOccurred(SpacecraftState, boolean, boolean)
method.
This may be useful in order to filter some events in particular when angles are at stake (see for example
LocalTimeAngleDetector
).
filterEvent
in interface MultiEventDetector
states
- states at last event occurrenceincreasing
- if true, the value of the switching function increases when times increases
around event (note that increase is measured with respect to physical time, not with
respect to propagation which may go backward in time)forward
- if true, the integration variable (time) increases during integration.PatriusException
- thrown if computation failed for some reasonsCopyright © 2023 CNES. All rights reserved.