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.
FusionBias.h
00001 /** 00002 * @file FusionBias.h 00003 * @author Seb Madgwick 00004 * @brief The gyroscope bias correction algorithm achieves run-time calibration 00005 * of the gyroscope bias. The algorithm will detect when the gyroscope is 00006 * stationary for a set period of time and then begin to sample gyroscope 00007 * measurements to calculate the bias as an average. 00008 */ 00009 00010 #ifndef FUSION_BIAS_H 00011 #define FUSION_BIAS_H 00012 00013 //------------------------------------------------------------------------------ 00014 // Includes 00015 00016 #include "FusionTypes.h" 00017 #include <stdbool.h> 00018 00019 //------------------------------------------------------------------------------ 00020 // Definitions 00021 00022 /** 00023 * @brief Gyroscope bias correction algorithm structure. Structure members are 00024 * used internally and should not be used by the user application. 00025 */ 00026 typedef struct { 00027 float threshold; 00028 float samplePeriod; 00029 float filterCoefficient; 00030 float stationaryTimer; 00031 FusionVector3 gyroscopeBias; 00032 } FusionBias; 00033 00034 //------------------------------------------------------------------------------ 00035 // Function prototypes 00036 00037 void FusionBiasInitialise(FusionBias * const fusionBias, const float threshold, const float samplePeriod); 00038 FusionVector3 FusionBiasUpdate(FusionBias * const fusionBias, FusionVector3 gyroscope); 00039 bool FusionBiasIsActive(FusionBias * const fusionBias); 00040 00041 #endif 00042 00043 //------------------------------------------------------------------------------ 00044 // End of file
Generated on Tue Jul 12 2022 21:08:03 by
1.7.2