non-bracketing exception while converting Cartesian point to geodetic coordinates
The following test case triggers an exception in the Apache commons Math solver:
AbsoluteDate date = new AbsoluteDate("2002-03-06T20:50:20.44188731559965033", TimeScalesFactory.getUTC()); Frame frame = FramesFactory.getGTOD(false); OneAxisEllipsoid model = new OneAxisEllipsoid(Constants.WGS84_EARTH_EQUATORIAL_RADIUS, Constants.WGS84_EARTH_FLATTENING, frame); Vector3D point = new Vector3D(-6838696.282102453, -2148321.403361013, -0.011907944179711194); GeodeticPoint gp = model.transform(point, frame, date);
The problem is that the point is very close to equator, but not close enough to be handled by the dedicated branch in the OneAxisEllipsoid class, it is still handled by the general purpose branch which uses a solver. When the solver is set up, its search interval is set up to the length of the ellipse evolute, as it is known the intersection of nadir and equator will remain in this interval. Since the point is already very close to the equator, the final point will be at the very end of the interval, near the cusp of the evolute. Due to numerical issues, the function computed does not really crosses 0 and is very sligthly positive (10^-12) at the cusp. So the interval does not really bracket the root.
(from redmine: issue id 141, created on 2013-07-11, closed on 2013-07-11)