Conversion from Cartesian to geodetic coordinates fails for very far points.
When attempting conversion from Cartesian coordinates to geodetic
coordinates for very far points (typically Sun),
the conversion fails with an internal error exception as a loop which
should always converge fails to converge.
Changing the accuracy threshold sometimes work, but it really error prone.
An example of such a case is:
@Test
public void testFarPoint() throws OrekitException {
AbsoluteDate date = AbsoluteDate.J2000_EPOCH;
Frame frame = FramesFactory.getITRF2005(true);
OneAxisEllipsoid model = new OneAxisEllipsoid(90.0, 5.0 / 9.0, frame);
Vector3D point = new Vector3D(1.0e15, 2.0e15, -1.0e12);
GeodeticPoint gp = model.transform(point, frame, date);
Vector3D rebuilt = model.transform(gp);
Assert.assertEquals(0.0, rebuilt.distance(point), 1.0e-15 * point.getNorm());
}
(from redmine: issue id 137, created on 2013-05-18, closed on 2013-05-18)