public class FieldDateDetector<T extends RealFieldElement<T>> extends FieldAbstractDetector<FieldDateDetector<T>,T> implements FieldTimeStamped<T>
This class finds date events (i.e. occurrence of some predefined dates).
As of version 5.1, it is an enhanced date detector:
FieldDateDetector(RealFieldElement, RealFieldElement, FieldTimeStamped...)
)addEventDate(FieldAbsoluteDate)
)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
FieldAbstractDetector.withHandler(FieldEventHandler)
after construction.
FieldPropagator.addEventDetector(FieldEventDetector)
DEFAULT_MAX_ITER, DEFAULT_MAXCHECK, DEFAULT_THRESHOLD
Constructor and Description |
---|
FieldDateDetector(FieldAbsoluteDate<T> target)
Build a new instance.
|
FieldDateDetector(T maxCheck,
T threshold,
FieldTimeStamped<T>... dates)
Build a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addEventDate(FieldAbsoluteDate<T> target)
Add an event date.
|
protected FieldDateDetector<T> |
create(T newMaxCheck,
T newThreshold,
int newMaxIter,
FieldEventHandler<? super FieldDateDetector<T>,T> newHandler)
Build a new instance.
|
T |
g(FieldSpacecraftState<T> s)
Compute the value of the switching function.
|
FieldAbsoluteDate<T> |
getDate()
Get the current event date according to the propagator.
|
eventOccurred, getHandler, getMaxCheckInterval, getMaxIterationCount, getThreshold, init, isForward, resetState, withHandler, withMaxCheck, withMaxIter, withThreshold
@SafeVarargs public FieldDateDetector(T maxCheck, T threshold, FieldTimeStamped<T>... dates)
First event dates are set here, but others can be
added later with addEventDate(FieldAbsoluteDate)
.
maxCheck
- maximum checking interval (s)threshold
- convergence threshold (s)dates
- list of event datesaddEventDate(FieldAbsoluteDate)
public FieldDateDetector(FieldAbsoluteDate<T> 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(FieldAbsoluteDate)
protected FieldDateDetector<T> create(T newMaxCheck, T newThreshold, int newMaxIter, FieldEventHandler<? super FieldDateDetector<T>,T> newHandler)
create
in class FieldAbstractDetector<FieldDateDetector<T extends RealFieldElement<T>>,T extends RealFieldElement<T>>
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 T g(FieldSpacecraftState<T> s)
g
in interface FieldEventDetector<T extends RealFieldElement<T>>
g
in class FieldAbstractDetector<FieldDateDetector<T extends RealFieldElement<T>>,T extends RealFieldElement<T>>
s
- the current state information: date, kinematics, attitudepublic FieldAbsoluteDate<T> getDate()
getDate
in interface FieldTimeStamped<T extends RealFieldElement<T>>
public void addEventDate(FieldAbsoluteDate<T> target) throws IllegalArgumentException
The date to add must be:
target
- target dateIllegalArgumentException
- if the date is too close from already defined intervalFieldDateDetector(RealFieldElement, RealFieldElement, FieldTimeStamped...)
Copyright © 2002-2020 CS GROUP. All rights reserved.