import math


def electrode_distance(latlong_a, latlong_b, radius=100.0):
    """
    geodesic (great-circle) distance between two electrodes, A and B
    :param latlong_a: spherical coordinates of electrode A
    :param latlong_b: spherical coordinates of electrode B
    :return: distance
    """

    lat1, lon1 = latlong_a
    lat2, lon2 = latlong_b

    dLat = math.radians(lat2 - lat1)
    dLon = math.radians(lon2 - lon1)

    a = math.sin(dLat / 2) * math.sin(dLat / 2) + math.cos(
        math.radians(lat1)
    ) * math.cos(math.radians(lat2)) * math.sin(dLon / 2) * math.sin(dLon / 2)

    c = 2 * math.atan2(math.sqrt(a), math.sqrt(1 - a))
    d = radius * c
    return d