import math


def get_distance(weather1: dict, weather2: dict, radius: float = 6371.0) -> float:
    """
    Given two weather dicts, get the distance between them, in kilometers.
    Uses equirectangular approximation. Assumes sphere; error up to 0.5% expected.
    If sphere in question is not Earth, an optional radius param is the radius of the sphere, in expected output units.
    """

    lat1 = weather1['coord']['lat']
    lat2 = weather2['coord']['lat']
    lon1 = weather1['coord']['lon']
    lon2 = weather2['coord']['lon']
    lat1 = math.radians(lat1)
    lat2 = math.radians(lat2)
    lon1 = math.radians(lon1)
    lon2 = math.radians(lon2)
    x = (lon2 - lon1) * math.cos(0.5 * (lat2 + lat1))
    y = lat2 - lat1
    return radius * math.sqrt(x * x + y * y)