I want to create an output of an imu sensor from my data set of acceleration and angular velocity. For this I'm using the "imusensor" object of the Sensor Fusion and Tracking Toolbox to include the gravity in the acceleration data set. My problem is, that the gravity vector always points in the direction of the z-axis even if the sensor rotates due to the angular velocity. So ist there a way to set up the gravity vector, so that it does not rotate with the sensor and does not always points in the direction of the z-axis?
In the example below the gravity vector always points in the direction of the z-axis, even if there is a constant angular velocity
IMU_test = imuSensor; acc_test=zeros(100,3); gyr_test=zeros(100,3);gyro_test(:,1) = 1;[accelReadings, gyroReadings] = IMU_test(acc_test,gyr_test)
Best Answer