Skip to content
Snippets Groups Projects
Commit 6d54f335 authored by Evan Ward's avatar Evan Ward
Browse files

Fix Bryan's comments from !192 for #830

Remove unused imports, fix bug in test where wrong value was used in
assertion.
parent 8a7380fb
No related branches found
No related tags found
No related merge requests found
......@@ -22,8 +22,6 @@ import org.junit.Test;
import org.orekit.propagation.Propagator;
import org.orekit.propagation.analytical.KeplerianPropagator;
import org.orekit.propagation.events.handlers.RecordAndContinue;
import org.orekit.propagation.sampling.OrekitStepHandler;
import org.orekit.propagation.sampling.OrekitStepInterpolator;
/**
......
......@@ -1152,14 +1152,14 @@ public abstract class FieldCloseEventsAbstractTest<T extends CalculusFieldElemen
.withThreshold(v(tolerance)));
StepHandler<T> stepHandler = new StepHandler<>();
propagator.setStepHandler(stepHandler);
FieldSpacecraftState<T> initialState = propagator.getInitialState();
// action
FieldSpacecraftState<T> finalState = propagator.propagate(epoch.shiftedBy(10));
// verify
Assert.assertEquals(10.0, finalState.getDate().durationFrom(epoch).getReal(), tolerance);
Assert.assertEquals(0.0, initialState.getDate().durationFrom(epoch).getReal(), tolerance);
Assert.assertEquals(0.0,
stepHandler.initialState.getDate().durationFrom(epoch).getReal(), tolerance);
Assert.assertEquals(10.0, stepHandler.targetDate.durationFrom(epoch).getReal(), tolerance);
Assert.assertEquals(10.0,
stepHandler.finalState.getDate().durationFrom(epoch).getReal(), tolerance);
......@@ -2251,14 +2251,14 @@ public abstract class FieldCloseEventsAbstractTest<T extends CalculusFieldElemen
.withThreshold(v(tolerance)));
StepHandler<T> stepHandler = new StepHandler<>();
propagator.setStepHandler(stepHandler);
FieldSpacecraftState<T> initialState = propagator.getInitialState();
// action
FieldSpacecraftState<T> finalState = propagator.propagate(epoch.shiftedBy(-10));
// verify
Assert.assertEquals(-10.0, finalState.getDate().durationFrom(epoch).getReal(), tolerance);
Assert.assertEquals(0.0, initialState.getDate().durationFrom(epoch).getReal(), tolerance);
Assert.assertEquals(0.0,
stepHandler.initialState.getDate().durationFrom(epoch).getReal(), tolerance);
Assert.assertEquals(-10.0, stepHandler.targetDate.durationFrom(epoch).getReal(), tolerance);
Assert.assertEquals(-10.0,
stepHandler.finalState.getDate().durationFrom(epoch).getReal(), tolerance);
......
......@@ -25,7 +25,6 @@ import org.orekit.propagation.FieldPropagator;
import org.orekit.propagation.analytical.FieldKeplerianPropagator;
import org.orekit.propagation.analytical.KeplerianPropagator;
import org.orekit.propagation.events.handlers.FieldRecordAndContinue;
import org.orekit.propagation.events.handlers.RecordAndContinue;
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment