Closed jamie-54 closed 1 year ago
Haven't we done this already? By the way, if the Madgwick filter works properly there shouldn't be a constant bias.
Yes we have completed the work around but the underlying issue of a constant bias is still there that's why this issue is still open. (I wasn't sure if we should close it?)
A little bit of bias will not cause any issues, but I wonder why it's not zero at rest. Maybe @gunturiCM could come up with an MRE and create an issue on the GitHub page of the Madgwick library we use.
Yea think the easiest way to show the error is to copy hw_test_ahrs.cpp
into main.cpp
and uncomment TEST TO CHECK ANGULAR VELOCITIES and use Arduino ide to plot the angular velocities.
I will try to reproduce the error.
preFlightCalibrate
stores the calculated offset in the corresponding offset registers. preFlightCalibrate
function calculates the offsets at gyro full-scale as 250 degrees/s and accelerometer full-scale as 2g, we are using a different scale. Assuming the DC bias is dependent on the selected scale, this could be causing the issue. At the time of writing this, I couldn't find any evidence to back this assumption. This needs to be investigated.I did the following tests, while the IMU remained stationary:
preFlightCalibrate
writes them to the EEPROM. I thought that the bias in the raw measurements will change, but they didn't. They actually were the same as the raw bias. This either means that the biases were not automatically deducted from the measurements, or this bias couldn't be compensated for.preFlightCalibration
to what we are using while operating the drone. This did not fix anything. The output was the same as raw data.preFlightCalibration
. This did not fix anything. The output was the same as raw data.
The above two tests showed that this bias is independent of the full-scale selections of the gyro.
The resulting bias is 1.1 dps is extremely low, 1.1*100/2000 = 0.055%, which if I am interpreting the datasheet section 3.1 correctly, is with-in the expected error range.@gunturiCM try a different IMU to see if it's a possible hardware issue
@gunturiCM shall we close this?
After the
preflightCalibrate
there still seems to be a slight bias in the angular velocities. As a work around we can determine theinitialAngularVelocity
and subtract these from themeasuredAngularVelocity