MotionGC Software Library: algorithms/Middlewares/ST/STM32_MotionGC_Library/Inc/motion_gc.h Source File

Motion GC

MotionGC Software Library
MotionGC Software Library Documentation
motion_gc.h
Go to the documentation of this file.
1 
38 /* Define to prevent recursive inclusion -------------------------------------*/
39 #ifndef _MOTION_GC_H_
40 #define _MOTION_GC_H_
41 
42 #ifdef __cplusplus
43 extern "C"
44 {
45 #endif
46 
47 /* Includes ------------------------------------------------------------------*/
48 #include <stdint.h>
49 
58 /* Exported types ------------------------------------------------------------*/
59 
64 typedef struct
65 {
66  float Acc[3]; /* Acceleration in X, Y, Z axis in [g] */
67  float Gyro[3]; /* Angular rate along X, Y, Z axis in [dps] */
68 } MGC_input_t;
69 
70 typedef struct
71 {
72  float GyroBiasX; /* Gyroscope offset value in X axis in [dps] */
73  float GyroBiasY; /* Gyroscope offset value in Y axis in [dps] */
74  float GyroBiasZ; /* Gyroscope offset value in Z axis in [dps] */
75 } MGC_output_t;
76 
77 
78 typedef struct
79 {
80  float AccThr; /* Accelerometer threshold to detect steady state in [g] in range 0.003-0.05 g, defualt value 0.01 g */
81  float GyroThr; /* Gyroscope threshold to detect steady state in [dps] in range 0.008-0.4 dps , default value 0.2 dps */
82  float FilterConst; /* Constant for internal filter [0..1], default value 0.002 */
83  int FastStart; /* Set to 1 for fast convergence at the initialization, default value 1 */
84  float MaxGyro; /* Maximum expected angular rate offset when still in [dps], default value 15 dps */
85  float MaxAcc; /* Maximum acceleration module when still in [g], default value 1.3g */
86 } MGC_knobs_t;
87 
92 /* Exported constants --------------------------------------------------------*/
93 /* Exported variables --------------------------------------------------------*/
94 /* Exported macro ------------------------------------------------------------*/
95 
100 /* Exported functions ------------------------------------------------------- */
101 
107 void MotionGC_Initialize(float freq);
108 
114 void MotionGC_GetKnobs(MGC_knobs_t *knobs);
115 
121 void MotionGC_SetKnobs(MGC_knobs_t *knobs);
122 
130 void MotionGC_Update(MGC_input_t *data_in, MGC_output_t *gyro_bias, int *bias_update);
131 
137 void MotionGC_GetCalParams(MGC_output_t *gyro_bias);
138 
144 void MotionGC_SetCalParams(MGC_output_t *gyro_bias);
145 
151 void MotionGC_SetFrequency(float freq);
152 
153 
159 uint8_t MotionGC_GetLibVersion(char *version);
160 
173 #ifdef __cplusplus
174 }
175 #endif
176 
177 #endif /* _MOTION_GC_H_ */
178 
179 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
void MotionGC_GetCalParams(MGC_output_t *gyro_bias)
Get the gyroscope compensation parameters.
float FilterConst
Definition: motion_gc.h:82
float MaxAcc
Definition: motion_gc.h:85
uint8_t MotionGC_GetLibVersion(char *version)
Get the library version.
void MotionGC_Initialize(float freq)
Initialize the MotionGC engine.
int FastStart
Definition: motion_gc.h:83
void MotionGC_GetKnobs(MGC_knobs_t *knobs)
Get the knobs setting of the library.
float GyroBiasZ
Definition: motion_gc.h:74
float AccThr
Definition: motion_gc.h:80
void MotionGC_SetFrequency(float freq)
Set new sample frequency.
float MaxGyro
Definition: motion_gc.h:84
void MotionGC_SetCalParams(MGC_output_t *gyro_bias)
Set the initial gyroscope compensation parameters.
float GyroBiasY
Definition: motion_gc.h:73
void MotionGC_SetKnobs(MGC_knobs_t *knobs)
Set the knobs setting of the library.
void MotionGC_Update(MGC_input_t *data_in, MGC_output_t *gyro_bias, int *bias_update)
Run gyroscope calibration algorithm and return compensation parameters.
float GyroBiasX
Definition: motion_gc.h:72
float GyroThr
Definition: motion_gc.h:81
Generated on Fri Mar 31 2017 11:05:21 for MotionGC Software Library by   doxygen 1.8.9.1