List of usage examples for org.apache.commons.math.ode.events EventException EventException
public EventException(final Throwable cause)
From source file:org.orekit.propagation.events.AdaptedEventDetector.java
/** {@inheritDoc} */ public double g(final double t, final double[] y) throws EventException { try {/* ww w .j a va2s . c o m*/ return detector.g(mapState(t, y)); } catch (OrekitException oe) { throw new EventException(oe); } }
From source file:org.orekit.propagation.events.AdaptedEventDetector.java
/** {@inheritDoc} */ public int eventOccurred(final double t, final double[] y, final boolean increasing) throws EventException { try {// www .jav a2 s . c om final int whatNext = detector.eventOccurred(mapState(t, y), increasing); switch (whatNext) { case EventDetector.STOP: return STOP; case EventDetector.RESET_STATE: return RESET_STATE; case EventDetector.RESET_DERIVATIVES: return RESET_DERIVATIVES; default: return CONTINUE; } } catch (OrekitException oe) { throw new EventException(oe); } }
From source file:org.orekit.propagation.events.AdaptedEventDetector.java
/** {@inheritDoc} */ public void resetState(final double t, final double[] y) throws EventException { try {//from w w w . j a v a 2s . c om final SpacecraftState newState = detector.resetState(mapState(t, y)); y[0] = newState.getA(); y[1] = newState.getEquinoctialEx(); y[2] = newState.getEquinoctialEy(); y[3] = newState.getHx(); y[4] = newState.getHy(); y[5] = newState.getLv(); y[6] = newState.getMass(); } catch (OrekitException oe) { throw new EventException(oe); } }