def set_name_callsign(icao: str, reg=None, craft_type=None, flight=None, known_craft={}):
    """
    Sets the Name and Callsign of the CoT Event.
    Populates the fields with ICAO, Reg, Craft Type and Flight data, if available.
    """
    name: str = known_craft.get("CALLSIGN")
    if name:
        callsign = name
    else:
        name = f"ICAO-{icao}"
        if flight and reg and craft_type:
            callsign = "-".join([flight.strip().upper(), reg, craft_type])
        elif reg and craft_type:
            callsign = "-".join([reg, craft_type])
        elif flight:
            callsign = flight.strip().upper()
        elif reg:
            callsign = reg
        else:
            callsign = name
    return name, callsign