def haversine_distance_from(p2)
      d_lat = p2.latr - latr
      d_lon = p2.lonr - lonr
      a = Math.sin(d_lat / 2) * Math.sin(d_lat / 2) + Math.cos(latr) * Math.cos(p2.latr) * Math.sin(d_lon / 2) * Math.sin(d_lon / 2)
      c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a))
      RADIUS * c
    end
def haversine_distance_from(p2)
      d_lat = p2.latr - latr
      d_lon = p2.lonr - lonr
      a = Math.sin(d_lat / 2) * Math.sin(d_lat / 2) + Math.cos(latr) * Math.cos(p2.latr) * Math.sin(d_lon / 2) * Math.sin(d_lon / 2)
      c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a))
      RADIUS * c
    end
Units are in km