@staticmethod
def generate_passcode(callsign: str) ->str:
    """
        Generate an APRS-IS passcode for a given callsign.

        :param str callsign: a callsign, with or without an SSID

        This will generate an APRS-IS passcode for a callsign, after stripping the SSID (if given).
        """
    passcode = 29666
    base_call = callsign.split('-')[0].upper()
    high = True
    for c in base_call:
        if high:
            passcode ^= ord(c) << 8
            high = False
        else:
            passcode ^= ord(c)
            high = True
    return str(passcode)
