CartesianOrbit.meanToHyperbolicEccentric and KeplerianOrbit.meanToHyperbolicEccentric sometimes fail to converge to a solution of the hyperbolic Kepler equation
The algorithm used in Orekit to solve the hyperbolic Kepler equation can fail to converge after a hardcoded limit of 50 iterations.
This issue has been noted elsewhere:
- #114 (closed)
- https://forum.orekit.org/t/problem-in-keplerian-orbit-meantohyperboliceccentric/1167
- https://forum.orekit.org/t/hyperbolic-anomaly/1067
I myself am running into it in the program on which I am working. I am going to submit a merge request to replace the current algorithm with one due to Gooding and Odell which seems to be a standard reference in the literature.
Gooding, R. H. and Odell, A. W., “The hyperbolic Kepler equation (and the elliptic equation revisited)”, Celestial Mechanics, vol. 44, no. 3, pp. 267–282, 1988. doi:10.1007/BF01235540.
Their paper provides a code implementation in Fortran 77 and I have done a pretty straightforward port of it with some very minor changes.