Search in sources :

Example 1 with OldIAUPole

use of org.orekit.bodies.IAUPoleFactory.OldIAUPole in project Orekit by CS-SI.

the class PredefinedIAUPolesTest method testVersus80Implementation.

@Test
public void testVersus80Implementation() {
    for (EphemerisType body : EphemerisType.values()) {
        IAUPole newPole = PredefinedIAUPoles.getIAUPole(body);
        OldIAUPole oldPole = IAUPoleFactory.getIAUPole(body);
        for (double dt = 0; dt < Constants.JULIAN_YEAR; dt += 3600) {
            final AbsoluteDate date = AbsoluteDate.J2000_EPOCH.shiftedBy(dt);
            Assert.assertEquals(0, Vector3D.angle(newPole.getPole(date), oldPole.getPole(date)), 1.0e-20);
            Assert.assertEquals(oldPole.getPrimeMeridianAngle(date), newPole.getPrimeMeridianAngle(date), 5.0e-13);
        }
    }
}
Also used : OldIAUPole(org.orekit.bodies.IAUPoleFactory.OldIAUPole) EphemerisType(org.orekit.bodies.JPLEphemeridesLoader.EphemerisType) OldIAUPole(org.orekit.bodies.IAUPoleFactory.OldIAUPole) FieldAbsoluteDate(org.orekit.time.FieldAbsoluteDate) AbsoluteDate(org.orekit.time.AbsoluteDate) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 OldIAUPole (org.orekit.bodies.IAUPoleFactory.OldIAUPole)1 EphemerisType (org.orekit.bodies.JPLEphemeridesLoader.EphemerisType)1 AbsoluteDate (org.orekit.time.AbsoluteDate)1 FieldAbsoluteDate (org.orekit.time.FieldAbsoluteDate)1