From: Ramasamy Date: Wed, 23 Apr 2014 08:31:51 +0000 (+0530) Subject: Restructuring sensor fusion folder structure X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Fdev%2Framasamy;p=platform%2Fcore%2Fsystem%2Fsensor-framework.git Restructuring sensor fusion folder structure - Changing structure to support new virtual sensors - adding folder for reference and design documents - adding folder for results - renaming folders signed-off-by: Ramasamy Change-Id: Iea7dd562c15f88003996512eefe47932a7efcd63 --- diff --git a/SensorFusion/SF_Orien.m b/SensorFusion/SF_Orien.m index 66a708a..c9c8ec5 100755 --- a/SensorFusion/SF_Orien.m +++ b/SensorFusion/SF_Orien.m @@ -20,8 +20,9 @@ % - Quaternion based approach % - Estimation and correction of Euler errors and bias errors for gyroscope using Kalman filter - +addpath('lib'); clear +clc LOW_PASS_FILTERING_ON = 1; @@ -58,16 +59,16 @@ TauW = 1000; %secs %ZigmaW = 0; %deg/s % get accel x,y,z axis data from stored file -Ax = (((dlmread("sensor_data/100ms/roll_pitch_yaw/accel.txt")(:,1))') - Bias_Ax)(1:BUFFER_SIZE); -Ay = (((dlmread("sensor_data/100ms/roll_pitch_yaw/accel.txt")(:,2))') - Bias_Ay)(1:BUFFER_SIZE); -Az = (((dlmread("sensor_data/100ms/roll_pitch_yaw/accel.txt")(:,3))') - Bias_Az)(1:BUFFER_SIZE); -ATime = ((dlmread("sensor_data/100ms/roll_pitch_yaw/accel.txt")(:,4))'); +Ax = (((dlmread("data/100ms/roll_pitch_yaw/accel.txt")(:,1))') - Bias_Ax)(1:BUFFER_SIZE); +Ay = (((dlmread("data/100ms/roll_pitch_yaw/accel.txt")(:,2))') - Bias_Ay)(1:BUFFER_SIZE); +Az = (((dlmread("data/100ms/roll_pitch_yaw/accel.txt")(:,3))') - Bias_Az)(1:BUFFER_SIZE); +ATime = ((dlmread("data/100ms/roll_pitch_yaw/accel.txt")(:,4))'); % get gyro x,y,z axis data from stored file -Gx = (((dlmread("sensor_data/100ms/roll_pitch_yaw/gyro.txt")(:,1))') - Bias_Gx)(1:BUFFER_SIZE); -Gy = (((dlmread("sensor_data/100ms/roll_pitch_yaw/gyro.txt")(:,2))') - Bias_Gy)(1:BUFFER_SIZE); -Gz = (((dlmread("sensor_data/100ms/roll_pitch_yaw/gyro.txt")(:,3))') - Bias_Gz)(1:BUFFER_SIZE); -GTime = ((dlmread("sensor_data/100ms/roll_pitch_yaw/gyro.txt")(:,4))'); +Gx = (((dlmread("data/100ms/roll_pitch_yaw/gyro.txt")(:,1))') - Bias_Gx)(1:BUFFER_SIZE); +Gy = (((dlmread("data/100ms/roll_pitch_yaw/gyro.txt")(:,2))') - Bias_Gy)(1:BUFFER_SIZE); +Gz = (((dlmread("data/100ms/roll_pitch_yaw/gyro.txt")(:,3))') - Bias_Gz)(1:BUFFER_SIZE); +GTime = ((dlmread("data/100ms/roll_pitch_yaw/gyro.txt")(:,4))'); scale_Gyro = 575; Gx = Gx/scale_Gyro; @@ -75,10 +76,10 @@ Gy = Gy/scale_Gyro; Gz = Gz/scale_Gyro; % get magnetometer x,y,z axis data from stored file -Mx = (((dlmread("sensor_data/100ms/roll_pitch_yaw/magnetic.txt")(:,1))'))(1:BUFFER_SIZE); -My = (((dlmread("sensor_data/100ms/roll_pitch_yaw/magnetic.txt")(:,2))'))(1:BUFFER_SIZE); -Mz = (((dlmread("sensor_data/100ms/roll_pitch_yaw/magnetic.txt")(:,3))'))(1:BUFFER_SIZE); -MTime = ((dlmread("sensor_data/100ms/roll_pitch_yaw/magnetic.txt")(:,4))'); +Mx = (((dlmread("data/100ms/roll_pitch_yaw/magnetic.txt")(:,1))'))(1:BUFFER_SIZE); +My = (((dlmread("data/100ms/roll_pitch_yaw/magnetic.txt")(:,2))'))(1:BUFFER_SIZE); +Mz = (((dlmread("data/100ms/roll_pitch_yaw/magnetic.txt")(:,3))'))(1:BUFFER_SIZE); +MTime = ((dlmread("data/100ms/roll_pitch_yaw/magnetic.txt")(:,4))'); % Gyroscope Bias Variables Bx = 0; By = 0; Bz = 0; diff --git a/SensorFusion/sensor_data/100ms/pitch/accel.txt b/SensorFusion/data/100ms/pitch/accel.txt similarity index 100% rename from SensorFusion/sensor_data/100ms/pitch/accel.txt rename to SensorFusion/data/100ms/pitch/accel.txt diff --git a/SensorFusion/sensor_data/100ms/pitch/gyro.txt b/SensorFusion/data/100ms/pitch/gyro.txt similarity index 100% rename from SensorFusion/sensor_data/100ms/pitch/gyro.txt rename to SensorFusion/data/100ms/pitch/gyro.txt diff --git a/SensorFusion/sensor_data/100ms/pitch/magnetic.txt b/SensorFusion/data/100ms/pitch/magnetic.txt similarity index 100% rename from SensorFusion/sensor_data/100ms/pitch/magnetic.txt rename to SensorFusion/data/100ms/pitch/magnetic.txt diff --git a/SensorFusion/sensor_data/100ms/roll/accel.txt b/SensorFusion/data/100ms/roll/accel.txt similarity index 100% rename from SensorFusion/sensor_data/100ms/roll/accel.txt rename to SensorFusion/data/100ms/roll/accel.txt diff --git a/SensorFusion/sensor_data/100ms/roll/gyro.txt b/SensorFusion/data/100ms/roll/gyro.txt similarity index 100% rename from SensorFusion/sensor_data/100ms/roll/gyro.txt rename to SensorFusion/data/100ms/roll/gyro.txt diff --git a/SensorFusion/sensor_data/100ms/roll/magnetic.txt b/SensorFusion/data/100ms/roll/magnetic.txt similarity index 100% rename from SensorFusion/sensor_data/100ms/roll/magnetic.txt rename to SensorFusion/data/100ms/roll/magnetic.txt diff --git a/SensorFusion/sensor_data/100ms/roll_pitch_yaw/accel.txt b/SensorFusion/data/100ms/roll_pitch_yaw/accel.txt similarity index 100% rename from SensorFusion/sensor_data/100ms/roll_pitch_yaw/accel.txt rename to SensorFusion/data/100ms/roll_pitch_yaw/accel.txt diff --git a/SensorFusion/sensor_data/100ms/roll_pitch_yaw/gyro.txt b/SensorFusion/data/100ms/roll_pitch_yaw/gyro.txt similarity index 100% rename from SensorFusion/sensor_data/100ms/roll_pitch_yaw/gyro.txt rename to SensorFusion/data/100ms/roll_pitch_yaw/gyro.txt diff --git a/SensorFusion/sensor_data/100ms/roll_pitch_yaw/magnetic.txt b/SensorFusion/data/100ms/roll_pitch_yaw/magnetic.txt similarity index 100% rename from SensorFusion/sensor_data/100ms/roll_pitch_yaw/magnetic.txt rename to SensorFusion/data/100ms/roll_pitch_yaw/magnetic.txt diff --git a/SensorFusion/sensor_data/100ms/yaw/accel.txt b/SensorFusion/data/100ms/yaw/accel.txt similarity index 100% rename from SensorFusion/sensor_data/100ms/yaw/accel.txt rename to SensorFusion/data/100ms/yaw/accel.txt diff --git a/SensorFusion/sensor_data/100ms/yaw/gyro.txt b/SensorFusion/data/100ms/yaw/gyro.txt similarity index 100% rename from SensorFusion/sensor_data/100ms/yaw/gyro.txt rename to SensorFusion/data/100ms/yaw/gyro.txt diff --git a/SensorFusion/sensor_data/100ms/yaw/magnetic.txt b/SensorFusion/data/100ms/yaw/magnetic.txt similarity index 100% rename from SensorFusion/sensor_data/100ms/yaw/magnetic.txt rename to SensorFusion/data/100ms/yaw/magnetic.txt diff --git a/SensorFusion/Quat2Euler.m b/SensorFusion/lib/Quat2Euler.m similarity index 100% rename from SensorFusion/Quat2Euler.m rename to SensorFusion/lib/Quat2Euler.m diff --git a/SensorFusion/Quat2RotMat.m b/SensorFusion/lib/Quat2RotMat.m similarity index 100% rename from SensorFusion/Quat2RotMat.m rename to SensorFusion/lib/Quat2RotMat.m diff --git a/SensorFusion/QuatProd.m b/SensorFusion/lib/QuatProd.m similarity index 100% rename from SensorFusion/QuatProd.m rename to SensorFusion/lib/QuatProd.m diff --git a/SensorFusion/RotMat2Quat.m b/SensorFusion/lib/RotMat2Quat.m similarity index 100% rename from SensorFusion/RotMat2Quat.m rename to SensorFusion/lib/RotMat2Quat.m