Search in sources :

Example 86 with TimeComponents

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

the class EME2000ProviderTest 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
    AbsoluteDate t0 = new AbsoluteDate(new DateComponents(2004, 04, 06), new TimeComponents(07, 51, 28.386009), TimeScalesFactory.getUTC());
    Transform t = FramesFactory.getGCRF().getTransformTo(FramesFactory.getEME2000(), t0);
    PVCoordinates pvGcrfIau2000A = new PVCoordinates(new Vector3D(5102508.9579, 6123011.4038, 6378136.9252), new Vector3D(-4743.220156, 790.536497, 5533.755728));
    PVCoordinates pvEME2000EqA = new PVCoordinates(new Vector3D(5102509.0383, 6123011.9758, 6378136.3118), new Vector3D(-4743.219766, 790.536344, 5533.756084));
    checkPV(pvEME2000EqA, t.transformPVCoordinates(pvGcrfIau2000A), 1.1e-4, 2.6e-7);
    PVCoordinates pvGcrfIau2000B = new PVCoordinates(new Vector3D(5102508.9579, 6123011.4012, 6378136.9277), new Vector3D(-4743.220156, 790.536495, 5533.755729));
    PVCoordinates pvEME2000EqB = new PVCoordinates(new Vector3D(5102509.0383, 6123011.9733, 6378136.3142), new Vector3D(-4743.219766, 790.536342, 5533.756085));
    checkPV(pvEME2000EqB, t.transformPVCoordinates(pvGcrfIau2000B), 7.4e-5, 2.6e-7);
}
Also used : Vector3D(org.hipparchus.geometry.euclidean.threed.Vector3D) PVCoordinates(org.orekit.utils.PVCoordinates) DateComponents(org.orekit.time.DateComponents) TimeComponents(org.orekit.time.TimeComponents) AbsoluteDate(org.orekit.time.AbsoluteDate) Test(org.junit.Test)

Example 87 with TimeComponents

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

the class MODProviderTest 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
    AbsoluteDate t0 = new AbsoluteDate(new DateComponents(2004, 04, 06), new TimeComponents(07, 51, 28.386009), TimeScalesFactory.getUTC());
    Transform tt = FramesFactory.getGCRF().getTransformTo(FramesFactory.getMOD(IERSConventions.IERS_1996), t0);
    // GCRF iau76 w corr
    PVCoordinates pvGCRFiau76 = new PVCoordinates(new Vector3D(5102508.9579, 6123011.4007, 6378136.9282), new Vector3D(-4743.220157, 790.536497, 5533.755727));
    double norm = pvGCRFiau76.getPosition().getNorm();
    // MOD iau76 w corr
    PVCoordinates pvMODiau76Wcorr = new PVCoordinates(new Vector3D(5094028.3745, 6127870.8164, 6380248.5164), new Vector3D(-4746.263052, 786.014045, 5531.790562));
    checkPV(pvMODiau76Wcorr, tt.transformPVCoordinates(pvGCRFiau76), 9e-12 * norm, 7.3e-7);
    Transform tf = FramesFactory.getEME2000().getTransformTo(FramesFactory.getMOD(false), t0);
    // J2000 iau76
    PVCoordinates pvJ2000iau76 = new PVCoordinates(new Vector3D(5102509.6000, 6123011.5200, 6378136.3000), new Vector3D(-4743.219600, 790.536600, 5533.756190));
    // MOD iau76
    PVCoordinates pvMODiau76 = new PVCoordinates(new Vector3D(5094029.0167, 6127870.9363, 6380247.8885), new Vector3D(-4746.262495, 786.014149, 5531.791025));
    checkPV(pvMODiau76, tf.transformPVCoordinates(pvJ2000iau76), 9e-12 * norm, 3.1e-7);
}
Also used : Vector3D(org.hipparchus.geometry.euclidean.threed.Vector3D) PVCoordinates(org.orekit.utils.PVCoordinates) DateComponents(org.orekit.time.DateComponents) TimeComponents(org.orekit.time.TimeComponents) FieldAbsoluteDate(org.orekit.time.FieldAbsoluteDate) AbsoluteDate(org.orekit.time.AbsoluteDate) Test(org.junit.Test)

Example 88 with TimeComponents

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

the class DEFile method extractDate.

/**
 * Extract a date from a record.
 * @param record record to parse
 * @param offset offset of the double within the record
 * @param bigEndian if <code>true</code> the parsed date is extracted in big-endian
 * format, otherwise it is extracted in little-endian format
 * @return extracted date
 */
private AbsoluteDate extractDate(final byte[] record, final int offset, final boolean bigEndian) {
    final double t = extractDouble(record, offset, bigEndian);
    int jDay = (int) FastMath.floor(t);
    double seconds = (t + 0.5 - jDay) * Constants.JULIAN_DAY;
    if (seconds >= Constants.JULIAN_DAY) {
        ++jDay;
        seconds -= Constants.JULIAN_DAY;
    }
    final AbsoluteDate date = new AbsoluteDate(new DateComponents(DateComponents.JULIAN_EPOCH, jDay), new TimeComponents(seconds), timeScale);
    return date;
}
Also used : DateComponents(org.orekit.time.DateComponents) DateTimeComponents(org.orekit.time.DateTimeComponents) TimeComponents(org.orekit.time.TimeComponents) AbsoluteDate(org.orekit.time.AbsoluteDate)

Aggregations

TimeComponents (org.orekit.time.TimeComponents)88 DateComponents (org.orekit.time.DateComponents)87 AbsoluteDate (org.orekit.time.AbsoluteDate)84 Test (org.junit.Test)72 KeplerianOrbit (org.orekit.orbits.KeplerianOrbit)55 FieldAbsoluteDate (org.orekit.time.FieldAbsoluteDate)55 Vector3D (org.hipparchus.geometry.euclidean.threed.Vector3D)47 Orbit (org.orekit.orbits.Orbit)44 SpacecraftState (org.orekit.propagation.SpacecraftState)42 CartesianOrbit (org.orekit.orbits.CartesianOrbit)35 FieldKeplerianOrbit (org.orekit.orbits.FieldKeplerianOrbit)35 FieldSpacecraftState (org.orekit.propagation.FieldSpacecraftState)32 AbstractLegacyForceModelTest (org.orekit.forces.AbstractLegacyForceModelTest)28 PVCoordinates (org.orekit.utils.PVCoordinates)24 EquinoctialOrbit (org.orekit.orbits.EquinoctialOrbit)22 FieldVector3D (org.hipparchus.geometry.euclidean.threed.FieldVector3D)17 Rotation (org.hipparchus.geometry.euclidean.threed.Rotation)17 NumericalPropagator (org.orekit.propagation.numerical.NumericalPropagator)17 CircularOrbit (org.orekit.orbits.CircularOrbit)16 FieldNumericalPropagator (org.orekit.propagation.numerical.FieldNumericalPropagator)16