Spells of bad quaternion data from MPU6050?

By mrspark , 25 October 2012

Hi Guys,

I am using the sensor fusion quaternion data obtained from the 6050 to calculate pitch and roll angles, based on the formulas found on wikipedia ->

http://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles

The pitch and roll angles seems okie, but I get occasional spells of bad pitch and roll angles. Basically, the values would fluctuate between big values and small values, before settling back to its normal values.

I am also using the "inv_get_accel" API to get the accelerometer values. The strange thing is that they look normal, at least to me.

I suspect that the sampled quaternion values could be the reason. I am using the 6050 in a noisy environment, but it does not explain the ocasional bad spell of data. If indeed, it is the noise, I should be getting bad data all the time. I must be missing some coding stuff. Could the experts at Invense give me some advice where I could start digging?

Thanks,
Steve

phpbb Topic ID
14793