Improved Magnetometer / Compass Bias Estimator (#12998)
commit84a04db8b973407c00d6d5c2ead787ce3353ec06
authorpichim <93905657+pichim@users.noreply.github.com>
Wed, 15 Nov 2023 15:12:36 +0000 (15 16:12 +0100)
committerGitHub <noreply@github.com>
Wed, 15 Nov 2023 15:12:36 +0000 (15 16:12 +0100)
tree421ba864ae2278ccdc13981bb2b6ed81c8e22265
parent9618dc845132e0e4eaa22167dea07df225ad43d6
Improved Magnetometer / Compass Bias Estimator (#12998)

* Rebased on master and clean-up (untested), this is still the initial method

* Included math.h in compass.c, so checks don't fail

* Change comments, compass is still only running at 167 Hz, not worth investing more

* Alternative method, using only mag data

* Removed unnecessary scaling and fine tuning

* Corrected comment

* Removed no longer needed debug DEBUG_MAG_TASK_RATE, comments and corrected some typos

* Improved readability and update of comment

* Rebased on master and resolved conflicts

* Included math.h and maths.h so checks don't fail

* Update src/main/sensors/compass.c

Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
* Update src/main/sensors/compass.h

Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
* Update src/main/sensors/compass.c

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>
* Changes according to PR comments

---------

Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
Co-authored-by: Petr Ledvina <ledvinap@gmail.com>
src/main/build/debug.c
src/main/build/debug.h
src/main/sensors/compass.c
src/main/sensors/compass.h