You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cai Biesinger edited this page Jun 13, 2018
·
1 revision
Another useful utility is DataLog. This allows you to get DataUnit objects, which all sensors and some other components provide, and save them to a CSV file.
We recommend you split your data into multiple CSVs if the data means different things, or will not be time-correlated. DataLog is instantiable for this reason.
Simply start the logger with the constructor, passing in a filename.
Now, just call: DataLog.Output(DataUnit1, DataUnit2, ...);
With all of your DataUnits. If this is the first line, it will auto-generate headers.
Please make sure that your DataUnits are consistent (in number and order) between every call to Output(), as there is no internal checking. Data will simply be output in the order given, and as such, if the format changes, the data will be in the wrong column.
Because of the dynamic nature of the DataLog structure, doing this check on every datapoint would become very time-expensive, so we decided to skip the checks.