Search in sources :

Example 36 with DateComponents

use of org.orekit.time.DateComponents in project Orekit by CS-SI.

the class FramesFactoryTest method testCIP.

private void testCIP(IERSConventions conventions, double threshold) throws OrekitException {
    Utils.setLoaders(conventions, new ArrayList<EOPEntry>());
    Frame cirf = FramesFactory.getCIRF(conventions, false);
    Frame tod = FramesFactory.getTOD(conventions, false);
    AbsoluteDate t0 = new AbsoluteDate(new DateComponents(2003, 06, 21), TimeComponents.H00, TimeScalesFactory.getUTC());
    for (double dt = -10 * Constants.JULIAN_DAY; dt < 10 * Constants.JULIAN_DAY; dt += 7200) {
        // CIRF and TOD should both have the Celestial Intermediate Pole as their Z axis
        AbsoluteDate date = t0.shiftedBy(dt);
        Transform t = FramesFactory.getNonInterpolatingTransform(tod, cirf, date);
        Vector3D z = t.transformVector(Vector3D.PLUS_K);
        Assert.assertEquals(0.0, Vector3D.angle(z, Vector3D.PLUS_K), threshold);
    }
}
Also used : Vector3D(org.hipparchus.geometry.euclidean.threed.Vector3D) DateComponents(org.orekit.time.DateComponents) FieldAbsoluteDate(org.orekit.time.FieldAbsoluteDate) AbsoluteDate(org.orekit.time.AbsoluteDate)

Example 37 with DateComponents

use of org.orekit.time.DateComponents in project Orekit by CS-SI.

the class GTODProviderTest method testAASReferenceLEO.

@Test
public void testAASReferenceLEO() throws OrekitException {
    // this reference test has been extracted from the following paper:
    // Implementation Issues Surrounding the New IAU Reference Systems for Astrodynamics
    // David A. Vallado, John H. Seago, P. Kenneth Seidelmann
    // http://www.centerforspace.com/downloads/files/pubs/AAS-06-134.pdf
    Utils.setLoaders(IERSConventions.IERS_1996, Utils.buildEOPList(IERSConventions.IERS_1996, ITRFVersion.ITRF_2008, new double[][] { { 53098, -0.4399619, 0.0015563, -0.140682, 0.333309, -0.052195, -0.003875, Double.NaN, Double.NaN }, { 53099, -0.4399619, 0.0015563, -0.140682, 0.333309, -0.052195, -0.003875, Double.NaN, Double.NaN }, { 53100, -0.4399619, 0.0015563, -0.140682, 0.333309, -0.052195, -0.003875, Double.NaN, Double.NaN }, { 53101, -0.4399619, 0.0015563, -0.140682, 0.333309, -0.052195, -0.003875, Double.NaN, Double.NaN }, { 53102, -0.4399619, 0.0015563, -0.140682, 0.333309, -0.052195, -0.003875, Double.NaN, Double.NaN }, { 53103, -0.4399619, 0.0015563, -0.140682, 0.333309, -0.052195, -0.003875, Double.NaN, Double.NaN }, { 53104, -0.4399619, 0.0015563, -0.140682, 0.333309, -0.052195, -0.003875, Double.NaN, Double.NaN }, { 53105, -0.4399619, 0.0015563, -0.140682, 0.333309, -0.052195, -0.003875, Double.NaN, Double.NaN } }));
    AbsoluteDate t0 = new AbsoluteDate(new DateComponents(2004, 04, 06), new TimeComponents(07, 51, 28.386009), TimeScalesFactory.getUTC());
    // PEF iau76
    PVCoordinates pvPEF = new PVCoordinates(new Vector3D(-1033475.0313, 7901305.5856, 6380344.5328), new Vector3D(-3225.632747, -2872.442511, 5531.931288));
    // it seems the induced effect of pole nutation correction δΔψ on the equation of the equinoxes
    // was not taken into account in the reference paper, so we fix it here for the test
    final double dDeltaPsi = FramesFactory.getEOPHistory(IERSConventions.IERS_1996, true).getEquinoxNutationCorrection(t0)[0];
    final double epsilonA = IERSConventions.IERS_1996.getMeanObliquityFunction().value(t0);
    final Transform fix = new Transform(t0, new Rotation(Vector3D.PLUS_K, dDeltaPsi * FastMath.cos(epsilonA), RotationConvention.FRAME_TRANSFORM));
    // TOD iau76
    PVCoordinates pvTOD = new PVCoordinates(new Vector3D(5094514.7804, 6127366.4612, 6380344.5328), new Vector3D(-4746.088567, 786.077222, 5531.931288));
    Transform t = FramesFactory.getTOD(IERSConventions.IERS_1996, true).getTransformTo(FramesFactory.getGTOD(IERSConventions.IERS_1996, true), t0);
    checkPV(fix.transformPVCoordinates(pvPEF), t.transformPVCoordinates(pvTOD), 0.00942, 3.12e-5);
    // if we forget to apply nutation corrections, results are much worse, which is expected
    t = FramesFactory.getTOD(false).getTransformTo(FramesFactory.getGTOD(false), t0);
    checkPV(fix.transformPVCoordinates(pvPEF), t.transformPVCoordinates(pvTOD), 257.49, 0.13955);
}
Also used : FieldVector3D(org.hipparchus.geometry.euclidean.threed.FieldVector3D) Vector3D(org.hipparchus.geometry.euclidean.threed.Vector3D) FieldPVCoordinates(org.orekit.utils.FieldPVCoordinates) PVCoordinates(org.orekit.utils.PVCoordinates) DateComponents(org.orekit.time.DateComponents) TimeComponents(org.orekit.time.TimeComponents) FieldRotation(org.hipparchus.geometry.euclidean.threed.FieldRotation) Rotation(org.hipparchus.geometry.euclidean.threed.Rotation) FieldAbsoluteDate(org.orekit.time.FieldAbsoluteDate) AbsoluteDate(org.orekit.time.AbsoluteDate) Test(org.junit.Test)

