Main Content

readMessages

Read messages from ArduPilot® log file

Since R2024a

Description

Tbl = readMessages(arduObj) reads all messages from the specified ardupilotreader object and returns a table that contains message name, instance ID, start time stamp, last time stamp, message data, and message format for all available messages.

Tbl = readMessages(arduObj,Name=Value) reads messages from the specified ardupilotreader object. Select the messages by specifying the name-value pairs.

Input Arguments

collapse all

ArduPilot dataflash log file reader, specified as a ardupilotreader object.

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.

Example: 'Time',[d1 d2]

Names of the desired messages, specified as a cell array of character vectors or a string array.

Example: 'MessageNames'={'GPS','IMU'}

Instance ID of the topic of the desired messages, specified as a cell array of positive integer scalars or vectors. Specify this name-value pair with its corresponding messageNames name-value pair.

Example: 'MessageNames'={'GPS','IMU','MAG'},InstanceID={0,0,[0 1]}

Time interval between which to select messages, specified as a two-element vector of duration, or a double array. The duration array is specified in the 'hh:mm:ss.SSSSSS' format. The double array is specified in microseconds.

Example: 'Time'=[d1 d2]

Output Arguments

collapse all

Topic messages information, returned as a table with the columns:

  • msgName — message name

  • InstanceID — instance ID

  • StartTimestamp — start timestamp

  • LastTimestamp — last timestamp

  • MsgData — message data

  • MsgFormat — message format

Version History

Introduced in R2024a