Commit 0c8f72e0 authored by Luc Maisonobe's avatar Luc Maisonobe
Browse files

Fixed build error.

parent b08b9537
Pipeline #2918 failed with stages
in 14 minutes and 1 second
......@@ -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>
*
......
......@@ -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
* EventDetector#eventOccurred(SpacecraftState, boolean)
* EventHandler#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
......
......@@ -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.
......
......@@ -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
* EventDetector#eventOccurred(SpacecraftState, boolean)
* EventHandler#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
......
......@@ -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 EventDetector#resetState(SpacecraftState)}
* call including a call to {@link EventHandler#resetState(EventDetector, SpacecraftState)}
* if necessary.
*
* @param state the state at the time of the event. This must be at the same time as
......
......@@ -29,7 +29,7 @@ import org.orekit.time.TimeStamped;
*
* <p>As {@link EventDetector events detectors} are triggered during
* orbit propagation, an event specific {@link
* EventDetector#eventOccurred(SpacecraftState, boolean) eventOccurred}
* EventHandler#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
* EventDetector#eventOccurred(SpacecraftState, boolean) eventOccurred}
* EventHandler#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 EventDetector#eventOccurred(SpacecraftState, boolean)
* @see EventHandler#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 EventDetector#eventOccurred(SpacecraftState, boolean)
* @see EventHandler#eventOccurred(SpacecraftState, EventDetector, boolean)
*/
public boolean isIncreasing() {
return increasing;
......
......@@ -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)
......
......@@ -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
......
......@@ -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 FieldEventDetector#resetState(FieldSpacecraftState)}
* if necessary.
* call including a call to {@link FieldEventHandler#resetState(FieldEventDetector,
* 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()}.
......
......@@ -30,7 +30,7 @@ import org.orekit.time.FieldAbsoluteDate;
*
* <p>As {@link FieldEventDetector events detectors} are triggered during
* orbit propagation, an event specific {@link
* FieldEventDetector#eventOccurred(FieldSpacecraftState, boolean) eventOccurred}
* FieldEventHandler#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
* FieldEventDetector#eventOccurred(FieldSpacecraftState, boolean) eventOccurred}
* FieldEventHandler#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 FieldEventDetector#eventOccurred(FieldSpacecraftState, boolean)
* @see FieldEventHandler#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 FieldEventDetector#eventOccurred(FieldSpacecraftState, boolean)
* @see FieldEventHandler#eventOccurred(FieldSpacecraftState, FieldEventDetector, boolean)
*/
public boolean isIncreasing() {
return increasing;
......
......@@ -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 EventDetector
* event detector} {@link
* EventDetector#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 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 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 {
......
......@@ -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>
......
......@@ -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));
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment