convertGroupLog converts a binary log file into various formats
This method is a more general version of HebiGroup.stopLog
that can convert existing binary log files into other readable
formats. This is useful to recover data after a system
crash, or to create alternative views of the data.
'InputFile' Argument (required)
Absolute or relative path to the binary log file.
'LogFormat' ('format') Parameter (optional)
'Memory' converts to an in-memory struct. Large logs can
result in out-of-memory errors. (default)
'Csv' converts data to a CSV file
'Mat' converts data to a MAT file
'Raw' returns the full file path to 'InputFile'
'View' Parameter (optional)
'Simple' converts only simple feedback. This is appropriate
for most users and results in much smaller log
files. (default)
'Full' converts all available feedback. This is appropriate
for advanced users that need additional timestamps
or data from less common sensors.
'IO' converts feedback fields specific to I/O devices,
such as analog and digital pins, or the button and
slider states of the HEBI Mobile I/O app.
'Mobile' converts feedback fields specific to mobile devices,
such as GPS and ARKit/ARCore estimates.
Additionally, this method returns info and gains if the
corresponding data is contained within the log. For
logs recorded before version 1.1, very short
logs, and logs that were taken while the lookup was
disabled, info and gains may return empty.
Example:
% 1) Create a binary .hebilog file
group = HebiLookup.newGroupFromFamily('*');
logFile = group.startLog();
pause(5);
group.stopLog('format','raw'); % Does not convert log to
% memory.
% 2) Convert manually to .MAT file
matFile = HebiUtils.convertGroupLog(logFile, 'format', 'mat');
hebiLog = load(matFile);
plot(hebiLog.time, hebiLog.position);
% 3) Also read info and gains
[hebiLog, info, gains] = HebiUtils.convertGroupLog(logFile)