import math


def ll_dist(lon1, lat1, lon2, lat2):
    """
    Return distance between a pair of lat, lon points.
    """
    R_EARTH = 6378.139
    lat1, lat2, dlon, dlat = map(math.radians, \
                                 [lat1, lat2, (lon2 - lon1), (lat2 - lat1)])

    a = math.sin(dlat / 2) ** 2 + math.cos(lat1) * math.cos(lat2) * math.sin(dlon / 2) ** 2
    return R_EARTH * 2 * math.atan2(math.sqrt(a), math.sqrt(1 - a))