|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.orekit.propagation.events.AbstractDetector org.orekit.propagation.events.DateDetector
public class DateDetector
Finder for date events.
This class finds date events (i.e. occurrence of some predefined dates).
As of version 5.1, it is an enhanced date detector:
DateDetector(double,double)
)addEventDate(AbsoluteDate)
)The gap between the added dates must be more than the maxCheck.
The default implementation behavior is to stop
propagation at the first event date occurrence. This can be changed by
using provided constructors.
Propagator.addEventDetector(EventDetector)
,
Serialized FormNested Class Summary |
---|
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.EventDetector |
---|
DECREASING, INCREASING, INCREASING_DECREASING |
Constructor Summary | |
---|---|
DateDetector(AbsoluteDate target)
Build a new instance. |
|
DateDetector(AbsoluteDate target,
double maxCheck,
double threshold)
Build a new instance. |
|
DateDetector(AbsoluteDate target,
double maxCheck,
double threshold,
EventDetector.Action action)
Build a new instance. |
|
DateDetector(AbsoluteDate target,
double maxCheck,
double threshold,
EventDetector.Action action,
boolean remove)
Build a new instance. |
|
DateDetector(double maxCheck,
double threshold)
Build a new instance. |
|
DateDetector(double maxCheck,
double threshold,
EventDetector.Action action)
Build a new instance. |
|
DateDetector(double maxCheck,
double threshold,
EventDetector.Action action,
boolean remove)
Build a new instance. |
Method Summary | |
---|---|
void |
addEventDate(AbsoluteDate target)
Add an event date. |
EventDetector.Action |
eventOccurred(SpacecraftState s,
boolean increasing,
boolean forward)
Handle a date event and choose what to do next. |
double |
g(SpacecraftState s)
Compute the value of the switching function. |
AbsoluteDate |
getDate()
Get the current event date according to the propagator. |
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, init, resetState |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DateDetector(double maxCheck, double threshold)
This constructor is dedicated to date detection when the event date is not known before propagating. It can be triggered later by adding some event date, it then acts like a timer.
The default implementation behavior is to stop
propagation at date occurrence.
maxCheck
- maximum checking interval (s)threshold
- convergence threshold (s)addEventDate(AbsoluteDate)
public DateDetector(double maxCheck, double threshold, EventDetector.Action action)
This constructor is dedicated to date detection when the event date is not known before propagating. It can be triggered later by adding some event date, it then acts like a timer.
maxCheck
- maximum checking interval (s)threshold
- convergence threshold (s)action
- action performed at date detectionaddEventDate(AbsoluteDate)
public DateDetector(double maxCheck, double threshold, EventDetector.Action action, boolean remove)
This constructor is dedicated to date detection when the event date is not known before propagating. It can be triggered later by adding some event date, it then acts like a timer.
maxCheck
- maximum checking interval (s)threshold
- convergence threshold (s)action
- action performed at date detectionremove
- true if detector should be removed after first detectionaddEventDate(AbsoluteDate)
public DateDetector(AbsoluteDate target, double maxCheck, double threshold)
First event date is set here, but others can be
added later with addEventDate(AbsoluteDate)
.
The default implementation behavior is to stop
propagation at date occurrence.
target
- target datemaxCheck
- maximum checking interval (s)threshold
- convergence threshold (s)addEventDate(AbsoluteDate)
public DateDetector(AbsoluteDate target, double maxCheck, double threshold, EventDetector.Action action)
First event date is set here, but others can be
added later with addEventDate(AbsoluteDate)
.
target
- target datemaxCheck
- maximum checking interval (s)threshold
- convergence threshold (s)action
- action performed at date detectionaddEventDate(AbsoluteDate)
public DateDetector(AbsoluteDate target, double maxCheck, double threshold, EventDetector.Action action, boolean remove)
First event date is set here, but others can be
added later with addEventDate(AbsoluteDate)
.
target
- target datemaxCheck
- maximum checking interval (s)threshold
- convergence threshold (s)action
- action performed at date detectionremove
- true if detector should be removed after first detectionaddEventDate(AbsoluteDate)
public DateDetector(AbsoluteDate target)
This constructor is dedicated to single date detection. MaxCheck is set to 10.e9, so almost no other date can be added. Tolerance is set to 10.e-10.
target
- target dateaddEventDate(AbsoluteDate)
Method 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 information : date, kinematics, attitudeincreasing
- the way of the switching function is not guaranted
as it can change according to the added event datesforward
- 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 class AbstractDetector
public double g(SpacecraftState s) throws OrekitException
g
in interface EventDetector
g
in class AbstractDetector
s
- the current state information: date, kinematics, attitude
OrekitException
- if some specific error occurspublic AbsoluteDate getDate()
getDate
in interface TimeStamped
public void addEventDate(AbsoluteDate target) throws IllegalArgumentException
The date to add must be:
target
- target date
IllegalArgumentException
- if the date is too close from already defined intervalDateDetector(double, double)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |