Main Content

checkSignal

Check mapped signal

Since R2021a

    Description

    [summary,errorIndex] = checkSignal(mapper,logData) checks mapped signals stored in mapper using the imported flight log logData. Import your flight log using mavlinktlog or ulogreader.

    example

    [summary,errorIndex] = checkSignal(___,Name,Value) specifies options using one or more name-value pair arguments in addition to the input arguments in the previous syntax. For example, 'Preview',"on" shows a preview of the extracted signal.

    Examples

    collapse all

    Create a flightLogSignalMapping object for the ULOG file.

    mapping = flightLogSignalMapping("ulog");

    Load the ULOG file. Specify the relative path of the file.

    logData = ulogreader("flight.ulg");

    Check all the mapped signals stored in the flightLogSignalMapping object using the imported flight log.

    [summary,errorIndex] = checkSignal(mapping,logData)
    --------------------------------------------
    SignalName: Accel
    Pass
    --------------------------------------------
    SignalName: Gyro
    Pass
    --------------------------------------------
    SignalName: Mag
    Pass
    --------------------------------------------
    SignalName: Barometer
    Pass
    --------------------------------------------
    SignalName: GPS
    Pass
    --------------------------------------------
    SignalName: LocalNED
    Pass
    --------------------------------------------
    SignalName: LocalENU
    Pass
    --------------------------------------------
    SignalName: LocalNEDVel
    Pass
    --------------------------------------------
    SignalName: LocalENUVel
    Pass
    --------------------------------------------
    SignalName: LocalNEDTarget
    Unable to extract vehicle local position value from log data
    --------------------------------------------
    SignalName: LocalENUTarget
    Unable to extract vehicle local position value from log data
    --------------------------------------------
    SignalName: LocalNEDVelTarget
    Unable to extract vehicle local velocity value from log data
    --------------------------------------------
    SignalName: LocalENUVelTarget
    Unable to extract vehicle local velocity value from log data
    --------------------------------------------
    SignalName: AttitudeEuler
    Pass
    --------------------------------------------
    SignalName: AttitudeRate
    Unable to extract attitude rate value from log data
    --------------------------------------------
    SignalName: AttitudeTargetEuler
    Pass
    --------------------------------------------
    SignalName: Airspeed
    Pass
    --------------------------------------------
    SignalName: Battery
    Pass
    
    summary=1×18 struct array with fields:
        SignalName
        Result
    
    
    errorIndex = 1×5
    
        10    11    12    13    15
    
    

    Check specific set of signals.

    [summary,errorIndex] = checkSignal(mapping,logData,"Signal",["Accel" "Gyro"]);
    --------------------------------------------
    SignalName: Accel
    Pass
    --------------------------------------------
    SignalName: Gyro
    Pass
    

    Input Arguments

    collapse all

    Flight log signal mapping object, specified as a flightLogSignalMapping object.

    Data from the flight log, specified as a table, ulogreader object, mavlinktlog object, or other custom formats.

    Name-Value Arguments

    Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

    Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

    Example: 'Preview',"on" shows a preview of the extracted signal.

    Signal names to check, specified as the comma-separated pair consisting of 'Signal' and a string array or cell array of character vectors.

    Example: ["Accel","Gyro"]

    Data Types: char | string

    Preview of extracted signals in a plot, specified as the comma-separated pair consisting of 'Preview' and "on" or "off". Specify "on" to display plots of the signals in the order the mapped signals are stored. Press any key to display the next signal. Press Q to close the figure.

    Example: 'Preview',"on"

    Data Types: char | string

    Output Arguments

    collapse all

    Summary of signal extraction, returned as a structure with these fields:

    • SignalName –– Name of the mapped signals as a string

    • Result –– Status of signal extraction as a character vector

    Indices of unsuccessful signal extraction, returned as a vector of positive integers.

    Version History

    Introduced in R2021a