Rhdlog: Difference between revisions
From Rsewiki
No edit summary |
No edit summary |
||
Line 16: | Line 16: | ||
The file format is like the sample shown below, | The file format is like the sample shown below, | ||
the first part is a list of logged variables - | the first part is a list of logged variables - but compatible with MATLAB import. | ||
% 1465748226.469605 2016-06-12 18:17:06.469 | % 1465748226.469605 2016-06-12 18:17:06.469 | ||
Line 66: | Line 66: | ||
1465748227.579 6 0 0 0 3761 3724 3734 3730 3702 3711 0 0 0 110 110 110 30 32 33 23524 23549 23574 0 0 0 350 628 26 148 576 -412 8472 8498 7804 2 -132 -13 -5 163 0 3 -23 8 6 2 -15 57 0 34 36 19 36 1360 1440 1680 416 421 416 1190900 1219800 1257100 12881 -3799 15472 558 381 556 30 1 41 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 | 1465748227.579 6 0 0 0 3761 3724 3734 3730 3702 3711 0 0 0 110 110 110 30 32 33 23524 23549 23574 0 0 0 350 628 26 148 576 -412 8472 8498 7804 2 -132 -13 -5 163 0 3 -23 8 6 2 -15 57 0 34 36 19 36 1360 1440 1680 416 421 416 1190900 1219800 1257100 12881 -3799 15472 558 381 556 30 1 41 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 | ||
1465748227.604 7 0 0 0 3707 3724 3734 3696 3702 3711 0 0 0 110 110 110 30 32 33 23599 23549 23574 0 0 0 354 628 26 142 576 -412 8456 8498 7804 5 -132 -13 -2 163 0 -6 -23 8 6 2 -15 57 0 34 36 19 36 1264 1440 1680 416 421 416 1190900 1219800 1257100 12495 -3799 15472 560 381 556 29 1 41 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 | 1465748227.604 7 0 0 0 3707 3724 3734 3696 3702 3711 0 0 0 110 110 110 30 32 33 23599 23549 23574 0 0 0 354 628 26 142 576 -412 8456 8498 7804 5 -132 -13 -2 163 0 -6 -23 8 6 2 -15 57 0 34 36 19 36 1264 1440 1680 416 421 416 1190900 1219800 1257100 12495 -3799 15472 560 381 556 29 1 41 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') |
Revision as of 08:20, 14 October 2018
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 1465748227.454 1 0 0 0 2147483647 0 0 0 0 0 0 0 0 110 110 0 30 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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 1465748227.479 2 0 0 0 2147483647 3729 0 0 3707 0 0 0 0 110 110 110 30 32 33 0 23474 0 0 0 0 0 652 0 0 602 0 0 8466 0 0 -132 0 0 160 0 0 -24 0 0 3 0 0 0 0 0 19 0 0 1488 0 0 420 0 0 1219800 0 0 -3287 0 0 371 0 0 1 0 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 1465748227.504 3 0 0 0 2147483647 3729 3710 0 3707 3694 0 0 0 110 110 110 30 32 33 0 23474 23499 0 0 0 0 652 40 0 602 -428 0 8466 7830 0 -132 -4 0 160 -3 0 -24 7 0 3 -14 0 0 34 0 19 34 0 1488 1776 0 420 416 0 1219800 1257000 0 -3287 15138 0 371 558 0 1 36 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 1465748227.529 4 0 0 0 3761 3729 3710 3730 3707 3694 0 0 0 110 110 110 30 32 33 23524 23474 23499 0 0 0 350 652 40 148 602 -428 8472 8466 7830 2 -132 -4 -5 160 -3 3 -24 7 6 3 -14 57 0 34 36 19 34 1360 1488 1776 416 420 416 1190900 1219800 1257000 12881 -3287 15138 558 371 558 30 1 36 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 1465748227.554 5 0 0 0 3761 3724 3710 3730 3702 3694 0 0 0 110 110 110 30 32 33 23524 23549 23499 0 0 0 350 628 40 148 576 -428 8472 8498 7830 2 -132 -4 -5 163 -3 3 -23 7 6 2 -14 57 0 34 36 19 34 1360 1440 1776 416 421 416 1190900 1219800 1257000 12881 -3799 15138 558 381 558 30 1 36 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 1465748227.579 6 0 0 0 3761 3724 3734 3730 3702 3711 0 0 0 110 110 110 30 32 33 23524 23549 23574 0 0 0 350 628 26 148 576 -412 8472 8498 7804 2 -132 -13 -5 163 0 3 -23 8 6 2 -15 57 0 34 36 19 36 1360 1440 1680 416 421 416 1190900 1219800 1257100 12881 -3799 15472 558 381 556 30 1 41 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 1465748227.604 7 0 0 0 3707 3724 3734 3696 3702 3711 0 0 0 110 110 110 30 32 33 23599 23549 23574 0 0 0 354 628 26 142 576 -412 8456 8498 7804 5 -132 -13 -2 163 0 -6 -23 8 6 2 -15 57 0 34 36 19 36 1264 1440 1680 416 421 416 1190900 1219800 1257100 12495 -3799 15472 560 381 556 29 1 41 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')