juangallostra / AltitudeEstimation

A two-step Kalman/Complementary filter for Estimation of Vertical Position using an IMU-Barometer sytem
MIT License
58 stars 20 forks source link

Reduce the number of iterations used to calibrate the baro #8

Closed juangallostra closed 6 years ago

juangallostra commented 6 years ago

Issue/Feature this PR addresses

Baro calibration time is too long

Expected behavior after merge

Baro calibration time is reduced by half. Note that at least 48 iterations are required to fill the history array of baro readings. To be safe and discard the first readings which can be innaccurate we set the number of iterations to 70. Before it was 150.

juangallostra commented 6 years ago

After some testing it seems that we need a longer number of iterations than 70 to calibrate the baro. AS per commit 7c69e8c5da441bd5fb0b46678cf6d6e3b3f702c0 and after some testing the number of iterations has been set to 120.