Example 38 with DateComponents

use of org.orekit.time.DateComponents in project Orekit by CS-SI.

the class GTODProviderTest method testAASReferenceGEOField.

@Test
public void testAASReferenceGEOField() throws OrekitException {
    // this reference test has been extracted from the following paper:
    // Implementation Issues Surrounding the New IAU Reference Systems for Astrodynamics
    // David A. Vallado, John H. Seago, P. Kenneth Seidelmann
    // http://www.centerforspace.com/downloads/files/pubs/AAS-06-134.pdf
    Utils.setLoaders(IERSConventions.IERS_1996, Utils.buildEOPList(IERSConventions.IERS_1996, ITRFVersion.ITRF_2008, new double[][] { { 53153, -0.4709050, 0.0000000, -0.083853, 0.467217, -0.053614, -0.004494, Double.NaN, Double.NaN }, { 53154, -0.4709050, 0.0000000, -0.083853, 0.467217, -0.053614, -0.004494, Double.NaN, Double.NaN }, { 53155, -0.4709050, 0.0000000, -0.083853, 0.467217, -0.053614, -0.004494, Double.NaN, Double.NaN }, { 53156, -0.4709050, 0.0000000, -0.083853, 0.467217, -0.053614, -0.004494, Double.NaN, Double.NaN }, { 53157, -0.4709050, 0.0000000, -0.083853, 0.467217, -0.053614, -0.004494, Double.NaN, Double.NaN }, { 53158, -0.4709050, 0.0000000, -0.083853, 0.467217, -0.053614, -0.004494, Double.NaN, Double.NaN }, { 53159, -0.4709050, 0.0000000, -0.083853, 0.467217, -0.053614, -0.004494, Double.NaN, Double.NaN }, { 53160, -0.4709050, 0.0000000, -0.083853, 0.467217, -0.053614, -0.004494, Double.NaN, Double.NaN } }));
    FieldAbsoluteDate<Decimal64> t0 = new FieldAbsoluteDate<>(Decimal64Field.getInstance(), new DateComponents(2004, 06, 01), TimeComponents.H00, TimeScalesFactory.getUTC());
    FieldTransform<Decimal64> t = FramesFactory.getTOD(IERSConventions.IERS_1996, true).getTransformTo(FramesFactory.getGTOD(IERSConventions.IERS_1996, true), t0);
    // TOD iau76
    PVCoordinates pvTOD = new PVCoordinates(new Vector3D(-40577427.7501, -11500096.1306, 10293.2583), new Vector3D(837.552338, -2957.524176, -0.928772));
    // PEF iau76
    PVCoordinates pvPEF = new PVCoordinates(new Vector3D(24796919.2956, -34115870.9001, 10293.2583), new Vector3D(-0.979178, -1.476540, -0.928772));
    // it seems the induced effect of pole nutation correction δΔψ on the equation of the equinoxes
    // was not taken into account in the reference paper, so we fix it here for the test
    final Decimal64 dDeltaPsi = FramesFactory.getEOPHistory(IERSConventions.IERS_1996, true).getEquinoxNutationCorrection(t0)[0];
    final Decimal64 epsilonA = IERSConventions.IERS_1996.getMeanObliquityFunction().value(t0);
    final FieldTransform<Decimal64> fix = new FieldTransform<>(t0, new FieldRotation<>(FieldVector3D.getPlusK(Decimal64Field.getInstance()), dDeltaPsi.multiply(epsilonA.cos()), RotationConvention.FRAME_TRANSFORM));
    checkPV(fix.transformPVCoordinates(pvPEF), t.transformPVCoordinates(pvTOD), 0.0503, 3.59e-4);
    // if we forget to apply nutation corrections, results are much worse, which is expected
    t = FramesFactory.getTOD(false).getTransformTo(FramesFactory.getGTOD(false), t0);
    checkPV(fix.transformPVCoordinates(pvPEF), t.transformPVCoordinates(pvTOD), 1458.27, 3.847e-4);
}
Also used : FieldVector3D(org.hipparchus.geometry.euclidean.threed.FieldVector3D) Vector3D(org.hipparchus.geometry.euclidean.threed.Vector3D) Decimal64(org.hipparchus.util.Decimal64) FieldPVCoordinates(org.orekit.utils.FieldPVCoordinates) PVCoordinates(org.orekit.utils.PVCoordinates) DateComponents(org.orekit.time.DateComponents) FieldAbsoluteDate(org.orekit.time.FieldAbsoluteDate) Test(org.junit.Test)

