double dphi = Math.log((1 + Math.sin(lat2)) / Math.cos(lat2)) - Math.log((1 + Math.sin(lat1)) / Math.cos(lat1));
    public static float getDistanceBetweenPoints(LatLonPoint p1, LatLonPoint p2) {        double lat1 = (double) p1.radlat_;        double lon1 = (double) p1.radlon_;        double lat2 = (double) p2.radlat_;        double lon2 = (double) p2.radlon_;        double d = 0.0;        double tc = 0.0;        double dlon_W = mod(lon2 - lon1, 2 * Math.PI);        double dlon_E = mod(lon1 - lon2, 2 * Math.PI);        double dphi = Math.log((1 + Math.sin(lat2)) / Math.cos(lat2))                - Math.log((1 + Math.sin(lat1)) / Math.cos(lat1));        tc = getAzimuthBetweenPoints(p1, p2);        if (Math.abs(lat1 - lat2) < Math.sqrt(0.00000000000001)) {            d = Math.min(dlon_W, dlon_E) * Math.cos(lat1); // distance                                                           // along                                                           // parallel        } else {            d = Math.abs((lat2 - lat1) / Math.cos(tc));        }        float dist = (float) (d * 10800.0 / Math.PI * 1855.3);        //System.out.println("DWrong = " + distWrong + " DOK = " +        // dist);        return dist;    }