checkSignal
Syntax
Description
[
checks mapped signals stored in summary
,errorIndex
] = checkSignal(mapper
,logData
)mapper
using the imported flight log
logData
. Import your flight log using mavlinktlog
or
ulogreader
.
[
specifies options using one or more name-value pair arguments in addition to the input
arguments in the previous syntax. For example, summary
,errorIndex
] = checkSignal(___,Name,Value
)'Preview',"on"
shows a
preview of the extracted signal.
Examples
Check Mapped Signals Using Flight Log Data
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
mapper
— Flight log signal mapping object
flightLogSignalMapping
object
Flight log signal mapping object, specified as a flightLogSignalMapping
object.
logData
— Data from flight log
table | ulogreader
object | mavlinktlog
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
— Signal names to check
string array | cell array of character vectors
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
— Preview of extracted signals in plot
"off"
(default) | "on"
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
summary
— Summary of signal extraction
structure
Summary of signal extraction, returned as a structure with these fields:
SignalName
–– Name of the mapped signals as a stringResult
–– Status of signal extraction as a character vector
errorIndex
— Indices of unsuccessful signal extraction
vector of positive integers
Indices of unsuccessful signal extraction, returned as a vector of positive integers.
Version History
Introduced in R2021a
See Also
Objects
Functions
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)