def get_float(fields, key):
    """Convert a string value to a float, handling blank values."""
    value = fields[key]
    try:
        value = float(value)
    except ValueError:
        value = 0.0
    return value