From 2ad21bc8c78bcb1612828cae05ba4c375e849fed Mon Sep 17 00:00:00 2001 From: George Hines Date: Thu, 7 Apr 2016 07:40:40 -0700 Subject: [PATCH] adds function header comments and method attribution --- matlab/analysis/importPX4log.m | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/matlab/analysis/importPX4log.m b/matlab/analysis/importPX4log.m index fc49d2995a..041e5d56c2 100644 --- a/matlab/analysis/importPX4log.m +++ b/matlab/analysis/importPX4log.m @@ -1,5 +1,20 @@ function allData = importPX4log(fname,keep_msgs) +% import a .px4log file +% INPUTS +% fname: path to a valid .px4log file +% keep_msgs: cell array of message names to keep +% OUTPUT +% allData: a Matlab struct with a field names for each message name in the log +% file. The content of each field is itself a struct with field names for +% each label in the corresponding message. The content of each of *these* +% fields will be an array of message data that is nonempty if the message +% name appears in keep_msgs + +% import method essentially translated from sdlog2_dump.py +% George Hines, 3D Robotics, Berkeley, CA +% 7 April 2016 + BLOCK_SIZE = 8192; MSG_HEADER_LEN = 3; % MSG_HEAD1 = uint8(hex2dec('A3'));