1234567891011121314151617181920212223242526272829 |
- clear ;%清除工作区的缓存变量
- close all; % 关闭当前的所有窗口
- clc; %清除命令行的数据
- data_file = xlsread('../imusavedata_zhengxuelong3.xlsx');
- gyr_data = data_file(:, 1:3) * pi/180;
- g = 9.7833;
- acc_data = data_file(:, 4:6) /1.2098 * g;
- press_data = data_file(:,7:8)';
- data_size = size(gyr_data,1);
- pos_result =zeros(3,data_size);
- for i = 1 : data_size
- pos = footPDR(i, gyr_data(i,:)', acc_data(i,:)',press_data(2,i));
-
- pos_result(:,i) = pos;
- end
- figure('NumberTitle', 'off', 'Name', 'Offset pos');
- hold on;
- plot(pos_result(1,:), 'r');
- plot(pos_result(2,:), 'g');
- plot(pos_result(3,:), 'b');
- grid on
|