The calibration procedure for sensors seem to calculate the variance incorrectly.
A sensor bias is not subtracted while calculating the variance. I noticed this while working with the airspeed sensor. I am using a fork: https://github.com/BYU-AUVSI/firmware
I think the master branch here has the same issue. My airspeed sensor has a bias of about 100, which is also the allowed variance. So about half the time it doesn't calibrate, calling "Too much movement for diff pressure cal." I increased the variance allowance as a quick fix. After clearing the variance threshold it correctly accounts for the bias. The bias is set and everything works fine after that.
I think the other sensors also have this problem.
The calibration procedure for sensors seem to calculate the variance incorrectly. A sensor bias is not subtracted while calculating the variance. I noticed this while working with the airspeed sensor. I am using a fork: https://github.com/BYU-AUVSI/firmware I think the master branch here has the same issue. My airspeed sensor has a bias of about 100, which is also the allowed variance. So about half the time it doesn't calibrate, calling "Too much movement for diff pressure cal." I increased the variance allowance as a quick fix. After clearing the variance threshold it correctly accounts for the bias. The bias is set and everything works fine after that. I think the other sensors also have this problem.