code: public static double distance( double lat1, double lon1, double lat2, double lon2 )
    {
      double deltaLon = lon1 - lon2;
  
      deltaLon = (deltaLon * Math.PI) / 180;
      lat1 = (lat1 * Math.PI) / 180;
      lat2 = (lat2 * Math.PI) / 180;
  
      return EARTH_RADIUS * Math.acos( Math.sin( lat1 ) * Math.sin( lat2 ) + Math.cos( lat1 ) * Math.cos( lat2 ) * Math.cos( deltaLon ) );
    }
docs: meters