Hi everyone,
I encountered an issue that is happening on the same code part as Exception during findRoot in EventState - #4 by Christophe (associated gitlab issue : non-bracketing issue due to numerical noise for events at end of interval (#921) · Issues · Orekit / Orekit · GitLab).
In my case, I am running a parallel TLE propagation on a radar-carrying spacecraft to compute visibility events on a significant number of targets (hence the parallel computation). The targets are subdivided into N groups associated with N propagators, each target having its own visibility event and PV provider to compute range and angular offset values.
When computing the events, the value returned by the g function in the evaluateStep method (line 217 of EventState) is sometimes way far from the actual value at the very same state. It is very unlikely that this difference is caused by numerical noise because its order of magnitude is usually way higher than numerical errors, but happens at random. As a sign change is found at this step, this wrongly triggers the subsequent call to findRoot line 222. The g function is evaluated again in findRoot to check for a sign change, but no such switch is found as g returns correct values in this part of the code (again, for the exact same state). The solveInterval method logically returns an exception.
This problem does not always occur - runs sometimes go well and return correct results, but other times stop on the exception mentioned above. As it strongly looks like a variable corruption problem, I tried building 2 propagators outside a loop using proper variables for each of them (as recommended in the ParallelPropagator documentation), but the same issue appeared. My guess is that using PV Providers for each target may end up causing outliers on the g function.
Has someone stumbled upon this same issue by any chance, and has a way to fix it ?