double scalAbsoluteTolerance = 1.0e-8;
double scalRelativeTolerance = scalAbsoluteTolerance;
GraggBulirschStoerIntegrator integ = new GraggBulirschStoerIntegrator(minStep, maxStep,
scalAbsoluteTolerance,
scalRelativeTolerance);
integ.addStepHandler(new StepHandler() {
public void handleStep(StepInterpolator interpolator, boolean isLast) {
StepInterpolator cloned = interpolator.copy();
double tA = cloned.getPreviousTime();
double tB = cloned.getCurrentTime();
double halfStep = FastMath.abs(tB - tA) / 2;