Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Orekit
Orekit
Commits
0c8f72e0
Commit
0c8f72e0
authored
Jan 13, 2023
by
Luc Maisonobe
Browse files
Fixed build error.
parent
b08b9537
Pipeline
#2918
failed with stages
in 14 minutes and 1 second
Changes
13
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/orekit/propagation/events/EventDetector.java
View file @
0c8f72e0
...
...
@@ -35,8 +35,9 @@ import org.orekit.time.AbsoluteDate;
* boundaries.</p>
*
* <p>When step ends exactly at a switching function sign change, the corresponding
* event is triggered, by calling the {@link #eventOccurred(SpacecraftState, boolean)}
* method. The method can do whatever it needs with the event (logging it, performing
* event is triggered, by calling the {@link EventHandler#eventOccurred(SpacecraftState,
* EventDetector, boolean) eventOccurred} method from the associated {@link #getHandler() handler}.
* The method can do whatever it needs with the event (logging it, performing
* some processing, ignore it ...). The return value of the method will be used by
* the propagator to stop or resume propagation, possibly changing the state vector.<p>
*
...
...
src/main/java/org/orekit/propagation/events/EventEnablingPredicateFilter.java
View file @
0c8f72e0
...
...
@@ -44,7 +44,7 @@ import org.orekit.time.AbsoluteDate;
* in order to avoid wasting time looking for uninteresting events.
* The wrapper will intercept the calls to the {@link
* EventDetector#g(SpacecraftState) g function} and to the {@link
* Event
Detecto
r#eventOccurred(SpacecraftState, boolean)
* Event
Handle
r#eventOccurred(SpacecraftState,
EventDetector,
boolean)
* eventOccurred} method in order to ignore uninteresting events. The
* wrapped regular {@link EventDetector event detector} will the see only
* the interesting events, i.e. either only events that occur when a
...
...
src/main/java/org/orekit/propagation/events/EventShifter.java
View file @
0c8f72e0
...
...
@@ -34,7 +34,6 @@ import org.orekit.time.AbsoluteDate;
* and a negative times shift for decreasing events (eclipse entry).</p>
* @see org.orekit.propagation.Propagator#addEventDetector(EventDetector)
* @see EventDetector
* @param <T> class type for the generic version
* @author Luc Maisonobe
*/
public
class
EventShifter
extends
AbstractDetector
<
EventShifter
>
{
...
...
@@ -55,14 +54,14 @@ public class EventShifter extends AbstractDetector<EventShifter> {
* <p>The {@link #getMaxCheckInterval() max check interval}, the
* {@link #getThreshold() convergence threshold} of the raw unshifted
* events will be used for the shifted event. When an event occurs,
* the {@link #eventOccurred(SpacecraftState, boolean) eventOccurred}
* the {@link
EventHandler
#eventOccurred(SpacecraftState,
EventDetector,
boolean) eventOccurred}
* method of the raw unshifted events will be called (with spacecraft
* state at either the shifted or the unshifted event date depending
* on the <code>useShiftedStates</code> parameter).</p>
* @param detector event detector for the raw unshifted event
* @param useShiftedStates if true, the state provided to {@link
* #eventOccurred(SpacecraftState, boolean) eventOccurred} method of
* the
<code>detector</code>
will remain shifted, otherwise it will
*
EventHandler
#eventOccurred(SpacecraftState,
EventDetector,
boolean) eventOccurred} method of
* the
associated {@code handler}
will remain shifted, otherwise it will
* be <i>unshifted</i> to correspond to the underlying raw event.
* @param increasingTimeShift increasing events time shift.
* @param decreasingTimeShift decreasing events time shift.
...
...
@@ -86,7 +85,7 @@ public class EventShifter extends AbstractDetector<EventShifter> {
* @param handler event handler to call at event occurrences
* @param detector event detector for the raw unshifted event
* @param useShiftedStates if true, the state provided to {@link
* #eventOccurred(SpacecraftState, boolean) eventOccurred} method of
*
EventHandler
#eventOccurred(SpacecraftState,
EventDetector,
boolean) eventOccurred} method of
* the <code>detector</code> will remain shifted, otherwise it will
* be <i>unshifted</i> to correspond to the underlying raw event.
* @param increasingTimeShift increasing events time shift.
...
...
src/main/java/org/orekit/propagation/events/EventSlopeFilter.java
View file @
0c8f72e0
...
...
@@ -52,7 +52,7 @@ import org.orekit.time.AbsoluteDate;
* in order to avoid wasting time looking for uninteresting events.
* The wrapper will intercept the calls to the {@link
* EventDetector#g(SpacecraftState) g function} and to the {@link
* Event
Detecto
r#eventOccurred(SpacecraftState, boolean)
* Event
Handle
r#eventOccurred(SpacecraftState,
EventDetector,
boolean)
* eventOccurred} method in order to ignore uninteresting events. The
* wrapped regular {@link EventDetector event detector} will then see only
* the interesting events, i.e. either only {@code increasing} events or
...
...
src/main/java/org/orekit/propagation/events/EventState.java
View file @
0c8f72e0
...
...
@@ -489,7 +489,7 @@ public class EventState<T extends EventDetector> {
/**
* Notify the user's listener of the event. The event occurs wholly within this method
* call including a call to {@link Event
Detecto
r#resetState(SpacecraftState)}
* call including a call to {@link Event
Handle
r#resetState(
EventDetector,
SpacecraftState)}
* if necessary.
*
* @param state the state at the time of the event. This must be at the same time as
...
...
src/main/java/org/orekit/propagation/events/EventsLogger.java
View file @
0c8f72e0
...
...
@@ -29,7 +29,7 @@ import org.orekit.time.TimeStamped;
*
* <p>As {@link EventDetector events detectors} are triggered during
* orbit propagation, an event specific {@link
* Event
Detecto
r#eventOccurred(SpacecraftState, boolean) eventOccurred}
* Event
Handle
r#eventOccurred(SpacecraftState,
EventDetector,
boolean) eventOccurred}
* method is called. This class can be used to add a global logging
* feature registering all events with their corresponding states in
* a chronological sequence (or reverse-chronological if propagation
...
...
@@ -37,7 +37,7 @@ import org.orekit.time.TimeStamped;
* <p>This class works by wrapping user-provided {@link EventDetector
* events detectors} before they are registered to the propagator. The
* wrapper monitor the calls to {@link
* Event
Detecto
r#eventOccurred(SpacecraftState, boolean) eventOccurred}
* Event
Handle
r#eventOccurred(SpacecraftState,
EventDetector,
boolean) eventOccurred}
* and store the corresponding events as {@link LoggedEvent} instances.
* After propagation is complete, the user can retrieve all the events
* that have occurred at once by calling method {@link #getLoggedEvents()}.</p>
...
...
@@ -141,7 +141,7 @@ public class EventsLogger {
/** Get the triggering state.
* @return triggering state
* @see Event
Detecto
r#eventOccurred(SpacecraftState, boolean)
* @see Event
Handle
r#eventOccurred(SpacecraftState,
EventDetector,
boolean)
*/
public
SpacecraftState
getState
()
{
return
state
;
...
...
@@ -149,7 +149,7 @@ public class EventsLogger {
/** Get the Increasing/decreasing status of the event.
* @return increasing/decreasing status of the event
* @see Event
Detecto
r#eventOccurred(SpacecraftState, boolean)
* @see Event
Handle
r#eventOccurred(SpacecraftState,
EventDetector,
boolean)
*/
public
boolean
isIncreasing
()
{
return
increasing
;
...
...
src/main/java/org/orekit/propagation/events/FieldAbstractDetector.java
View file @
0c8f72e0
...
...
@@ -17,7 +17,6 @@
package
org.orekit.propagation.events
;
import
org.hipparchus.CalculusFieldElement
;
import
org.hipparchus.ode.events.Action
;
import
org.orekit.errors.OrekitException
;
import
org.orekit.errors.OrekitMessages
;
import
org.orekit.propagation.FieldSpacecraftState
;
...
...
@@ -167,20 +166,6 @@ public abstract class FieldAbstractDetector<D extends FieldAbstractDetector<D, T
return
handler
;
}
/** {@inheritDoc} */
public
Action
eventOccurred
(
final
FieldSpacecraftState
<
T
>
s
,
final
boolean
increasing
)
{
@SuppressWarnings
(
"unchecked"
)
final
Action
whatNext
=
getHandler
().
eventOccurred
(
s
,
(
D
)
this
,
increasing
);
return
whatNext
;
}
/** {@inheritDoc} */
public
FieldSpacecraftState
<
T
>
resetState
(
final
FieldSpacecraftState
<
T
>
oldState
)
{
@SuppressWarnings
(
"unchecked"
)
final
FieldSpacecraftState
<
T
>
newState
=
getHandler
().
resetState
((
D
)
this
,
oldState
);
return
newState
;
}
/** Build a new instance.
* @param newMaxCheck maximum checking interval (s)
* @param newThreshold convergence threshold (s)
...
...
src/main/java/org/orekit/propagation/events/FieldEventDetector.java
View file @
0c8f72e0
...
...
@@ -36,9 +36,10 @@ import org.orekit.time.FieldAbsoluteDate;
* boundaries.</p>
*
* <p>When step ends exactly at a switching function sign change, the corresponding
* event is triggered, by calling the {@link #eventOccurred(FieldSpacecraftState, boolean)}
* method. The method can do whatever it needs with the event (logging it, performing
* some processing, ignore it ...). The return value of the method will be used by
* event is triggered, by calling thethe {@link FieldEventHandler#eventOccurred(FieldSpacecraftState,
* FieldEventDetector, boolean) eventOccurred} method from the associated
* {@link #getHandler() handler}. The method can do whatever it needs with the event (logging it,
* performing some processing, ignore it ...). The return value of the method will be used by
* the propagator to stop or resume propagation, possibly changing the state vector.<p>
*
* @param <T> type of the field element
...
...
src/main/java/org/orekit/propagation/events/FieldEventState.java
View file @
0c8f72e0
...
...
@@ -496,8 +496,8 @@ public class FieldEventState<D extends FieldEventDetector<T>, T extends Calculus
/**
* Notify the user's listener of the event. The event occurs wholly within this method
* call including a call to {@link FieldEvent
Detecto
r#resetState(Field
SpacecraftState)}
* if necessary.
* call including a call to {@link FieldEvent
Handle
r#resetState(Field
EventDetector,
*
FieldSpacecraftState)}
if necessary.
*
* @param state the state at the time of the event. This must be at the same time as
* the current value of {@link #getEventDate()}.
...
...
src/main/java/org/orekit/propagation/events/FieldEventsLogger.java
View file @
0c8f72e0
...
...
@@ -30,7 +30,7 @@ import org.orekit.time.FieldAbsoluteDate;
*
* <p>As {@link FieldEventDetector events detectors} are triggered during
* orbit propagation, an event specific {@link
* FieldEvent
Detecto
r#eventOccurred(FieldSpacecraftState, boolean) eventOccurred}
* FieldEvent
Handle
r#eventOccurred(FieldSpacecraftState,
FieldEventDetector,
boolean) eventOccurred}
* method is called. This class can be used to add a global logging
* feature registering all events with their corresponding states in
* a chronological sequence (or reverse-chronological if propagation
...
...
@@ -38,7 +38,7 @@ import org.orekit.time.FieldAbsoluteDate;
* <p>This class works by wrapping user-provided {@link FieldEventDetector
* events detectors} before they are registered to the propagator. The
* wrapper monitor the calls to {@link
* FieldEvent
Detecto
r#eventOccurred(FieldSpacecraftState, boolean) eventOccurred}
* FieldEvent
Handle
r#eventOccurred(FieldSpacecraftState,
FieldEventDetector,
boolean) eventOccurred}
* and store the corresponding events as {@link FieldLoggedEvent} instances.
* After propagation is complete, the user can retrieve all the events
* that have occurred at once by calling method {@link #getLoggedEvents()}.</p>
...
...
@@ -137,7 +137,7 @@ public class FieldEventsLogger<T extends CalculusFieldElement<T>> {
/** Get the triggering state.
* @return triggering state
* @see FieldEvent
Detecto
r#eventOccurred(FieldSpacecraftState, boolean)
* @see FieldEvent
Handle
r#eventOccurred(FieldSpacecraftState,
FieldEventDetector,
boolean)
*/
public
FieldSpacecraftState
<
T
>
getState
()
{
return
state
;
...
...
@@ -145,7 +145,7 @@ public class FieldEventsLogger<T extends CalculusFieldElement<T>> {
/** Get the Increasing/decreasing status of the event.
* @return increasing/decreasing status of the event
* @see FieldEvent
Detecto
r#eventOccurred(FieldSpacecraftState, boolean)
* @see FieldEvent
Handle
r#eventOccurred(FieldSpacecraftState,
FieldEventDetector,
boolean)
*/
public
boolean
isIncreasing
()
{
return
increasing
;
...
...
src/main/java/org/orekit/propagation/events/FilterType.java
View file @
0c8f72e0
...
...
@@ -18,6 +18,7 @@
package
org.orekit.propagation.events
;
import
org.orekit.errors.OrekitInternalError
;
import
org.orekit.propagation.events.handlers.EventHandler
;
/** Enumerate for {@link EventSlopeFilter filtering events}.
* <p>This class is heavily based on the class with the same name from the
...
...
@@ -29,11 +30,11 @@ import org.orekit.errors.OrekitInternalError;
public
enum
FilterType
{
/** Constant for triggering only decreasing events.
* <p>When this filter is used, the wrapped {@link Event
Detecto
r
* event
detecto
r} {@link
* Event
Detecto
r#eventOccurred(org.orekit.propagation.SpacecraftState,
* boolean) eventOccurred} method will be called
<em>only</em> with
* its {@code increasing} argument set to false.</p>
* <p>When this filter is used, the wrapped {@link Event
Handle
r
* event
handle
r} {@link
* Event
Handle
r#eventOccurred(org.orekit.propagation.SpacecraftState,
*
EventDetector,
boolean) eventOccurred} method will be called
*
<em>only</em> with
its {@code increasing} argument set to false.</p>
*/
TRIGGER_ONLY_DECREASING_EVENTS
{
...
...
@@ -179,10 +180,9 @@ public enum FilterType {
},
/** Constant for triggering only increasing events.
* <p>When this filter is used, the wrapped {@link EventDetector
* event detector} {@link
* EventDetector#eventOccurred(org.orekit.propagation.SpacecraftState,
* boolean) eventOccurred} method will be called <em>only</em> with
* <p>When this filter is used, the wrapped {@link EventHandler
* event handler} {@link EventHandler#eventOccurred(org.orekit.propagation.SpacecraftState,
* EventDetector, boolean) eventOccurred} method will be called <em>only</em> with
* its {@code increasing} argument set to true.</p>
*/
TRIGGER_ONLY_INCREASING_EVENTS
{
...
...
src/main/java/org/orekit/propagation/events/package-info.java
View file @
0c8f72e0
...
...
@@ -21,8 +21,9 @@
* EventDetector} instances are registered to any {@link org.orekit.propagation.Propagator
* Propagator}. When the event associated with the detector occurs, the propagator interrupts
* the propagation and calls the {@link
* org.orekit.propagation.events.EventDetector#eventOccurred(SpacecraftState, boolean) eventOccurred}
* method of the event detector, which can do whatever the user want and either stop or resume
* org.orekit.propagation.events.handlers.EventHandler#eventOccurred(org.orekit.propagation.SpacecraftState,
* org.orekit.propagation.events.EventDetector, boolean) eventOccurred}
* method of the event handler, which can do whatever the user want and either stop or resume
* propagation, optionally resetting the state.
*
* <p>
...
...
src/test/java/org/orekit/propagation/events/FieldFunctionalDetectorTest.java
View file @
0c8f72e0
...
...
@@ -80,7 +80,7 @@ public class FieldFunctionalDetectorTest {
zero
.
add
(
4
)),
zero
.
add
(
5
));
MatcherAssert
.
assertThat
(
detector
.
g
(
state
).
getReal
(),
CoreMatchers
.
is
(
5.0
));
MatcherAssert
.
assertThat
(
detector
.
eventOccurred
(
null
,
false
),
MatcherAssert
.
assertThat
(
detector
.
getHandler
().
eventOccurred
(
null
,
detector
,
false
),
CoreMatchers
.
is
(
Action
.
STOP
));
MatcherAssert
.
assertThat
(
detector
.
getFunction
(),
CoreMatchers
.
is
(
g
));
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment