Hello! I’m using two EventDetectors to detect when the elevation passes certain thresholds. Most of the time, the detectors correctly find the crossover points. However, every once in a while, I’ll get an error like
“interval does not bracket a root: f(0E0) = 2.5994586190914992E-3, f(9.01760767715599E0) = 346.9446951953614E-18”.
I’ve read other forum posts (like this one) but these event detectors are just monitoring. There is no state change on detection of an elevation crossing; the function just notes the location of the roots. Am I misunderstanding the definition of “changing the definition of the g functions”?
I haven’t been able to find a pattern in what causes this error. I’m posting here to see if others have encountered this error and found the root cause in a case like mine?
Without a reproducible example, it is difficult to analyze what happens.
The event detection logic is complicated as it handles a lot of special cases, but since a few years, it is very robust.
Could you share a stack trace when the error is triggered?
Could you share some log of the calls to the g function with at least time and return value (very accurately)?
I can share the timestamped elevations, the thresholds, and part of the stack trace, but unfortunately not much more than that.
I’ve attached the timestamped elevations.
The thresholds we are looking for with elevation detectors are crossings of 5.0 degrees and 20.0 degrees. timestamped_elevation.json (9.6 KB)
org.orekit.errors.OrekitException: interval does not bracket a root: f(0E0) = 12.135605205991301E-3, f(9.640143098639417E0) = 499.6003610813204E-18
at org.orekit.errors.OrekitException.unwrap(OrekitException.java:154) ~[orekit-10.3.1.jar:?]
at org.orekit.propagation.analytical.AbstractAnalyticalPropagator.propagate(AbstractAnalyticalPropagator.java:182) ~[orekit-10.3.1.jar:?]
...
Caused by: org.hipparchus.exception.MathIllegalArgumentException: interval does not bracket a root: f(0E0) = 12.135605205991301E-3, f(9.640143098639417E0) = 499.6003610813204E-18
at org.hipparchus.analysis.solvers.BracketingNthOrderBrentSolver.doSolveInterval(BracketingNthOrderBrentSolver.java:209) ~[hipparchus-core-1.8.jar:?]
at org.hipparchus.analysis.solvers.BracketingNthOrderBrentSolver.solveInterval(BracketingNthOrderBrentSolver.java:426) ~[hipparchus-core-1.8.jar:?]
at org.hipparchus.analysis.solvers.BracketedUnivariateSolver.solveInterval(BracketedUnivariateSolver.java:126) ~[hipparchus-core-1.8.jar:?]
at org.orekit.propagation.events.EventState.findRoot(EventState.java:320) ~[orekit-10.3.1.jar:?]
at org.orekit.propagation.events.EventState.evaluateStep(EventState.java:218) ~[orekit-10.3.1.jar:?]
at org.orekit.propagation.analytical.AbstractAnalyticalPropagator.acceptStep(AbstractAnalyticalPropagator.java:311) ~[orekit-10.3.1.jar:?]
at org.orekit.propagation.analytical.AbstractAnalyticalPropagator.propagate(AbstractAnalyticalPropagator.java:168) ~[orekit-10.3.1.jar:?]