code: public static double distanceInMeters(@Nonnull final Point p1, @Nonnull final Point p2) {
          checkNonnull("p1", p1);
          checkNonnull("p2", p2);
  
          final Point from;
          final Point to;
          if (p1.getLonDeg() <= p2.getLonDeg()) {
              from = p1;
              to = p2;
          } else {
              from = p2;
              to = p1;
          }
  
          // Calculate mid point of 2 latitudes.
          final double avgLat = (from.getLatDeg() + to.getLatDeg()) / 2.0;
  
          final double deltaLatDeg = Math.abs(to.getLatDeg() - from.getLatDeg());
          final double deltaLonDeg360 = Math.abs(to.getLonDeg() - from.getLonDeg());
          final double deltaLonDeg = ((deltaLonDeg360 <= 180.0) ? deltaLonDeg360 : (360.0 - deltaLonDeg360));
  
          // Meters per longitude is fixed; per latitude requires * cos(avg(lat)).
          final double deltaXMeters = degreesLonToMetersAtLat(deltaLonDeg, avgLat);
          final double deltaYMeters = degreesLatToMeters(deltaLatDeg);
  
  
          // Calculate length through Earth. This is an approximation, but works fine for short distances.
          return Math.sqrt((deltaXMeters * deltaXMeters) + (deltaYMeters * deltaYMeters));
      }
docs: Calculate the distance between two points. This algorithm does not take the curvature of the Earth into
  account, so it only works for small distance up to, say 200 km, and not too close to the poles.
  
  @param p1 Point 1.
  @param p2 Point 2.
  @return Straight distance between p1 and p2. Only accurate for small distances up to 200 km.