Reply To: angelx

Home Forums Forums Technical Support for BerryIMU angelx Reply To: angelx

Mark Williams

no need to change gyro calcs.

Regarding the accumulating of the gyro readings.  This is normal, this is due to the noise  from the gyro sensor.  This is why the gyro and accel readings are fused to get a accurate result.

The values you need to use are CFangleX and CFangleY. CF = complementary filter.

You can see that the complementary filter doesn’t use the accumulated gyro value, it only uses the rate of rotation since since the last loop.
rate_gyr_x*LP This is rate of gyro x rotation (degrees per second) since the last reading. multiple this by the loop time.

 #Complementary filter used to combine the accelerometer and gyro values.
CFangleX=AA*(CFangleX+rate_gyr_x*LP) +(1 - AA) * AccXangle
CFangleY=AA*(CFangleY+rate_gyr_y*LP) +(1 - AA) * AccYangle


more info here

Mark --

Blip, blop, bloop…