Hello all I started a little gimbal project using LSM303DLHC accelerometer & magnetometer, and L3GD20 gyroscope...
So far, the roll and pitch axis works perfect i should say, except with the yaw axis, wich tends to drift by +1 degree every second Tryied diferent sampleing variants, and the result is the same, i even try to use only the accelerometer values in the imu filters, and the result is the same.
// Compute feedback only if accelerometer measurement valid (avoids NaN in accelerometer normalisation) if(!((ax == 0.0f) && (ay == 0.0f) && (az == 0.0f))) {
// Normalise accelerometer measurement
recipNorm = invSqrt(ax * ax + ay * ay + az * az); ax1 = ax*recipNorm; ay1 = ay*recipNorm; az1 = az*recipNorm;
YAW axis is not referenced by accelerometer and drift is normal case. You can make it much less if you will calibrate gyroscope (remove zero offset from measurement for each axis).
Hello alex, thank you for the ideea with substracting the bias for gyro...
After taking a 256 samples divided by 256 and subtract as bias for my gyro sensor... the yaw drift rate decreesed considerably at 0.02 degree/second... wich is very well considering i dont use for the moment any kalman filter...