Example 39 with DateComponents

use of org.orekit.time.DateComponents in project Orekit by CS-SI.

the class ITRFEquinoxProviderTest method testAASReferenceGEO.

@Test
public void testAASReferenceGEO() throws OrekitException {
    // this reference test has been extracted from the following paper:
    // Implementation Issues Surrounding the New IAU Reference Systems for Astrodynamics
    // David A. Vallado, John H. Seago, P. Kenneth Seidelmann
    // http://www.centerforspace.com/downloads/files/pubs/AAS-06-134.pdf
    Utils.setLoaders(IERSConventions.IERS_1996, Utils.buildEOPList(IERSConventions.IERS_1996, ITRFVersion.ITRF_2008, new double[][] { { 53153, -0.4709050, 0.0000000, -0.083853, 0.467217, -0.053614, -0.004494, Double.NaN, Double.NaN }, { 53154, -0.4709050, 0.0000000, -0.083853, 0.467217, -0.053614, -0.004494, Double.NaN, Double.NaN }, { 53155, -0.4709050, 0.0000000, -0.083853, 0.467217, -0.053614, -0.004494, Double.NaN, Double.NaN }, { 53156, -0.4709050, 0.0000000, -0.083853, 0.467217, -0.053614, -0.004494, Double.NaN, Double.NaN }, { 53157, -0.4709050, 0.0000000, -0.083853, 0.467217, -0.053614, -0.004494, Double.NaN, Double.NaN }, { 53158, -0.4709050, 0.0000000, -0.083853, 0.467217, -0.053614, -0.004494, Double.NaN, Double.NaN }, { 53159, -0.4709050, 0.0000000, -0.083853, 0.467217, -0.053614, -0.004494, Double.NaN, Double.NaN }, { 53160, -0.4709050, 0.0000000, -0.083853, 0.467217, -0.053614, -0.004494, Double.NaN, Double.NaN } }));
    AbsoluteDate t0 = new AbsoluteDate(new DateComponents(2004, 06, 01), TimeComponents.H00, TimeScalesFactory.getUTC());
    Transform t = FramesFactory.getGTOD(IERSConventions.IERS_1996, true).getTransformTo(FramesFactory.getITRFEquinox(IERSConventions.IERS_1996, true), t0);
    // GTOD
    PVCoordinates pvGTOD = new PVCoordinates(new Vector3D(24796919.2956, -34115870.9001, 10293.2583), new Vector3D(-0.979178, -1.476540, -0.928772));
    // ITRF
    PVCoordinates pvITRF = new PVCoordinates(new Vector3D(24796919.2915, -34115870.9234, 10226.0621), new Vector3D(-0.979178, -1.476538, -0.928776));
    checkPV(pvITRF, t.transformPVCoordinates(pvGTOD), 3.954e-4, 4.69e-7);
}
Also used : Vector3D(org.hipparchus.geometry.euclidean.threed.Vector3D) PVCoordinates(org.orekit.utils.PVCoordinates) DateComponents(org.orekit.time.DateComponents) AbsoluteDate(org.orekit.time.AbsoluteDate) Test(org.junit.Test)

Example 40 with DateComponents

use of org.orekit.time.DateComponents in project Orekit by CS-SI.

the class ITRFProviderTest method testAASReferenceGEODX0DY0.

