code: public static final double speed(WayPoint wp1, WayPoint wp2)
      {
          double lat1 = wp1.getLatitude();
          double lat2 = wp2.getLatitude();
          double lon1 = wp1.getLongitude();
          double lon2 = wp2.getLongitude();
          long time1 = wp1.getTime();
          long time2 = wp2.getTime();
          return speed(time1, lat1, lon1, time2, lat2, lon2);
      }
docs: Returns the speed needed to move from wp1 to wp2
  @param wp1
  @param wp2
  @return Kts