Skip to content
Snippets Groups Projects
Commit 2f1962e8 authored by Guylaine Prat's avatar Guylaine Prat
Browse files

Simplify the use of external data.

parent 5bda09e5
No related branches found
No related tags found
No related merge requests found
...@@ -28,7 +28,6 @@ import org.orekit.bodies.GeodeticPoint; ...@@ -28,7 +28,6 @@ import org.orekit.bodies.GeodeticPoint;
import org.orekit.data.DataProvidersManager; import org.orekit.data.DataProvidersManager;
import org.orekit.data.DirectoryCrawler; import org.orekit.data.DirectoryCrawler;
import org.orekit.errors.OrekitException; import org.orekit.errors.OrekitException;
import org.orekit.forces.gravity.potential.NormalizedSphericalHarmonicsProvider;
import org.orekit.orbits.Orbit; import org.orekit.orbits.Orbit;
import org.orekit.rugged.api.AlgorithmId; import org.orekit.rugged.api.AlgorithmId;
import org.orekit.rugged.api.BodyRotatingFrameId; import org.orekit.rugged.api.BodyRotatingFrameId;
...@@ -42,6 +41,7 @@ import org.orekit.rugged.adjustment.measurements.SensorToGroundMapping; ...@@ -42,6 +41,7 @@ import org.orekit.rugged.adjustment.measurements.SensorToGroundMapping;
import org.orekit.time.AbsoluteDate; import org.orekit.time.AbsoluteDate;
import org.orekit.utils.AngularDerivativesFilter; import org.orekit.utils.AngularDerivativesFilter;
import org.orekit.utils.CartesianDerivativesFilter; import org.orekit.utils.CartesianDerivativesFilter;
import org.orekit.utils.Constants;
import org.orekit.utils.PVCoordinates; import org.orekit.utils.PVCoordinates;
import org.orekit.utils.TimeStampedAngularCoordinates; import org.orekit.utils.TimeStampedAngularCoordinates;
import org.orekit.utils.TimeStampedPVCoordinates; import org.orekit.utils.TimeStampedPVCoordinates;
...@@ -108,8 +108,7 @@ public class InterRefining extends Refining { ...@@ -108,8 +108,7 @@ public class InterRefining extends Refining {
// ----Satellite position, velocity and attitude: create orbit model A // ----Satellite position, velocity and attitude: create orbit model A
OrbitModel orbitmodelA = new OrbitModel(); OrbitModel orbitmodelA = new OrbitModel();
BodyShape earthA = orbitmodelA.createEarth(); BodyShape earthA = orbitmodelA.createEarth();
NormalizedSphericalHarmonicsProvider gravityFieldA = orbitmodelA.createGravityField(); Orbit orbitA = orbitmodelA.createOrbit(Constants.EIGEN5C_EARTH_MU, refDateA);
Orbit orbitA = orbitmodelA.createOrbit(gravityFieldA.getMu(), refDateA);
// ----If no LOF Transform Attitude Provider is Nadir Pointing Yaw Compensation // ----If no LOF Transform Attitude Provider is Nadir Pointing Yaw Compensation
final double [] rollPoly = {0.0,0.0,0.0}; final double [] rollPoly = {0.0,0.0,0.0};
...@@ -166,8 +165,7 @@ public class InterRefining extends Refining { ...@@ -166,8 +165,7 @@ public class InterRefining extends Refining {
// ----Satellite position, velocity and attitude: create orbit model B // ----Satellite position, velocity and attitude: create orbit model B
OrbitModel orbitmodelB = new OrbitModel(); OrbitModel orbitmodelB = new OrbitModel();
BodyShape earthB = orbitmodelB.createEarth(); BodyShape earthB = orbitmodelB.createEarth();
NormalizedSphericalHarmonicsProvider gravityFieldB = orbitmodelB.createGravityField(); Orbit orbitB = orbitmodelB.createOrbit(Constants.EIGEN5C_EARTH_MU, refDateB);
Orbit orbitB = orbitmodelB.createOrbit(gravityFieldB.getMu(), refDateB);
// ----Satellite attitude // ----Satellite attitude
List<TimeStampedAngularCoordinates> satelliteQListB = orbitmodelB.orbitToQ(orbitB, earthB, minDateB.shiftedBy(-0.0), maxDateB.shiftedBy(+0.0), 0.25); 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 { ...@@ -292,6 +290,7 @@ public class InterRefining extends Refining {
// ------------------ // ------------------
System.out.format("\n**** Compute Statistics **** %n"); System.out.format("\n**** Compute Statistics **** %n");
refining.computeMetrics(measurements.getInterMapping(), ruggedA, ruggedB, false); refining.computeMetrics(measurements.getInterMapping(), ruggedA, ruggedB, false);
} catch (OrekitException oe) { } catch (OrekitException oe) {
System.err.println(oe.getLocalizedMessage()); System.err.println(oe.getLocalizedMessage());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment