Dear luisrodenas,
May I know what is the motivation for the division by 8 and 4 in the calibration function?
ax_offset=-mean_ax/8;
ay_offset=-mean_ay/8;
az_offset=(16384-mean_az)/8;
gx_offset=-mean_gx/4;
gy_offset=-mean_gy/4;
gz_offset=-mean_gz/4;
Moreover in calibration function, unlike accelerometer offset value why the (gyro offset - mean gyro value) is divided by 2 instead of 1 which is giro_deadzone?
if (abs(mean_gx)<=giro_deadzone) ready++;
else gx_offset=gx_offset-mean_gx/(giro_deadzone+1);
if (abs(mean_gy)<=giro_deadzone) ready++;
else gy_offset=gy_offset-mean_gy/(giro_deadzone+1);
if (abs(mean_gz)<=giro_deadzone) ready++;
else gz_offset=gz_offset-mean_gz/(giro_deadzone+1);
I would be really thankful if I get the reasons for using different divisor value.
Thank you.