List of usage examples for org.apache.commons.math3.geometry.euclidean.threed Vector3D Vector3D
public Vector3D(double x, double y, double z)
From source file:org.orekit.frames.ITRFProviderTest.java
@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, 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);/*from w w w . j a v a2 s . c om*/ 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); }
From source file:org.orekit.frames.ITRFProviderWithoutTidalEffectsTest.java
@Test public void testRoughRotation() throws OrekitException { AbsoluteDate date1 = new AbsoluteDate(new DateComponents(2006, 02, 24), new TimeComponents(15, 38, 00), TimeScalesFactory.getUTC()); Frame itrf2008 = FramesFactory.getITRF(IERSConventions.IERS_2010, true); Transform t0 = itrf2008.getTransformTo(FramesFactory.getEME2000(), date1); double dt = 10.0; AbsoluteDate date2 = date1.shiftedBy(dt); Transform t1 = itrf2008.getTransformTo(FramesFactory.getEME2000(), date2); Transform evolution = new Transform(date2, t0.getInverse(), t1); Vector3D p = new Vector3D(6000, 6000, 0); Assert.assertEquals(0.0, evolution.transformPosition(Vector3D.ZERO).getNorm(), 1.0e-15); Assert.assertEquals(0.0, evolution.transformVector(p).getZ(), 0.003); Assert.assertEquals(2 * FastMath.PI * dt / 86164, Vector3D.angle(t0.transformVector(p), t1.transformVector(p)), 1.0e-9); }
From source file:org.orekit.frames.ITRFProviderWithoutTidalEffectsTest.java
@Test public void testMSLIBTransformJ2000_TerVrai() throws OrekitException { AbsoluteDate date = new AbsoluteDate(new DateComponents(2003, 10, 14), new TimeComponents(02, 00, 00), TimeScalesFactory.getUTC()); Transform trans = FramesFactory.getEME2000() .getTransformTo(FramesFactory.getTIRF(IERSConventions.IERS_2010), date); // Positions/* ww w .jav a2 s.co m*/ Vector3D posTIRF = trans.transformPosition(new Vector3D(6500000.0, -1234567.0, 4000000.0)); Assert.assertEquals(0, 3011109.361 - posTIRF.getX(), 0.38); Assert.assertEquals(0, -5889822.669 - posTIRF.getY(), 0.38); Assert.assertEquals(0, 4002170.039 - posTIRF.getZ(), 0.27); }
From source file:org.orekit.frames.ITRFProviderWithoutTidalEffectsTest.java
@Test public void testMSLIBTransformJ2000_TerRef() throws OrekitException { AbsoluteDate t0 = new AbsoluteDate(new DateComponents(2003, 10, 14), new TimeComponents(02, 00, 00), TimeScalesFactory.getUTC()); Frame itrf = FramesFactory.getITRF(IERSConventions.IERS_2010, true); Transform trans = FramesFactory.getEME2000().getTransformTo(itrf, t0); // Coordinates in EME2000 PVCoordinates pvEME2000 = new PVCoordinates(new Vector3D(6500000.0, -1234567.0, 4000000.0), new Vector3D(3609.28229, 3322.88979, -7083.950661)); // Reference coordinates in ITRF PVCoordinates pvRef = new PVCoordinates( new Vector3D(3011113.971820046, -5889827.854375269, 4002158.938875904), new Vector3D(4410.393506651586, -1033.61784235127, -7082.633883124906)); // tests using direct transform checkPV(pvRef, trans.transformPVCoordinates(pvEME2000), 0.594, 1.79e-4); // compute local evolution using finite differences double h = 1.0; Rotation r0 = trans.getRotation();//from ww w . j a va2 s . c o m AbsoluteDate date = t0.shiftedBy(-2 * h); Rotation evoM2h = FramesFactory.getEME2000().getTransformTo(itrf, date).getRotation().applyTo(r0.revert()); double alphaM2h = -evoM2h.getAngle(); Vector3D axisM2h = evoM2h.getAxis(); date = t0.shiftedBy(-h); Rotation evoM1h = FramesFactory.getEME2000().getTransformTo(itrf, date).getRotation().applyTo(r0.revert()); double alphaM1h = -evoM1h.getAngle(); Vector3D axisM1h = evoM1h.getAxis(); date = t0.shiftedBy(h); Rotation evoP1h = FramesFactory.getEME2000().getTransformTo(itrf, date).getRotation().applyTo(r0.revert()); double alphaP1h = evoP1h.getAngle(); Vector3D axisP1h = evoP1h.getAxis().negate(); date = t0.shiftedBy(2 * h); Rotation evoP2h = FramesFactory.getEME2000().getTransformTo(itrf, date).getRotation().applyTo(r0.revert()); double alphaP2h = evoP2h.getAngle(); Vector3D axisP2h = evoP2h.getAxis().negate(); double w = (8 * (alphaP1h - alphaM1h) - (alphaP2h - alphaM2h)) / (12 * h); Vector3D axis = axisM2h.add(axisM1h).add(axisP1h.add(axisP2h)).normalize(); Transform finiteDiffTransform = new Transform(t0, trans.getRotation(), new Vector3D(w, axis)); checkPV(pvRef, finiteDiffTransform.transformPVCoordinates(pvEME2000), 0.594, 1.78e-4); }
From source file:org.orekit.frames.ITRFProviderWithoutTidalEffectsTest.java
@Test public void testMontenbruck() throws OrekitException { AbsoluteDate t0 = new AbsoluteDate(new DateComponents(1999, 3, 4), TimeComponents.H00, TimeScalesFactory.getGPS()); Transform trans = FramesFactory.getITRF(IERSConventions.IERS_2010, true) .getTransformTo(FramesFactory.getGCRF(), t0); PVCoordinates pvWGS = new PVCoordinates(new Vector3D(19440953.805, 16881609.273, -6777115.092), new Vector3D(-811.1827456, -257.3799137, -3068.9508125)); checkPV(new PVCoordinates(new Vector3D(-23830592.685, -9747073.881, -6779831.010), new Vector3D(1561.9646362, -1754.3454485, -3068.8504996)), trans.transformPVCoordinates(pvWGS), 0.146, 3.43e-5);// w w w. jav a 2 s . c om }
From source file:org.orekit.frames.MODProviderTest.java
@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//from ww w . j av a2 s. c o m 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); }
From source file:org.orekit.frames.MODProviderTest.java
@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 AbsoluteDate t0 = new AbsoluteDate(new DateComponents(2004, 06, 01), TimeComponents.H00, TimeScalesFactory.getUTC()); Transform tt = FramesFactory.getGCRF().getTransformTo(FramesFactory.getMOD(IERSConventions.IERS_1996), t0); //GCRF iau76 w corr PVCoordinates pvGCRFiau76 = new PVCoordinates(new Vector3D(-40588150.3649, -11462167.0282, 27143.2028), new Vector3D(834.787457, -2958.305691, -1.172994)); double norm = pvGCRFiau76.getPosition().getNorm(); //MOD iau76 w corr PVCoordinates pvMODiau76Wcorr = new PVCoordinates(new Vector3D(-40576822.6395, -11502231.5015, 9733.7842), new Vector3D(837.708020, -2957.480117, -0.814253)); checkPV(pvMODiau76Wcorr, tt.transformPVCoordinates(pvGCRFiau76), 9e-12 * norm, 6.9e-7); Transform tf = FramesFactory.getEME2000().getTransformTo(FramesFactory.getMOD(false), t0); //J2000 iau76 PVCoordinates pvJ2000iau76 = new PVCoordinates(new Vector3D(-40588150.3620, -11462167.0280, 27147.6490), new Vector3D(834.787457, -2958.305691, -1.173016)); //MOD iau76//from w ww .j a v a 2s. c om PVCoordinates pvMODiau76 = new PVCoordinates(new Vector3D(-40576822.6385, -11502231.5013, 9738.2304), new Vector3D(837.708020, -2957.480118, -0.814275)); checkPV(pvMODiau76, tf.transformPVCoordinates(pvJ2000iau76), 9e-12 * norm, 6.9e-7); }
From source file:org.orekit.frames.TEMEProviderTest.java
@Test public void testValladoTEMEofDate() throws OrekitException { // this reference test has been extracted from Vallado's book: // Fundamentals of Astrodynamics and Applications // David A. Vallado, Space Technology Library, 2007 AbsoluteDate t0 = new AbsoluteDate(new DateComponents(2000, 182), new TimeComponents(0.78495062 * Constants.JULIAN_DAY), TimeScalesFactory.getUTC()); // TEME/*from w ww .j av a 2 s .c o m*/ PVCoordinates pvTEME = new PVCoordinates(new Vector3D(-9060473.73569, 4658709.52502, 813686.73153), new Vector3D(-2232.832783, -4110.453490, -3157.345433)); // reference position in EME2000 // note that Valado's book gives // PVCoordinates pvEME2000Ref = // new PVCoordinates(new Vector3D(-9059941.3786, 4659697.2000, 813958.8875), // new Vector3D(-2233.348094, -4110.136162, -3157.394074)); // the values we use here are slightly different, they were computed using // Vallado's C++ companion code to the book, using the teme_j2k function with // all 106 nutation terms and the 2 corrections elements of the equation of the equinoxes PVCoordinates pvEME2000Ref = new PVCoordinates( new Vector3D(-9059941.5224999374914, 4659697.1225837596648, 813957.72947647583351), new Vector3D(-2233.3476939179299769, -4110.1362849403413335, -3157.3941963060194738)); Transform t = FramesFactory.getTEME().getTransformTo(FramesFactory.getEME2000(), t0); PVCoordinates pvEME2000Computed = t.transformPVCoordinates(pvTEME); PVCoordinates delta = new PVCoordinates(pvEME2000Computed, pvEME2000Ref); Assert.assertEquals(0.0, delta.getPosition().getNorm(), 0.025); Assert.assertEquals(0.0, delta.getVelocity().getNorm(), 1.0e-4); }
From source file:org.orekit.frames.TIRFProviderTest.java
@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 // Reference position & velocity from : "Fundamentals of Astrodynamics and Applications", Third edition, David A. Vallado Utils.setLoaders(IERSConventions.IERS_2010, Utils.buildEOPList(IERSConventions.IERS_2010, new double[][] { { 53098, -0.4399619, 0.0015563, -0.140682, 0.333309, Double.NaN, Double.NaN, -0.000199, -0.000252 }, { 53099, -0.4399619, 0.0015563, -0.140682, 0.333309, Double.NaN, Double.NaN, -0.000199, -0.000252 }, { 53100, -0.4399619, 0.0015563, -0.140682, 0.333309, Double.NaN, Double.NaN, -0.000199, -0.000252 }, { 53101, -0.4399619, 0.0015563, -0.140682, 0.333309, Double.NaN, Double.NaN, -0.000199, -0.000252 }, { 53102, -0.4399619, 0.0015563, -0.140682, 0.333309, Double.NaN, Double.NaN, -0.000199, -0.000252 }, { 53103, -0.4399619, 0.0015563, -0.140682, 0.333309, Double.NaN, Double.NaN, -0.000199, -0.000252 }, { 53104, -0.4399619, 0.0015563, -0.140682, 0.333309, Double.NaN, Double.NaN, -0.000199, -0.000252 }, { 53105, -0.4399619, 0.0015563, -0.140682, 0.333309, Double.NaN, Double.NaN, -0.000199, -0.000252 } }));/*from w w w . j a va2 s . co m*/ AbsoluteDate t0 = new AbsoluteDate(new DateComponents(2004, 04, 06), new TimeComponents(07, 51, 28.386009), TimeScalesFactory.getUTC()); // Positions LEO Frame itrfA = FramesFactory.getITRF(IERSConventions.IERS_2010, true); PVCoordinates pvITRF = new PVCoordinates(new Vector3D(-1033479.3830, 7901295.2754, 6380356.5958), new Vector3D(-3225.636520, -2872.451450, 5531.924446)); // Reference coordinates Frame tirf = FramesFactory.getTIRF(IERSConventions.IERS_2010); PVCoordinates pvTIRF = new PVCoordinates(new Vector3D(-1033475.0312, 7901305.5856, 6380344.5328), new Vector3D(-3225.632747, -2872.442511, 5531.931288)); checkPV(pvTIRF, itrfA.getTransformTo(tirf, t0).transformPVCoordinates(pvITRF), 6.379e-5, 3.78e-7); Frame cirf = FramesFactory.getCIRF(IERSConventions.IERS_2010, true); PVCoordinates pvCIRF = new PVCoordinates(new Vector3D(5100018.4047, 6122786.3648, 6380344.5328), new Vector3D(-4745.380330, 790.341453, 5531.931288)); checkPV(pvCIRF, tirf.getTransformTo(cirf, t0).transformPVCoordinates(pvTIRF), 8.59e-3, 4.65e-6); }
From source file:org.orekit.frames.TIRFProviderTest.java
@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_2010, Utils.buildEOPList(IERSConventions.IERS_2010, new double[][] { { 53153, -0.4709050, 0.0000000, -0.083853, 0.467217, Double.NaN, Double.NaN, -0.000199, -0.000252 }, { 53154, -0.4709050, 0.0000000, -0.083853, 0.467217, Double.NaN, Double.NaN, -0.000199, -0.000252 }, { 53155, -0.4709050, 0.0000000, -0.083853, 0.467217, Double.NaN, Double.NaN, -0.000199, -0.000252 }, { 53156, -0.4709050, 0.0000000, -0.083853, 0.467217, Double.NaN, Double.NaN, -0.000199, -0.000252 }, { 53157, -0.4709050, 0.0000000, -0.083853, 0.467217, Double.NaN, Double.NaN, -0.000199, -0.000252 }, { 53158, -0.4709050, 0.0000000, -0.083853, 0.467217, Double.NaN, Double.NaN, -0.000199, -0.000252 }, { 53159, -0.4709050, 0.0000000, -0.083853, 0.467217, Double.NaN, Double.NaN, -0.000199, -0.000252 }, { 53160, -0.4709050, 0.0000000, -0.083853, 0.467217, Double.NaN, Double.NaN, -0.000199, -0.000252 } }));/*w w w . ja v a 2 s. c o m*/ 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)); Frame tirf = FramesFactory.getTIRF(IERSConventions.IERS_2010); PVCoordinates pvTIRF = new PVCoordinates(new Vector3D(24796919.2953, -34115870.9004, 10293.2583), new Vector3D(-0.979178, -1.476540, -0.928772)); checkPV(pvTIRF, itrfA.getTransformTo(tirf, t0).transformPVCoordinates(pvITRF), 5.697e-5, 4.69e-7); Frame cirf = FramesFactory.getCIRF(IERSConventions.IERS_2010, true); PVCoordinates pvCIRF = new PVCoordinates(new Vector3D(-40588158.1236, -11462167.0709, 10293.2583), new Vector3D(834.787843, -2958.305669, -0.928772)); checkPV(pvCIRF, tirf.getTransformTo(cirf, t0).transformPVCoordinates(pvTIRF), 0.0505, 3.60e-6); }