1 function analyzeEKF(fn)
4 dat = uint8(fread(fid,inf,'uchar'));
7 mag_data_size = 1 + 4*3;
8 accel_sensor_size = 4*3;
9 gyro_sensor_size = 4*3;
10 raw_framing = 15:-1:0;
12 starts = strfind(char(dat'),char(raw_framing));
15 counts = typecast(reshape(dat(bsxfun(@plus,starts,(16:19)')),1,[]),'int32');
16 accel = reshape(typecast(reshape(dat(bsxfun(@plus,starts,(20:31)')),1,[]),'single'),3,[])';
17 gyro = reshape(typecast(reshape(dat(bsxfun(@plus,starts,(32:43)')),1,[]),'single'),3,[])';
18 mag_updated = dat(starts+44);
19 mag = reshape(typecast(reshape(dat(bsxfun(@plus,starts,(45:56)')),1,[]),'single'),3,[])';
21 X = reshape(typecast(reshape(dat(bsxfun(@plus,starts,(85:85+13*4-1)')),1,[]),'single'),13,[])';
22 P = reshape(typecast(reshape(dat(bsxfun(@plus,starts,(137:137+13*4-1)')),1,[]),'single'),13,[])';