Main Content

mapSignal

Map UAV flight log signal

Since R2020b

Description

mapSignal(mapper,signalName,timeFunc,valueFunc) maps the signal with name signalName to a pair of function handles, timeFunc and valueFunc. These functions define the time stamps and values of signals from a flight log file, which can be imported using mavlinktlog or ulogreader. For a list of preconfigured signals and plots, see Predefined Signals and Predefined Plots.

mapSignal(mapper,signalName,timeFunc,valueFunc,varNames) maps the signal with name signalName and specifies the variable names, varName, for the columns of a matrix generated from valueFunc.

mapSignal(mapper,signalName,timeFunc,valueFunc,varNames,varUnits) maps the signal with name signalName and specifies the units, varUnits for varName.

Input Arguments

collapse all

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

Signal name to map data, specified as a string scalar or character vector.

Example: "Gyro"

Data Types: char | string

Timestamps for signal values , specified as a function handle. Typically, this function handle extracts time data from a flight log, which can be imported using mavlinktlog or ulogreader.

Example: @(x)x.Gyro.Time

Data Types: function_handle

Values for signal, specified as a function handle. Typically, this function handle extracts signal data from a flight log, which can be imported using mavlinktlog or ulogreader.

Example: @(x)x.Gyro.Value

Data Types: function_handle

Variable names for a matrix of values, specified as a string array or cell array of character vectors. Each element corresponds to a column in the matrix of values generated from valueFunc.

Example: ["xPos" "yPos" "zPos"]

Data Types: char | string

Variable units for a matrix of values, specified as a string array or cell array of character vectors. Each element corresponds to an element in varNames.

Example: ["m" "m" "rad"]

Data Types: char | string

More About

collapse all

Version History

Introduced in R2020b