*** empty log message ***

This commit is contained in:
Antoine Drouin
2007-09-27 21:48:17 +00:00
parent 8a191ab3b9
commit 71e686d6c0
+18 -10
View File
@@ -1,24 +1,32 @@
function [time, throttle, rpm, amp, thrust, torque] = read_mb_log(filename)
time=[];
rpm_meas=[];
throttle=[];
rpm=[];
amp=[];
thrust=[];
torque=[];
no_line = 1;
u=mopen(filename,'r');
while meof(u) == 0,
line = mgetl(u, 1);
if strindex(line, '#') ~= 1 & length(line) ~= 0,
[nb_scan, t, c, p, p_f] = msscanf(1, line, '%f %f %f %f');
if nb_scan == 4,
time(no_line) = t;
throttle(no_line) = c*max_rpm;
rpm_sp(no_line) = p;
rpm_meas(no_line) =p_f;
no_line = no_line + 1;
if strindex(line, '#') ~= 1 & length(line) ~= 0,
[nb_scan, _time, _throttle, _rpm, _amp, _thrust, _torque] = msscanf(1, line, '%f %f %f %f %f %f');
if nb_scan == 6,
time = [time _time];
throttle = [throttle _throttle];
rpm = [rpm _rpm];
amp = [amp _amp];
thrust = [thrust _thrust];
torque = [torque _torque];
end
end
end
mclose(u);
endfunction