def get_param(ulog, parameter_name, default):
    """Recover a parameter from the ulog structure.

    Arguments:
    ulog -- messages stored in ulog structure
    parameter_name -- name of the parameter that should be recovered
    default -- default value that will be returned if the parameter is not available

    """
    if parameter_name in ulog.initial_parameters.keys():
        return ulog.initial_parameters[parameter_name]
    else:
        return default