use of org.orekit.propagation.sampling.OrekitStepHandlerMultiplexer in project Orekit by CS-SI.
the class KeplerianPropagatorTest method testStepException.
@Test(expected = OrekitException.class)
public void testStepException() throws OrekitException {
final KeplerianOrbit orbit = new KeplerianOrbit(7.8e6, 0.032, 0.4, 0.1, 0.2, 0.3, PositionAngle.TRUE, FramesFactory.getEME2000(), AbsoluteDate.J2000_EPOCH, 3.986004415e14);
KeplerianPropagator propagator = new KeplerianPropagator(orbit);
OrekitStepHandlerMultiplexer multiplexer = new OrekitStepHandlerMultiplexer();
propagator.setMasterMode(multiplexer);
multiplexer.add(new OrekitStepHandler() {
public void init(SpacecraftState s0, AbsoluteDate t) {
}
public void handleStep(OrekitStepInterpolator interpolator, boolean isLast) throws OrekitException {
if (isLast) {
throw new OrekitException((Throwable) null, new DummyLocalizable("dummy error"));
}
}
});
propagator.propagate(orbit.getDate().shiftedBy(-3600));
}
Aggregations