distance between Sun and Earth-Moon barycenter depends on computing frame
An issue has been raised on the users list, showing that computing the
distance between
Sun and Earth-Moon barycenter was wrong when computed in some frames.
The following
test case exercises the bug.
@Test
public void testEarthMoonBarycenter() throws OrekitException {
Utils.setDataRoot("regular-data/de405-ephemerides");
CelestialBody sun = CelestialBodyFactory.getSun();
CelestialBody mars = CelestialBodyFactory.getMars();
CelestialBody earth = CelestialBodyFactory.getEarth();
CelestialBody earthMoonBarycenter = CelestialBodyFactory.getEarthMoonBarycenter();
List frames = Arrays.asList(FramesFactory.getEME2000(),
FramesFactory.getGCRF(),
sun.getInertiallyOrientedFrame(),
mars.getInertiallyOrientedFrame(),
earth.getInertiallyOrientedFrame());
AbsoluteDate date = new AbsoluteDate(1969, 7, 23, TimeScalesFactory.getTT());
final double refDistance = bodyDistance(sun, earthMoonBarycenter, date, frames.get(0));
for (Frame frame : frames) {
Assert.assertEquals(frame.toString(), refDistance,
bodyDistance(sun, earthMoonBarycenter, date, frame),
1.0e-14 * refDistance);
}
}
The bug has been reported by Quentin Nénon.
(from redmine: issue id 165, created on 2014-03-07, closed on 2015-01-12)