@Test
public void testAASReferenceGEODX0DY0() throws OrekitException {
    // this reference test has been extracted from the following paper:
    // Implementation Issues Surrounding the New IAU Reference Systems for Astrodynamics
    // David A. Vallado, John H. Seago, P. Kenneth Seidelmann
    // http://www.centerforspace.com/downloads/files/pubs/AAS-06-134.pdf
    Utils.setLoaders(IERSConventions.IERS_2010, Utils.buildEOPList(IERSConventions.IERS_2010, ITRFVersion.ITRF_2008, new double[][] { { 53153, -0.4709050, 0.0000000, -0.083853, 0.467217, 0.0, 0.0, 0.0, 0.0 }, { 53154, -0.4709050, 0.0000000, -0.083853, 0.467217, 0.0, 0.0, 0.0, 0.0 }, { 53155, -0.4709050, 0.0000000, -0.083853, 0.467217, 0.0, 0.0, 0.0, 0.0 }, { 53156, -0.4709050, 0.0000000, -0.083853, 0.467217, 0.0, 0.0, 0.0, 0.0 }, { 53157, -0.4709050, 0.0000000, -0.083853, 0.467217, 0.0, 0.0, 0.0, 0.0 }, { 53158, -0.4709050, 0.0000000, -0.083853, 0.467217, 0.0, 0.0, 0.0, 0.0 }, { 53159, -0.4709050, 0.0000000, -0.083853, 0.467217, 0.0, 0.0, 0.0, 0.0 }, { 53160, -0.4709050, 0.0000000, -0.083853, 0.467217, 0.0, 0.0, 0.0, 0.0 } }));
    AbsoluteDate t0 = new AbsoluteDate(new DateComponents(2004, 06, 01), TimeComponents.H00, TimeScalesFactory.getUTC());
    // Positions GEO
    Frame itrfA = FramesFactory.getITRF(IERSConventions.IERS_2010, true);
    PVCoordinates pvITRF = new PVCoordinates(new Vector3D(24796919.2915, -34115870.9234, 10226.0621), new Vector3D(-0.979178, -1.476538, -0.928776));
    PVCoordinates pvGCRFdx0dy0 = new PVCoordinates(new Vector3D(-40588150.3643, -11462167.0302, 27143.1979), new Vector3D(834.787457, -2958.305691, -1.172993));
    checkPV(pvGCRFdx0dy0, itrfA.getTransformTo(FramesFactory.getGCRF(), t0).transformPVCoordinates(pvITRF), 0.0505, 1.06e-4);
    PVCoordinates pvEME2000EqA = new PVCoordinates(new Vector3D(-40588149.5482, -11462169.9118, 27146.8462), new Vector3D(834.787667, -2958.305632, -1.172963));
    checkPV(pvEME2000EqA, itrfA.getTransformTo(FramesFactory.getEME2000(), t0).transformPVCoordinates(pvITRF), 0.0603, 1.07e-4);
}
Also used : Vector3D(org.hipparchus.geometry.euclidean.threed.Vector3D) PVCoordinates(org.orekit.utils.PVCoordinates) DateComponents(org.orekit.time.DateComponents) AbsoluteDate(org.orekit.time.AbsoluteDate) Test(org.junit.Test)

Aggregations

DateComponents (org.orekit.time.DateComponents)148 AbsoluteDate (org.orekit.time.AbsoluteDate)129 Test (org.junit.Test)98 FieldAbsoluteDate (org.orekit.time.FieldAbsoluteDate)87 TimeComponents (org.orekit.time.TimeComponents)87 Vector3D (org.hipparchus.geometry.euclidean.threed.Vector3D)64 KeplerianOrbit (org.orekit.orbits.KeplerianOrbit)62 Orbit (org.orekit.orbits.Orbit)47 FieldKeplerianOrbit (org.orekit.orbits.FieldKeplerianOrbit)46 SpacecraftState (org.orekit.propagation.SpacecraftState)45 PVCoordinates (org.orekit.utils.PVCoordinates)40 CartesianOrbit (org.orekit.orbits.CartesianOrbit)37 OrekitException (org.orekit.errors.OrekitException)34 FieldSpacecraftState (org.orekit.propagation.FieldSpacecraftState)33 OneAxisEllipsoid (org.orekit.bodies.OneAxisEllipsoid)28 AbstractLegacyForceModelTest (org.orekit.forces.AbstractLegacyForceModelTest)28 CircularOrbit (org.orekit.orbits.CircularOrbit)25 EquinoctialOrbit (org.orekit.orbits.EquinoctialOrbit)25 FieldVector3D (org.hipparchus.geometry.euclidean.threed.FieldVector3D)23 Rotation (org.hipparchus.geometry.euclidean.threed.Rotation)22