メインコンテンツ

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
    --------------------------------------------
    SignalName: EstimatorStatusFlagOpticalFlow
    Unable to extract time information from log data
    --------------------------------------------
    SignalName: EstimatorStatusFlagHorizontalStates
    Unable to extract time information from log data
    --------------------------------------------
    SignalName: EstimatorStatusFlagVerticalStates
    Unable to extract time information from log data
    --------------------------------------------
    SignalName: EstimatorStatusFlagAirspeed
    Unable to extract time information from log data
    --------------------------------------------
    SignalName: EstimatorStatusFlagSideslip
    Unable to extract time information from log data
    --------------------------------------------
    SignalName: EstimatorStatusFlagHeightAboveGround
    Unable to extract time information from log data
    --------------------------------------------
    SignalName: EstimatorStatusFlagMagnetometer
    Unable to extract time information from log data
    --------------------------------------------
    SignalName: EstimatorStatusTestRatio
    Pass
    --------------------------------------------
    SignalName: EstimatorStatusGPSCheckFail
    Pass
    --------------------------------------------
    SignalName: EstimatorStatusFilterFault
    Error using bitand
    Double inputs must have integer values in the integer range when mixed with integer inputs.
    
    Error in uav.internal.log.extractUlogValue (line 20)
                        vUnmaskedIdx(:,bitIdx+1) = bitand(vField, 2^bitIdx) > 0;
                                                   ^^^^^^^^^^^^^^^^^^^^^^^^
    Error in uav.internal.log.configureULogAnalyzer>getValue (line 485)
        v = uav.internal.log.extractUlogValue(tbl, msgName, idx, [], bitmasks);
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    Error in uav.internal.log.configureULogAnalyzer>@(data)getValue(data,"filter_fault_flags","estimator_status",18) (line 389)
        @(data)getValue(data, "filter_fault_flags", "estimator_status", 18));
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    Error in uav.internal.log.Analyzer/verifyMapping (line 171)
                            v = accessor.Value(data);
                                ^^^^^^^^^^^^^^^^^^^^
    Error in flightLogSignalMapping/checkSignal (line 368)
               [summary, errorIndex]= obj.Analyzer.verifyMapping(data, signalNames,ps);
                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    Error in CheckMappedSignalsUsingFlightLogDataExample (line 3)
    [summary,errorIndex] = checkSignal(mapping,logData)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    Error in matlab.internal.editor.evaluateRegions
    
    Error in matlab.internal.editor.EvaluationOutputsService.evalRegions
    
    Error in matlab.internal.liveeditor.LiveEditorUtilities.doExecute (line 85)
        builtin('_liveCodeExecutionPortal', 'matlab.internal.editor.EvaluationOutputsService.evalRegions', editorId, uuid, startLine, endLine, fullFileText, false, true, fileName, -1, '', sectionData);
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    Error in matlab.internal.liveeditor.LiveEditorUtilities.execute (line 27)
        executionTime = LiveEditorUtilities.doExecute(editorId, fileName, persistOutput, isSynchronousDrawnowRequired);
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    Error in mwtools.liveCodeToDocbook>doRun (line 454)
        LiveEditorUtilities.execute(editorId, source);
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    Error in mwtools.liveCodeToDocbook>doRunConvert (line 369)
        [startTimeStamp,finishTimeStamp,exampleTime,exampleWarnings, exampleErrors] = doRun(javaRichDocument, source);
                                                                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    Error in mwtools.liveCodeToDocbook (line 156)
            [startTimeStamp,finishTimeStamp,exampleTime,exampleRunWarnings,exampleRunErrors, errorMessage] = doRunConvert(...
                                                                                                             ^^^^^^^^^^^^^^^^
    Error in BML (line 13)
            evalin('base', s);
            ^^^^^^^^^^^^^^^^^
    --------------------------------------------
    SignalName: EstimatorStatusControlMode
    Pass
    --------------------------------------------
    SignalName: EstimatorInnovationGPS
    Pass
    --------------------------------------------
    SignalName: EstimatorInnovationHeight
    Pass
    --------------------------------------------
    SignalName: EstimatorInnovationOpticalFlow
    Pass
    --------------------------------------------
    SignalName: EstimatorInnovationMagnetometer
    Pass
    --------------------------------------------
    SignalName: EstimatorInnovationAirspeed
    Pass
    --------------------------------------------
    SignalName: EstimatorInnovationHeading
    Pass
    --------------------------------------------
    SignalName: EstimatorStatesIMUBias
    Index in position 2 exceeds array bounds.
    
    Error in uav.internal.log.configureULogAnalyzer>getColumns (line 696)
    v = v(:,idx);
        ^^^^^^^^
    Error in uav.internal.log.configureULogAnalyzer>@(data)horzcat(getColumns(getValue(data,"states","estimator_states"),11:16),getColumns(getValue(data,"covariances","estimator_states"),11:16)) (line 437)
        @(data)horzcat(getColumns(getValue(data, "states", "estimator_states"), 11:16),...
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    Error in uav.internal.log.Analyzer/verifyMapping (line 171)
                            v = accessor.Value(data);
                                ^^^^^^^^^^^^^^^^^^^^
    Error in flightLogSignalMapping/checkSignal (line 368)
               [summary, errorIndex]= obj.Analyzer.verifyMapping(data, signalNames,ps);
                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    Error in CheckMappedSignalsUsingFlightLogDataExample (line 3)
    [summary,errorIndex] = checkSignal(mapping,logData)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    Error in matlab.internal.editor.evaluateRegions
    
    Error in matlab.internal.editor.EvaluationOutputsService.evalRegions
    
    Error in matlab.internal.liveeditor.LiveEditorUtilities.doExecute (line 85)
        builtin('_liveCodeExecutionPortal', 'matlab.internal.editor.EvaluationOutputsService.evalRegions', editorId, uuid, startLine, endLine, fullFileText, false, true, fileName, -1, '', sectionData);
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    Error in matlab.internal.liveeditor.LiveEditorUtilities.execute (line 27)
        executionTime = LiveEditorUtilities.doExecute(editorId, fileName, persistOutput, isSynchronousDrawnowRequired);
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    Error in mwtools.liveCodeToDocbook>doRun (line 454)
        LiveEditorUtilities.execute(editorId, source);
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    Error in mwtools.liveCodeToDocbook>doRunConvert (line 369)
        [startTimeStamp,finishTimeStamp,exampleTime,exampleWarnings, exampleErrors] = doRun(javaRichDocument, source);
                                                                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    Error in mwtools.liveCodeToDocbook (line 156)
            [startTimeStamp,finishTimeStamp,exampleTime,exampleRunWarnings,exampleRunErrors, errorMessage] = doRunConvert(...
                                                                                                             ^^^^^^^^^^^^^^^^
    Error in BML (line 13)
            evalin('base', s);
            ^^^^^^^^^^^^^^^^^
    --------------------------------------------
    SignalName: EstimatorStatesMagnetometerBias
    Index in position 2 exceeds array bounds.
    
    Error in uav.internal.log.configureULogAnalyzer>getColumns (line 696)
    v = v(:,idx);
        ^^^^^^^^
    Error in uav.internal.log.configureULogAnalyzer>@(data)horzcat(getColumns(getValue(data,"states","estimator_states"),17:22),getColumns(getValue(data,"covariances","estimator_states"),17:22)) (line 443)
        @(data)horzcat(getColumns(getValue(data, "states", "estimator_states"), 17:22),...
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    Error in uav.internal.log.Analyzer/verifyMapping (line 171)
                            v = accessor.Value(data);
                                ^^^^^^^^^^^^^^^^^^^^
    Error in flightLogSignalMapping/checkSignal (line 368)
               [summary, errorIndex]= obj.Analyzer.verifyMapping(data, signalNames,ps);
                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    Error in CheckMappedSignalsUsingFlightLogDataExample (line 3)
    [summary,errorIndex] = checkSignal(mapping,logData)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    Error in matlab.internal.editor.evaluateRegions
    
    Error in matlab.internal.editor.EvaluationOutputsService.evalRegions
    
    Error in matlab.internal.liveeditor.LiveEditorUtilities.doExecute (line 85)
        builtin('_liveCodeExecutionPortal', 'matlab.internal.editor.EvaluationOutputsService.evalRegions', editorId, uuid, startLine, endLine, fullFileText, false, true, fileName, -1, '', sectionData);
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    Error in matlab.internal.liveeditor.LiveEditorUtilities.execute (line 27)
        executionTime = LiveEditorUtilities.doExecute(editorId, fileName, persistOutput, isSynchronousDrawnowRequired);
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    Error in mwtools.liveCodeToDocbook>doRun (line 454)
        LiveEditorUtilities.execute(editorId, source);
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    Error in mwtools.liveCodeToDocbook>doRunConvert (line 369)
        [startTimeStamp,finishTimeStamp,exampleTime,exampleWarnings, exampleErrors] = doRun(javaRichDocument, source);
                                                                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    Error in mwtools.liveCodeToDocbook (line 156)
            [startTimeStamp,finishTimeStamp,exampleTime,exampleRunWarnings,exampleRunErrors, errorMessage] = doRunConvert(...
                                                                                                             ^^^^^^^^^^^^^^^^
    Error in BML (line 13)
            evalin('base', s);
            ^^^^^^^^^^^^^^^^^
    --------------------------------------------
    SignalName: EstimatorStatesWind
    Index in position 2 exceeds array bounds.
    
    Error in uav.internal.log.configureULogAnalyzer>getColumns (line 696)
    v = v(:,idx);
        ^^^^^^^^
    Error in uav.internal.log.configureULogAnalyzer>@(data)horzcat(getColumns(getValue(data,"states","estimator_states"),23:24),getColumns(getValue(data,"covariances","estimator_states"),23:24)) (line 449)
        @(data)horzcat(getColumns(getValue(data, "states", "estimator_states"), 23:24),...
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    Error in uav.internal.log.Analyzer/verifyMapping (line 171)
                            v = accessor.Value(data);
                                ^^^^^^^^^^^^^^^^^^^^
    Error in flightLogSignalMapping/checkSignal (line 368)
               [summary, errorIndex]= obj.Analyzer.verifyMapping(data, signalNames,ps);
                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    Error in CheckMappedSignalsUsingFlightLogDataExample (line 3)
    [summary,errorIndex] = checkSignal(mapping,logData)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    Error in matlab.internal.editor.evaluateRegions
    
    Error in matlab.internal.editor.EvaluationOutputsService.evalRegions
    
    Error in matlab.internal.liveeditor.LiveEditorUtilities.doExecute (line 85)
        builtin('_liveCodeExecutionPortal', 'matlab.internal.editor.EvaluationOutputsService.evalRegions', editorId, uuid, startLine, endLine, fullFileText, false, true, fileName, -1, '', sectionData);
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    Error in matlab.internal.liveeditor.LiveEditorUtilities.execute (line 27)
        executionTime = LiveEditorUtilities.doExecute(editorId, fileName, persistOutput, isSynchronousDrawnowRequired);
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    Error in mwtools.liveCodeToDocbook>doRun (line 454)
        LiveEditorUtilities.execute(editorId, source);
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    Error in mwtools.liveCodeToDocbook>doRunConvert (line 369)
        [startTimeStamp,finishTimeStamp,exampleTime,exampleWarnings, exampleErrors] = doRun(javaRichDocument, source);
                                                                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    Error in mwtools.liveCodeToDocbook (line 156)
            [startTimeStamp,finishTimeStamp,exampleTime,exampleRunWarnings,exampleRunErrors, errorMessage] = doRunConvert(...
                                                                                                             ^^^^^^^^^^^^^^^^
    Error in BML (line 13)
            evalin('base', s);
            ^^^^^^^^^^^^^^^^^
    
    summary=1×38 struct array with fields:
        SignalName
        Result
    
    
    errorIndex = 1×16
    
        10    11    12    13    15    19    20    21    22    23    24    25    28    36    37    38
    
    

    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

    collapse all

    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