Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fusion/FusionBias.h
- Committer:
- natvich
- Date:
- 2021-10-30
- Revision:
- 1:57502185804c
File content as of revision 1:57502185804c:
/** * @file FusionBias.h * @author Seb Madgwick * @brief The gyroscope bias correction algorithm achieves run-time calibration * of the gyroscope bias. The algorithm will detect when the gyroscope is * stationary for a set period of time and then begin to sample gyroscope * measurements to calculate the bias as an average. */ #ifndef FUSION_BIAS_H #define FUSION_BIAS_H //------------------------------------------------------------------------------ // Includes #include "FusionTypes.h" #include <stdbool.h> //------------------------------------------------------------------------------ // Definitions /** * @brief Gyroscope bias correction algorithm structure. Structure members are * used internally and should not be used by the user application. */ typedef struct { float threshold; float samplePeriod; float filterCoefficient; float stationaryTimer; FusionVector3 gyroscopeBias; } FusionBias; //------------------------------------------------------------------------------ // Function prototypes void FusionBiasInitialise(FusionBias * const fusionBias, const float threshold, const float samplePeriod); FusionVector3 FusionBiasUpdate(FusionBias * const fusionBias, FusionVector3 gyroscope); bool FusionBiasIsActive(FusionBias * const fusionBias); #endif //------------------------------------------------------------------------------ // End of file