Serializable, EventDetector, TimeStampedpublic class DateDetector extends AbstractDetector<DateDetector> implements TimeStamped
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, TimeStamped...))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 calling
AbstractDetector.withHandler(EventHandler) after construction.
Propagator.addEventDetector(EventDetector),
Serialized FormDEFAULT_MAX_ITER, DEFAULT_MAXCHECK, DEFAULT_THRESHOLD| Constructor | Description |
|---|---|
DateDetector(double maxCheck,
double threshold,
TimeStamped... dates) |
Build a new instance.
|
DateDetector(AbsoluteDate target) |
Build a new instance.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
addEventDate(AbsoluteDate target) |
Add an event date.
|
protected DateDetector |
create(double newMaxCheck,
double newThreshold,
int newMaxIter,
EventHandler<? super DateDetector> newHandler) |
Build a new instance.
|
double |
g(SpacecraftState s) |
Compute the value of the switching function.
|
AbsoluteDate |
getDate() |
Get the current event date according to the propagator.
|
eventOccurred, getHandler, getMaxCheckInterval, getMaxIterationCount, getThreshold, init, isForward, resetState, withHandler, withMaxCheck, withMaxIter, withThresholdpublic DateDetector(double maxCheck,
double threshold,
TimeStamped... dates)
First event dates are set here, but others can be
added later with addEventDate(AbsoluteDate).
maxCheck - maximum checking interval (s)threshold - convergence threshold (s)dates - list of event datesaddEventDate(AbsoluteDate)public DateDetector(AbsoluteDate target)
This constructor is dedicated to single date detection.
max check interval is set to 1.0e10, so almost
no other date can be added. Tolerance is set to 1.0e-9.
target - target dateaddEventDate(AbsoluteDate)protected DateDetector create(double newMaxCheck, double newThreshold, int newMaxIter, EventHandler<? super DateDetector> newHandler)
create in class AbstractDetector<DateDetector>newMaxCheck - maximum checking interval (s)newThreshold - convergence threshold (s)newMaxIter - maximum number of iterations in the event time searchnewHandler - event handler to call at event occurrencespublic double g(SpacecraftState s) throws OrekitException
g in interface EventDetectorg in class AbstractDetector<DateDetector>s - the current state information: date, kinematics, attitudeOrekitException - if some specific error occurspublic AbsoluteDate getDate()
getDate in interface TimeStampedpublic void addEventDate(AbsoluteDate target) throws IllegalArgumentException
The date to add must be:
target - target dateIllegalArgumentException - if the date is too close from already defined intervalDateDetector(double, double, TimeStamped...)Copyright © 2002-2018 CS Systèmes d'information. All rights reserved.