Rhdlog
From Rsewiki
The rhdlog plugin can simply start and stop logging of all RHD variables to a text file
read variables
rhdlogging is 0 when not logging (default) and 1 when logging
write variables
rhdloginterval default is 0, i.e. not logging. set to 1..N for saving a set og log data every N RHD sample times.
logfile
The file generated is in the default directory (where RHD were started).
You must have write access right to this directory, else nothing is logged.
The file format is like the sample shown below, the first part is a list of logged variables - but compatible with MATLAB import.
% 1465748226.469605 2016-06-12 18:17:06.469 % this file is intended for MATALB, like % data = load('rhdlog.txt'); % symbols: % index r/w length name % 1 t 1 timestamp (from gettimeofday()) % 2 r 1 tick % 3 r 3 teradist % 6 r 3 wingIoTime % 9 r 3 wingIoReadTime % 12 r 3 wingIoError % 15 r 3 wingRev % 18 r 3 wingID % 21 r 3 wingHb % 24 r 3 wingSensorOK % 27 r 3 wingAccX % 30 r 3 wingAccY % 33 r 3 wingAccZ % 36 r 3 wingGyroX % 39 r 3 wingGyroY % 42 r 3 wingGyroZ % 45 r 3 wingMagX % 48 r 3 wingMagY % 51 r 3 wingMagZ % 54 r 3 wingImuTemp % 57 r 3 wingBaroTemp % 60 r 3 wingBaroPascal % 63 r 3 wingBaroCM % 66 r 3 wingVolt % 69 r 3 wingAmp % 72 r 3 wingSharpHeight % 75 r 1 rhdlogging % 76 w 1 teramode % 77 w 3 wingCmd % 80 w 3 wingCmdval % 83 w 3 wingMotor % 86 w 3 wingTilt % 89 w 3 wingFlap % 92 w 3 wingLED % 95 w 3 wingLogCtrl % 98 w 1 rhdloginterval 1465748230.004 103 0 0 0 5947 5939 5945 5927 5920 5925 0 0 0 110 110 110 30 32 33 26001 25951 25976 0 0 0 350 612 28 150 540 -406 8472 8462 7814 1 -130 -7 -10 171 3 -1 -16 3 5 3 -14 54 0 32 35 18 37 1232 1488 1760 416 421 416 1191000 1219800 1257100 13267 -3799 15472 560 380 560 32 1 39 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1465748230.029 104 0 0 0 5947 5947 5945 5927 5926 5925 0 0 0 110 110 110 30 32 33 26001 26026 25976 0 0 0 350 620 28 150 552 -406 8472 8528 7814 1 -131 -7 -10 166 3 -1 -19 3 5 2 -14 54 0 32 35 20 37 1232 1408 1760 416 420 416 1191000 1219800 1257100 13267 -4040 15472 560 381 560 32 1 39 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1465748230.054 105 0 0 0 5947 5947 5946 5927 5926 5928 0 0 0 110 110 110 30 32 33 26001 26026 26051 0 0 0 350 620 54 150 552 -418 8472 8528 7800 1 -131 -5 -10 166 -1 -1 -19 -1 5 2 -14 54 0 33 35 20 36 1232 1408 1792 416 420 416 1191000 1219800 1257100 13267 -4040 15918 560 381 560 32 1 39 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1465748230.079 106 0 0 0 5947 5947 5946 5927 5926 5928 0 0 0 110 110 110 30 32 33 26076 26026 26051 0 0 0 374 620 54 140 552 -418 8444 8528 7800 8 -131 -5 -9 166 -1 2 -19 -1 6 2 -14 55 0 33 36 20 36 1296 1408 1792 416 420 416 1190900 1219800 1257100 12881 -4040 15918 561 381 560 29 1 39 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1465748230.104 107 0 0 0 5947 5937 5946 5927 5920 5928 0 0 0 110 110 110 30 32 33 26076 26101 26051 0 0 0 374 624 54 140 552 -418 8444 8444 7800 8 -131 -5 -9 161 -1 2 -23 -1 6 2 -14 55 0 33 36 20 36 1296 1488 1792 416 420 416 1190900 1219800 1257100 12881 -4161 15918 561 381 560 29 1 39 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1465748230.129 108 0 0 0 5947 5937 5946 5927 5920 5927 0 0 0 110 110 110 30 32 33 26076 26101 26126 0 0 0 374 624 34 140 552 -432 8444 8444 7872 8 -131 -5 -9 161 1 2 -23 1 6 2 -13 55 0 34 36 20 35 1296 1488 1792 416 420 416 1190900 1219800 1257100 12881 -4161 15472 561 381 560 29 1 40 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1465748230.154 109 0 0 0 5945 5937 5946 5925 5920 5927 0 0 0 110 110 110 30 32 33 26152 26101 26126 0 0 0 334 624 34 120 552 -432 8472 8444 7872 4 -131 -5 -12 161 1 2 -23 1 6 2 -13 54 0 34 34 20 35 1264 1488 1792 416 420 416 1190900 1219800 1257100 12495 -4161 15472 560 381 560 30 1 40 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1465748230.179 110 0 0 0 5945 5944 5946 5925 5924 5927 0 0 0 110 110 110 30 32 33 26152 26176 26126 0 0 0 334 636 34 120 590 -432 8472 8412 7872 4 -131 -5 -12 168 1 2 -27 1 6 2 -13 54 0 34 34 18 35 1264 1472 1792 416 420 416 1190900 1219800 1257100 12495 -4311 15472 560 381 560 30 1 40 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
The MATLAB plot file could be like:
%% plot from rhd log clear close all %% data = load('rhdlog.txt'); %% figure(1) plot(data(:,1)-data(1,1),data(:,45),'r'); hold on plot(data(:,1)-data(1,1),data(:,48),'b'); plot(data(:,1)-data(1,1),data(:,51),'m'); grid MINOR xlabel('time [sec]'); legend('X','Y','Z') title('Magnetometer data 1')