Skip to content
Snippets Groups Projects
Commit 30f0c3a7 authored by Jonathan Guinet's avatar Jonathan Guinet
Browse files

EARTH_RADIUS removed.

parent c2120f0e
No related branches found
No related tags found
No related merge requests found
...@@ -18,6 +18,7 @@ package RefiningPleiades.metrics; ...@@ -18,6 +18,7 @@ package RefiningPleiades.metrics;
import org.hipparchus.geometry.euclidean.threed.Vector3D; import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.hipparchus.util.FastMath; import org.hipparchus.util.FastMath;
import org.orekit.utils.Constants;
/** /**
* Class for computing geodetic distance. * Class for computing geodetic distance.
...@@ -28,10 +29,6 @@ import org.hipparchus.util.FastMath; ...@@ -28,10 +29,6 @@ import org.hipparchus.util.FastMath;
*/ */
public class DistanceTools { public class DistanceTools {
/** Earth radius in cms. */
// TODO GP constant for earth ???
public static final double EARTH_RADIUS = 637100000d;
/** Private constructor for utility class. /** Private constructor for utility class.
*/ */
private DistanceTools() { private DistanceTools() {
...@@ -65,12 +62,11 @@ public class DistanceTools { ...@@ -65,12 +62,11 @@ public class DistanceTools {
*/ */
public static double computeDistanceInMeter(final double long1, final double lat1, public static double computeDistanceInMeter(final double long1, final double lat1,
final double long2, final double lat2) { final double long2, final double lat2) {
// get vectors on unit sphere from angular coordinates // get vectors on unit sphere from angular coordinates
final Vector3D p1 = new Vector3D(lat1, long1); // final Vector3D p1 = new Vector3D(lat1, long1); //
final Vector3D p2 = new Vector3D(lat2, long2); final Vector3D p2 = new Vector3D(lat2, long2);
final double distance = Constants.WGS84_EARTH_EQUATORIAL_RADIUS * Vector3D.angle(p1, p2);
final double distance = EARTH_RADIUS / 100 * Vector3D.angle(p1, p2);
return distance; return distance;
} }
......
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