graphdb/src/main/java/com/orientechnologies/orient/graph/sql/functions/OSQLFunctionHeuristicPathFinderAbstract.java
public double gcdist(double lata, double longa, double latb, double longb) {
        double midlat, psi, dist;
        midlat = 0.5 * (lata + latb);
        psi = 0.0174532925
                * Math.sqrt(Math.pow(lata - latb, 2)
                + Math.pow((longa - longb)
                * Math.cos(0.0174532925 * midlat), 2));
        dist = 6372.640112 * psi;
        return dist;
    }
public double gcdist(double lata, double longa, double latb, double longb) {
        double midlat, psi, dist;
        midlat = 0.5 * (lata + latb);
        psi = 0.0174532925
                * Math.sqrt(Math.pow(lata - latb, 2)
                + Math.pow((longa - longb)
                * Math.cos(0.0174532925 * midlat), 2));
        dist = 6372.640112 * psi;
        return dist;
    }
public double gcdist ( double lata , double longa , double latb , double longb ) { double midlat , psi , dist ; midlat = 0.5 * ( lata + latb ) ; psi = 0.0174532925 * Math . sqrt ( Math . pow ( lata - latb , 2 ) + Math . pow ( ( longa - longb ) * Math . cos ( 0.0174532925 * midlat ) , 2 ) ) ; dist = 6372.640112 * psi ; return dist ; }
obtains from https://github.com/enderceylan/CS-314--Data-Structures/blob/master/HW10-Graph.java
obtains from https : // github . com / enderceylan / CS - 314 -- Data - Structures / blob / master / HW10 - Graph . java