T
- type of the field elementspublic class FieldDateDetector<T extends org.hipparchus.CalculusFieldElement<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(Field, FieldTimeStamped...)
)addEventDate(FieldAbsoluteDate)
)The gap between the added dates must be more than the minGap.
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)
Modifier and Type | Field and Description |
---|---|
static double |
DEFAULT_MAX_CHECK
Default value for max check.
|
static double |
DEFAULT_MIN_GAP
Default value for minimum gap between added dates.
|
static double |
DEFAULT_THRESHOLD
Default value for convergence threshold.
|
DEFAULT_MAX_ITER, DEFAULT_MAXCHECK
Modifier | Constructor and Description |
---|---|
|
FieldDateDetector(org.hipparchus.Field<T> field,
FieldTimeStamped<T>... dates)
Build a new instance.
|
protected |
FieldDateDetector(FieldAdaptableInterval<T> maxCheck,
T threshold,
int maxIter,
FieldEventHandler<T> handler,
double minGap,
FieldTimeStamped<T>... dates)
Protected constructor with full parameters.
|
Modifier and Type | Method and Description |
---|---|
void |
addEventDate(FieldAbsoluteDate<T> target)
Add an event date.
|
protected FieldDateDetector<T> |
create(FieldAdaptableInterval<T> newMaxCheck,
T newThreshold,
int newMaxIter,
FieldEventHandler<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.
|
List<FieldTimeStamped<T>> |
getDates()
Get all event field dates currently managed, in chronological order.
|
FieldDateDetector<T> |
withMinGap(double newMinGap)
Setup minimum gap between added dates.
|
getHandler, getMaxCheckInterval, getMaxIterationCount, getThreshold, init, isForward, withHandler, withMaxCheck, withMaxCheck, withMaxIter, withThreshold
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
durationFrom
public static final double DEFAULT_MAX_CHECK
public static final double DEFAULT_MIN_GAP
public static final double DEFAULT_THRESHOLD
@SafeVarargs public FieldDateDetector(org.hipparchus.Field<T> field, FieldTimeStamped<T>... dates)
First event dates are set here, but others can be
added later with addEventDate(FieldAbsoluteDate)
.
field
- field to which dates belongdates
- list of event datesaddEventDate(FieldAbsoluteDate)
@SafeVarargs protected FieldDateDetector(FieldAdaptableInterval<T> maxCheck, T threshold, int maxIter, FieldEventHandler<T> handler, double minGap, FieldTimeStamped<T>... dates)
This constructor is not public as users are expected to use the builder
API with the various withXxx()
methods to set up the instance
in a readable manner without using a huge amount of parameters.
maxCheck
- maximum checking intervalthreshold
- convergence threshold (s)maxIter
- maximum number of iterations in the event time searchhandler
- event handler to call at event occurrencesminGap
- minimum gap between added dates (s)dates
- list of event datespublic FieldDateDetector<T> withMinGap(double newMinGap)
newMinGap
- new minimum gap between added datesprotected FieldDateDetector<T> create(FieldAdaptableInterval<T> newMaxCheck, T newThreshold, int newMaxIter, FieldEventHandler<T> newHandler)
create
in class FieldAbstractDetector<FieldDateDetector<T extends org.hipparchus.CalculusFieldElement<T>>,T extends org.hipparchus.CalculusFieldElement<T>>
newMaxCheck
- maximum checking intervalnewThreshold
- convergence threshold (s)newMaxIter
- maximum number of iterations in the event time searchnewHandler
- event handler to call at event occurrencespublic List<FieldTimeStamped<T>> getDates()
public T g(FieldSpacecraftState<T> s)
g
in interface FieldEventDetector<T extends org.hipparchus.CalculusFieldElement<T>>
g
in class FieldAbstractDetector<FieldDateDetector<T extends org.hipparchus.CalculusFieldElement<T>>,T extends org.hipparchus.CalculusFieldElement<T>>
s
- the current state information: date, kinematics, attitudepublic FieldAbsoluteDate<T> getDate()
getDate
in interface FieldTimeStamped<T extends org.hipparchus.CalculusFieldElement<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(Field, FieldTimeStamped...)
Copyright © 2002-2023 CS GROUP. All rights reserved.