|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.orekit.propagation.events.AbstractDetector
org.orekit.propagation.events.ThreeBodiesAngleDetector
public class ThreeBodiesAngleDetector
Detects when the angle between three bodies is equal to a predetermined value.
If body1, body2 and body3 are the three bodies, the detector computes the angle between the two vectors v21 (vector from body2 to body1) and v23 (vector from body2 to body3), and compare it with the threshold angle value.
The default implementation behavior is to stop
propagation when the angle between
the three bodies is reached. This can be changed by using provided constructors.
EventDetector
,
Serialized FormNested Class Summary | |
---|---|
static class |
ThreeBodiesAngleDetector.BodyOrder
Bodies order type. |
Nested classes/interfaces inherited from interface org.orekit.propagation.events.EventDetector |
---|
EventDetector.Action |
Field Summary |
---|
Fields inherited from class org.orekit.propagation.events.AbstractDetector |
---|
DEFAULT_MAXCHECK, DEFAULT_THRESHOLD |
Fields inherited from interface org.orekit.propagation.events.multi.MultiEventDetector |
---|
DECREASING, INCREASING, INCREASING_DECREASING |
Fields inherited from interface org.orekit.propagation.events.EventDetector |
---|
DECREASING, INCREASING, INCREASING_DECREASING |
Constructor Summary | |
---|---|
ThreeBodiesAngleDetector(PVCoordinatesProvider firstBody,
PVCoordinatesProvider secondBody,
PVCoordinatesProvider thirdBody,
double angle)
Build a new three bodies angle detector. |
|
ThreeBodiesAngleDetector(PVCoordinatesProvider firstBody,
PVCoordinatesProvider secondBody,
PVCoordinatesProvider thirdBody,
double angle,
double maxCheck,
double threshold)
Build a new three bodies angle detector with complimentary parameters. |
|
ThreeBodiesAngleDetector(PVCoordinatesProvider firstBody,
PVCoordinatesProvider secondBody,
PVCoordinatesProvider thirdBody,
double angle,
double maxCheck,
double threshold,
EventDetector.Action action)
Build a new three bodies angle detector with complimentary parameters. |
|
ThreeBodiesAngleDetector(PVCoordinatesProvider bodyA,
PVCoordinatesProvider bodyB,
ThreeBodiesAngleDetector.BodyOrder bodyC,
double angle)
Build a new three bodies angle detector with a position among the parameters. |
|
ThreeBodiesAngleDetector(PVCoordinatesProvider bodyA,
PVCoordinatesProvider bodyB,
ThreeBodiesAngleDetector.BodyOrder bodyC,
double angle,
double maxCheck,
double threshold)
Build a new three bodies angle detector with complimentary parameters. |
|
ThreeBodiesAngleDetector(PVCoordinatesProvider bodyA,
PVCoordinatesProvider bodyB,
ThreeBodiesAngleDetector.BodyOrder bodyC,
double angle,
double maxCheck,
double threshold,
EventDetector.Action action)
Build a new three bodies angle detector with complimentary parameters. |
|
ThreeBodiesAngleDetector(PVCoordinatesProvider bodyA,
PVCoordinatesProvider bodyB,
ThreeBodiesAngleDetector.BodyOrder bodyC,
double angle,
double maxCheck,
double threshold,
EventDetector.Action action,
boolean remove)
Build a new three bodies angle detector with complimentary parameters. |
|
ThreeBodiesAngleDetector(String firstId,
String secondId,
String thirdId,
double angle,
double maxCheck,
double threshold,
EventDetector.Action action)
Build a new three bodies angle detector. |
Method Summary | |
---|---|
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 an angle event and choose what to do next. |
double |
g(Map<String,SpacecraftState> s)
Compute the value of the switching function. |
double |
g(SpacecraftState s)
Compute the value of the switching function. |
double |
getAlignmentAngle()
Get the alignment angle. |
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. |
boolean |
shouldBeRemoved()
This method is called after EventDetector.eventOccurred(org.orekit.propagation.SpacecraftState, boolean, boolean) has been triggered. |
Methods inherited from class org.orekit.propagation.events.AbstractDetector |
---|
getMaxCheckInterval, getMaxIterationCount, getSlopeSelection, getThreshold, resetState |
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.multi.MultiEventDetector |
---|
getMaxCheckInterval, getMaxIterationCount, getSlopeSelection, getThreshold |
Constructor Detail |
---|
public ThreeBodiesAngleDetector(PVCoordinatesProvider firstBody, PVCoordinatesProvider secondBody, PVCoordinatesProvider thirdBody, double angle)
Propagator
).
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 first bodysecondBody
- the second bodythirdBody
- the third bodyangle
- angle in rad triggering the event.public ThreeBodiesAngleDetector(PVCoordinatesProvider firstBody, PVCoordinatesProvider secondBody, PVCoordinatesProvider thirdBody, double angle, double maxCheck, double threshold)
Propagator
).
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 angle is
reached.
firstBody
- the first bodysecondBody
- the second bodythirdBody
- the third bodyangle
- angle in rad triggering the event.maxCheck
- maximum check (see AbstractDetector
)threshold
- convergence threshold (see AbstractDetector
)public ThreeBodiesAngleDetector(PVCoordinatesProvider firstBody, PVCoordinatesProvider secondBody, PVCoordinatesProvider thirdBody, double angle, double maxCheck, double threshold, EventDetector.Action action)
Propagator
).
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 first bodysecondBody
- the second bodythirdBody
- the third bodyangle
- angle in rad triggering the event.maxCheck
- maximum check (see AbstractDetector
)threshold
- convergence threshold (see AbstractDetector
)action
- action performed at angle detectionpublic ThreeBodiesAngleDetector(PVCoordinatesProvider bodyA, PVCoordinatesProvider bodyB, ThreeBodiesAngleDetector.BodyOrder bodyC, double angle)
Propagator
).
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 detectorangle
- angle in rad triggering the event.public ThreeBodiesAngleDetector(PVCoordinatesProvider bodyA, PVCoordinatesProvider bodyB, ThreeBodiesAngleDetector.BodyOrder bodyC, double angle, double maxCheck, double threshold)
Propagator
). 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.
The default implementation behavior is to stop
propagation when the angle is
reached.
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 detectorangle
- angle in rad triggering the event.maxCheck
- maximum check (see AbstractDetector
)threshold
- convergence threshold (see AbstractDetector
)public ThreeBodiesAngleDetector(PVCoordinatesProvider bodyA, PVCoordinatesProvider bodyB, ThreeBodiesAngleDetector.BodyOrder bodyC, double angle, double maxCheck, double threshold, EventDetector.Action action)
Propagator
). 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 detectorangle
- angle in rad triggering the event.maxCheck
- maximum check (see AbstractDetector
)threshold
- convergence threshold (see AbstractDetector
)action
- action performed at angle detectionpublic ThreeBodiesAngleDetector(PVCoordinatesProvider bodyA, PVCoordinatesProvider bodyB, ThreeBodiesAngleDetector.BodyOrder bodyC, double angle, double maxCheck, double threshold, EventDetector.Action action, boolean remove)
Propagator
). 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 detectorangle
- angle in rad triggering the event.maxCheck
- maximum check (see AbstractDetector
)threshold
- convergence threshold (see AbstractDetector
)action
- action performed at angle detectionremove
- true if detector should be removed at angle detectionpublic ThreeBodiesAngleDetector(String firstId, String secondId, String thirdId, double angle, 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.
firstId
- first body (if the body C is the second or third body), second body otherwisesecondId
- third body (if the body C is the first or second body), second body otherwisethirdId
- position within the constellation of the body whose orbit will be propagated by the propagator
associated to this event detectorangle
- angle in rad triggering the event.maxCheck
- maximum check (see AbstractDetector
)threshold
- convergence threshold (see AbstractDetector
)action
- action performed at angle detectionMethod Detail |
---|
public EventDetector.Action eventOccurred(SpacecraftState s, boolean increasing, boolean forward) throws OrekitException
eventOccurred
in interface EventDetector
eventOccurred
in class AbstractDetector
s
- the current state informationincreasing
- if true, the value of the switching function increases when times increases around eventforward
- if true, the integration variable (time) increases during integration
OrekitException
- if some specific error occurspublic boolean shouldBeRemoved()
EventDetector.eventOccurred(org.orekit.propagation.SpacecraftState, boolean, boolean)
has been triggered.
It returns true if the current detector should be removed after first event detection.
WARNING: this method can be called only once a event has been triggered. Before,
the value is not available.
shouldBeRemoved
in interface EventDetector
shouldBeRemoved
in interface MultiEventDetector
shouldBeRemoved
in class AbstractDetector
public double g(SpacecraftState s) throws OrekitException
g
in interface EventDetector
g
in class AbstractDetector
s
- the current state information
OrekitException
- if some specific error occurspublic void init(SpacecraftState s0, AbsoluteDate t)
AbstractDetector
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 PVCoordinatesProvider getFirstBody()
public PVCoordinatesProvider getSecondBody()
public PVCoordinatesProvider getThirdBody()
public double getAlignmentAngle()
public void init(Map<String,SpacecraftState> s0, AbsoluteDate t)
MultiEventDetector
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 OrekitException
MultiEventDetector
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 states
OrekitException
- if some specific error occurspublic EventDetector.Action eventOccurred(Map<String,SpacecraftState> s, boolean increasing, boolean forward) throws OrekitException
MultiEventDetector
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
OrekitException
- if some specific error occurspublic Map<String,SpacecraftState> resetStates(Map<String,SpacecraftState> oldStates) throws OrekitException
MultiEventDetector
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
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
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 states
OrekitException
- if the states cannot be resetedpublic String getInSpacecraftId1()
public String getInSpacecraftId2()
public String getInSpacecraftId3()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |