mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-30 19:47:50 +08:00
*** empty log message ***
This commit is contained in:
@@ -1,24 +1,32 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
function [time, throttle, rpm, amp, thrust, torque] = read_mb_log(filename)
|
function [time, throttle, rpm, amp, thrust, torque] = read_mb_log(filename)
|
||||||
|
|
||||||
time=[];
|
time=[];
|
||||||
rpm_meas=[];
|
|
||||||
throttle=[];
|
throttle=[];
|
||||||
rpm=[];
|
rpm=[];
|
||||||
|
amp=[];
|
||||||
|
thrust=[];
|
||||||
|
torque=[];
|
||||||
|
|
||||||
no_line = 1;
|
|
||||||
u=mopen(filename,'r');
|
u=mopen(filename,'r');
|
||||||
|
|
||||||
while meof(u) == 0,
|
while meof(u) == 0,
|
||||||
line = mgetl(u, 1);
|
line = mgetl(u, 1);
|
||||||
if strindex(line, '#') ~= 1 & length(line) ~= 0,
|
if strindex(line, '#') ~= 1 & length(line) ~= 0,
|
||||||
[nb_scan, t, c, p, p_f] = msscanf(1, line, '%f %f %f %f');
|
[nb_scan, _time, _throttle, _rpm, _amp, _thrust, _torque] = msscanf(1, line, '%f %f %f %f %f %f');
|
||||||
if nb_scan == 4,
|
if nb_scan == 6,
|
||||||
time(no_line) = t;
|
time = [time _time];
|
||||||
throttle(no_line) = c*max_rpm;
|
throttle = [throttle _throttle];
|
||||||
rpm_sp(no_line) = p;
|
rpm = [rpm _rpm];
|
||||||
rpm_meas(no_line) =p_f;
|
amp = [amp _amp];
|
||||||
no_line = no_line + 1;
|
thrust = [thrust _thrust];
|
||||||
|
torque = [torque _torque];
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
mclose(u);
|
mclose(u);
|
||||||
|
|
||||||
|
endfunction
|
||||||
|
|||||||
Reference in New Issue
Block a user