code: public static double latLonDist(double lon1, double lat1, double lon2,
  			double lat2) {
  
  		double[] aux;
  		try {
  			aux = PIGbsl(lon1, lat1, lon2, lat2, Ellipsoid.WGS84);
  		} catch (Exception e) {
  			// Calculator.debugThis(true, "Error while getting dist: " +
  			// e.getMessage(), logger);
  			return Double.MAX_VALUE;
  		}
  		return aux[2];
  	}
docs: 2 * Math.PI*Calculator.MERCATOR_EARTH_RADIUS);