Main Content

readMessages

R2026b

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 name-value arguments.

Input Arguments

collapse all

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

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.

Example: readMessages(ardReader,Time=[d1 d2])

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

Example: readMessages(arduObj,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 argument with its corresponding MessageNames name-value argument.

Example: readMessages(arduObj,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: readMessages(arduObj,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