def find_aircraft_id(key, config):
    """
    find_aircraft_id

    The aircraft identifier can be given either as a dictionary key in the yaml
    file or under the fields 'identifier' or 'id' in the aircraft configuration
    item. This function test in the parsed yaml to find the aircraft id.
    """

    if 'identifier' in config.keys():
        return str(config['identifier'])
    elif 'id' in config.keys():
        return str(config['id'])
    else:
        return str(key)