public final class CodedEventsLogger extends Object
This class logs coded events during propagation. It is based on the EventsLogger
class in Orekit.
This class works by wrapping user-provided CodingEventDetector
before they are registered to the propagator.
The wrapper monitors the calls to eventOccurred
and store the corresponding events as CodedEventsLogger.LoggedCodedEvent
instances. After propagation is
complete, the user can retrieve all the events that have occurred at once by calling methods
getCodedEventsList()
or getLoggedCodedEventSet()
.
EventsLogger
,
CodingEventDetector
Modifier and Type | Class and Description |
---|---|
static class |
CodedEventsLogger.LoggedCodedEvent
This class is used to store the coded event with contextual information.
|
Constructor and Description |
---|
CodedEventsLogger()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
Map<CodingEventDetector,CodedEventsList> |
buildCodedEventListMap()
Builds a map of
CodedEventsList , one list per CodingEventDetector instance. |
Map<CodingEventDetector,PhenomenaList> |
buildPhenomenaListMap(AbsoluteDateInterval definitionInterval,
SpacecraftState duringState)
Builds a map of
PhenomenaList , one list per CodingEventDetector instance. |
CodedEventsList |
getCodedEventsList()
Gets the
CodedEventsList . |
SortedSet<CodedEventsLogger.LoggedCodedEvent> |
getLoggedCodedEventSet()
Returns an unmodifiable view on the set of
CodedEventsLogger.LoggedCodedEvent , sorted by date. |
EventDetector |
monitorDetector(CodingEventDetector detector)
Takes a
CodingEventDetector instance and returns an EventDetector instance that will trigger this
CodedEventsLogger every time eventOccurred is called. |
public EventDetector monitorDetector(CodingEventDetector detector)
CodingEventDetector
instance and returns an EventDetector
instance that will trigger this
CodedEventsLogger
every time eventOccurred
is called. The returned EventDetector
is meant to be provided to a propagator.detector
- the wrapped CodingEventDetector
EventDetector
.public CodedEventsList getCodedEventsList()
CodedEventsList
. This method can be called after propagation to get the list of detected events.CodedEventsList
.public SortedSet<CodedEventsLogger.LoggedCodedEvent> getLoggedCodedEventSet()
CodedEventsLogger.LoggedCodedEvent
, sorted by date.public Map<CodingEventDetector,CodedEventsList> buildCodedEventListMap()
CodedEventsList
, one list per CodingEventDetector
instance.
The map may be empty if no CodingEventDetector
was added to the logger.
CodingEventDetector
was added.public Map<CodingEventDetector,PhenomenaList> buildPhenomenaListMap(AbsoluteDateInterval definitionInterval, SpacecraftState duringState) throws PatriusException
PhenomenaList
, one list per CodingEventDetector
instance.
The map may be empty if no CodingEventDetector
was added to the logger.
definitionInterval
- an AbsoluteDateInterval
. May be null; if not, is used to position uncertain boundaries on a
Phenomenon.duringState
- a SpacecraftState
. May be null; if not, is used to compute a Phenomenon when no event has
occurred.CodingEventDetector
handling phenomena was added.PatriusException
- if a problem occurs when g is called with the duringState parameter.Copyright © 2019 CNES. All rights reserved.