def get_legacy_msg_type(identifier):
    """
    Convert an SBP spec identifier to the message type #define identifier according to the legacy API
    Only works for real messages, will assert when called for any other type
    """

    assert identifier[:4] == "MSG_"
    return "SBP_" + identifier