code: def haversine(lng_p1, lat_p1, lng_p2, lat_p2):
      
      # 2* for the distance in rad and * 12742(mean diameter of earth) for the distance in km
      return 12742 * asin(
          sqrt(((sin((lat_p1 - lat_p2) / 2)) ** 2 + cos(lat_p2) * cos(lat_p1) * (sin((lng_p1 - lng_p2) / 2)) ** 2)))
docs: :param lng_p1: the longitude of point 1 in radians
      :param lat_p1: the latitude of point 1 in radians
      :param lng_p2: the longitude of point 1 in radians
      :param lat_p2: the latitude of point 1 in radians
      :return: distance between p1 and p2 in km
      this is only an approximation since the earth is not a real sphere