class Geo {

    public static double fastDistance(double lat1, double lon1, double lat2, double lon2) {
        final double lat1r = Math.toRadians(lat1);
        final double lat2r = Math.toRadians(lat2);
        final double delta_lon = Math.toRadians(lon2 - lon1);

        final double x = delta_lon * Math.cos((lat1r + lat2r) / 2);
        final double y = lat2r - lat1r;

        return R * Math.sqrt(x * x + y * y);
    }

}