From 2f1962e87ddbc9d45126f54d3daabb39fbf167f8 Mon Sep 17 00:00:00 2001 From: Guylaine Prat <guylaine.prat@c-s.fr> Date: Thu, 18 Jan 2018 13:17:32 +0100 Subject: [PATCH] Simplify the use of external data. --- .../fr/cs/examples/refiningPleiades/InterRefining.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/tutorials/java/fr/cs/examples/refiningPleiades/InterRefining.java b/src/tutorials/java/fr/cs/examples/refiningPleiades/InterRefining.java index c0f9354c..6028823f 100644 --- a/src/tutorials/java/fr/cs/examples/refiningPleiades/InterRefining.java +++ b/src/tutorials/java/fr/cs/examples/refiningPleiades/InterRefining.java @@ -28,7 +28,6 @@ import org.orekit.bodies.GeodeticPoint; import org.orekit.data.DataProvidersManager; import org.orekit.data.DirectoryCrawler; import org.orekit.errors.OrekitException; -import org.orekit.forces.gravity.potential.NormalizedSphericalHarmonicsProvider; import org.orekit.orbits.Orbit; import org.orekit.rugged.api.AlgorithmId; import org.orekit.rugged.api.BodyRotatingFrameId; @@ -42,6 +41,7 @@ import org.orekit.rugged.adjustment.measurements.SensorToGroundMapping; import org.orekit.time.AbsoluteDate; import org.orekit.utils.AngularDerivativesFilter; import org.orekit.utils.CartesianDerivativesFilter; +import org.orekit.utils.Constants; import org.orekit.utils.PVCoordinates; import org.orekit.utils.TimeStampedAngularCoordinates; import org.orekit.utils.TimeStampedPVCoordinates; @@ -108,8 +108,7 @@ public class InterRefining extends Refining { // ----Satellite position, velocity and attitude: create orbit model A OrbitModel orbitmodelA = new OrbitModel(); BodyShape earthA = orbitmodelA.createEarth(); - NormalizedSphericalHarmonicsProvider gravityFieldA = orbitmodelA.createGravityField(); - Orbit orbitA = orbitmodelA.createOrbit(gravityFieldA.getMu(), refDateA); + Orbit orbitA = orbitmodelA.createOrbit(Constants.EIGEN5C_EARTH_MU, refDateA); // ----If no LOF Transform Attitude Provider is Nadir Pointing Yaw Compensation final double [] rollPoly = {0.0,0.0,0.0}; @@ -166,8 +165,7 @@ public class InterRefining extends Refining { // ----Satellite position, velocity and attitude: create orbit model B OrbitModel orbitmodelB = new OrbitModel(); BodyShape earthB = orbitmodelB.createEarth(); - NormalizedSphericalHarmonicsProvider gravityFieldB = orbitmodelB.createGravityField(); - Orbit orbitB = orbitmodelB.createOrbit(gravityFieldB.getMu(), refDateB); + Orbit orbitB = orbitmodelB.createOrbit(Constants.EIGEN5C_EARTH_MU, refDateB); // ----Satellite attitude List<TimeStampedAngularCoordinates> satelliteQListB = orbitmodelB.orbitToQ(orbitB, earthB, minDateB.shiftedBy(-0.0), maxDateB.shiftedBy(+0.0), 0.25); @@ -292,6 +290,7 @@ public class InterRefining extends Refining { // ------------------ System.out.format("\n**** Compute Statistics **** %n"); refining.computeMetrics(measurements.getInterMapping(), ruggedA, ruggedB, false); + } catch (OrekitException oe) { System.err.println(oe.getLocalizedMessage()); -- GitLab