Hi everyone,
I encounter a bug using AbstractIntegrator
and DetectorBasedEventState
in Hipparchus 4.0.1.
- Inside
AbstractIntegrator
, the state is retrieved at detected date using an interpolator ofClassicalRungeKuttaStateInterpolator
. As the first screenshot shows, the event date is17016.237999999998
not rounded whereas after the interpolation, the eventState.time is truncated to17016.238
. - After that, the event is validated by the method
doEvent
of theDetectorBasedEventState
, where a check of time’s equality is made (screenshot 3). This is where the snake bites its tail, as the interpolated state time is truncated and not the detected event time and the exception is raised. - When I look at how it is interpolated, it appears that the state is returned as it is when the time difference is lower than the least significant bit, LSB (screenshot 2).
The most straight-forward solution I think of, is to add the same tolerance of LSB, during the check, instead of the equality.
The deep correction would be to have the detection giving the right time but I suppose it is harder as the LSB is expected.
Can the first correction be foreseen ?
Thanks a lot !
Clement