Search in sources :

Example 6 with SP3Coordinate

use of org.orekit.files.sp3.SP3File.SP3Coordinate in project Orekit by CS-SI.

the class SP3ParserTest method testParseSP3d2.

@Test
public void testParseSP3d2() throws OrekitException, IOException {
    // simple test for version sp3-c, contains p/v entries and correlations
    final String ex = "/sp3/example-d-2.sp3";
    final SP3Parser parser = new SP3Parser();
    final InputStream inEntry = getClass().getResourceAsStream(ex);
    final SP3File file = parser.parse(inEntry);
    Assert.assertEquals(SP3OrbitType.HLM, file.getOrbitType());
    Assert.assertEquals(TimeSystem.GPS, file.getTimeSystem());
    Assert.assertEquals(26, file.getSatelliteCount());
    final List<SP3Coordinate> coords = file.getSatellites().get("G01").getCoordinates();
    Assert.assertEquals(2, coords.size());
    final SP3Coordinate coord = coords.get(0);
    // 2001  8  8  0  0  0.00000000
    Assert.assertEquals(new AbsoluteDate(2001, 8, 8, 0, 0, 0, TimeScalesFactory.getGPS()), coord.getDate());
    // PG01 -11044.805800 -10475.672350  21929.418200    189.163300 18 18 18 219
    // VG01  20298.880364 -18462.044804   1381.387685     -4.534317 14 14 14 191
    checkPVEntry(new PVCoordinates(new Vector3D(-11044805.8, -10475672.35, 21929418.2), new Vector3D(2029.8880364, -1846.2044804, 138.1387685)), coord);
}
Also used : SP3Coordinate(org.orekit.files.sp3.SP3File.SP3Coordinate) Vector3D(org.hipparchus.geometry.euclidean.threed.Vector3D) InputStream(java.io.InputStream) PVCoordinates(org.orekit.utils.PVCoordinates) AbsoluteDate(org.orekit.time.AbsoluteDate) Test(org.junit.Test)

Example 7 with SP3Coordinate

use of org.orekit.files.sp3.SP3File.SP3Coordinate in project Orekit by CS-SI.

the class SP3ParserTest method testParseSP3a2.

@Test
public void testParseSP3a2() throws OrekitException, IOException {
    // simple test for version sp3-a, contains p/v entries
    final String ex = "/sp3/example-a-2.sp3";
    final SP3Parser parser = new SP3Parser();
    final InputStream inEntry = getClass().getResourceAsStream(ex);
    final SP3File file = parser.parse(inEntry);
    Assert.assertEquals(SP3OrbitType.FIT, file.getOrbitType());
    Assert.assertEquals(TimeSystem.GPS, file.getTimeSystem());
    Assert.assertEquals(25, file.getSatelliteCount());
    final List<SP3Coordinate> coords = file.getSatellites().get("1").getCoordinates();
    Assert.assertEquals(3, coords.size());
    final SP3Coordinate coord = coords.get(0);
    // 1994 12 17 0 0 0.00000000
    Assert.assertEquals(new AbsoluteDate(1994, 12, 17, 0, 0, 0, TimeScalesFactory.getGPS()), coord.getDate());
    // P 1 16258.524750 -3529.015750 -20611.427050 -62.540600
    // V 1  -6560.373522  25605.954994  -9460.427179     -0.024236
    checkPVEntry(new PVCoordinates(new Vector3D(16258524.75, -3529015.75, -20611427.049), new Vector3D(-656.0373, 2560.5954, -946.0427)), coord);
}
Also used : SP3Coordinate(org.orekit.files.sp3.SP3File.SP3Coordinate) Vector3D(org.hipparchus.geometry.euclidean.threed.Vector3D) InputStream(java.io.InputStream) PVCoordinates(org.orekit.utils.PVCoordinates) AbsoluteDate(org.orekit.time.AbsoluteDate) Test(org.junit.Test)

Example 8 with SP3Coordinate

use of org.orekit.files.sp3.SP3File.SP3Coordinate in project Orekit by CS-SI.

the class SP3ParserTest method testSP3GFZ.

@Test
public void testSP3GFZ() throws OrekitException, IOException {
    // simple test for version sp3-c, contains more than 85 satellites
    final String ex = "/sp3/gbm19500_truncated.sp3";
    final SP3Parser parser = new SP3Parser();
    final InputStream inEntry = getClass().getResourceAsStream(ex);
    final SP3File file = parser.parse(inEntry);
    Assert.assertEquals(SP3OrbitType.FIT, file.getOrbitType());
    Assert.assertEquals(TimeSystem.GPS, file.getTimeSystem());
    Assert.assertEquals(87, file.getSatelliteCount());
    final List<SP3Coordinate> coords = file.getSatellites().get("R23").getCoordinates();
    Assert.assertEquals(2, coords.size());
    final SP3Coordinate coord = coords.get(0);
    Assert.assertEquals(new AbsoluteDate(2017, 5, 21, 0, 0, 0, TimeScalesFactory.getGPS()), coord.getDate());
    // PG01 -11044.805800 -10475.672350  21929.418200    189.163300 18 18 18 219
    // PR23  24552.470459   -242.899447   6925.437998     86.875825
    checkPVEntry(new PVCoordinates(new Vector3D(24552470.459, -242899.447, 6925437.998), Vector3D.ZERO), coord);
}
Also used : SP3Coordinate(org.orekit.files.sp3.SP3File.SP3Coordinate) Vector3D(org.hipparchus.geometry.euclidean.threed.Vector3D) InputStream(java.io.InputStream) PVCoordinates(org.orekit.utils.PVCoordinates) AbsoluteDate(org.orekit.time.AbsoluteDate) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)8 SP3Coordinate (org.orekit.files.sp3.SP3File.SP3Coordinate)8 AbsoluteDate (org.orekit.time.AbsoluteDate)8 InputStream (java.io.InputStream)7 Vector3D (org.hipparchus.geometry.euclidean.threed.Vector3D)7 PVCoordinates (org.orekit.utils.PVCoordinates)7 SP3Ephemeris (org.orekit.files.sp3.SP3File.SP3Ephemeris)1 FactoryManagedFrame (org.orekit.frames.FactoryManagedFrame)1 Frame (org.orekit.frames.Frame)1 BoundedPropagator (org.orekit.propagation.BoundedPropagator)1 TimeScale (org.orekit.time.TimeScale)1