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

Merge branch 'merge_rugged_refining' of https://www.orekit.org/git/rugged-main...

Merge branch 'merge_rugged_refining' of https://www.orekit.org/git/rugged-main into merge_rugged_refining
parents eaff5766 8329c9c4
No related branches found
No related tags found
No related merge requests found
/* Copyright 2013-2017 CS Systèmes d'Information
* Licensed to CS Systèmes d'Information (CS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* CS licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.orekit.rugged.api;
/** Enumerate for cartographic projection type.
* @author Lucie Labat-Allee
* @since 2.0
*/
public enum ProjectionTypeId {
/** Constant for WGS 84 projection type. */
WGS84,
/** Constant for UTM zone 1N projection type. */
UTM1N,
/** Constant for UTM zone 60N projection type. */
UTM60N,
/** Constant for UTM zone 1S projection type. */
UTM1S,
/** Constant for UTM zone 60S projection type. */
UTM60S,
/** Constant for Lambert-93 projection type. */
LAMBERT93
}
......@@ -18,6 +18,7 @@ package RefiningPleiades.metrics;
import org.hipparchus.geometry.euclidean.threed.Vector3D;
import org.hipparchus.util.FastMath;
import org.orekit.utils.Constants;
/**
* Class for computing geodetic distance.
......@@ -28,10 +29,6 @@ import org.hipparchus.util.FastMath;
*/
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 DistanceTools() {
......@@ -65,12 +62,11 @@ public class DistanceTools {
*/
public static double computeDistanceInMeter(final double long1, final double lat1,
final double long2, final double lat2) {
// get vectors on unit sphere from angular coordinates
final Vector3D p1 = new Vector3D(lat1, long1); //
final Vector3D p2 = new Vector3D(lat2, long2);
final double distance = EARTH_RADIUS / 100 * Vector3D.angle(p1, p2);
final double distance = Constants.WGS84_EARTH_EQUATORIAL_RADIUS * Vector3D.angle(p1, p2);
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