rosflight / rosflight_firmware

Firmware for the ROSflight autopilot
http://rosflight.org/
BSD 3-Clause "New" or "Revised" License
132 stars 46 forks source link

Sensor Calibration Procedure #300

Open austinhurst opened 6 years ago

austinhurst commented 6 years ago

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.

superjax commented 6 years ago

Thanks @austinhurst.