MotionEC Software Library: algorithms/Middlewares/ST/STM32_MotionEC_Library/Inc/motion_ec.h Source File

Motion EC

MotionEC Software Library
MotionEC Software Library Documentation
motion_ec.h
Go to the documentation of this file.
1 
38 /* Define to prevent recursive inclusion -------------------------------------*/
39 #ifndef _MOTION_EC_H_
40 #define _MOTION_EC_H_
41 
42 #ifdef __cplusplus
43 extern "C"
44 {
45 #endif
46 
47 /* Includes ------------------------------------------------------------------*/
48 #include <stdint.h>
49 
62 /* Exported types ------------------------------------------------------------*/
63 
64 typedef struct
65 {
66  float Acc[3]; /* Accelerometer Data [g] */
67  float Mag[3]; /* Magnetometer Data [uT / 50] */
68  float DTime; /* Delta-time [s] */
69 } MEC_input_t;
70 
71 typedef struct
72 {
73  float Quaternion[4]; /* Quaternion [x, y, z, w] */
74  float Euler[3]; /* Yaw, Pitch, Roll [deg] */
75  float IGyro[3]; /* Virtual Gyroscope [dps] */
76  float Gravity[3]; /* Gravity [g] */
77  float Linear[3]; /* Linear acceleration [g] */
78 } MEC_output_t;
79 
80 typedef enum
81 {
84 } MEC_state_t;
85 
90 /* Exported constants --------------------------------------------------------*/
91 /* Exported variables --------------------------------------------------------*/
92 /* Exported macro ------------------------------------------------------------*/
93 
98 /* Exported functions ------------------------------------------------------- */
99 
105 void MotionEC_Initialize(float freq);
106 
113 void MotionEC_Run(MEC_input_t *data_in, MEC_output_t *data_out);
114 
121 
128 
135 
142 
149 
156 
163 
170 
176 void MotionEC_SetFrequency(float freq);
177 
183 uint8_t MotionEC_GetLibVersion(char *version);
184 
197 #ifdef __cplusplus
198 }
199 #endif
200 
201 #endif /* _MOTION_EC_H_ */
202 
203 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
void MotionEC_GetOrientationEnable(MEC_state_t *state)
Get enable/disable state of the Euler angles calculation.
void MotionEC_SetLinearAccEnable(MEC_state_t state)
Set enable/disable state of the linear acceleration calculation.
void MotionEC_Run(MEC_input_t *data_in, MEC_output_t *data_out)
Run E-Compass algorithm (accelerometer and magnetometer data fusion)
void MotionEC_SetGravityEnable(MEC_state_t state)
Set enable/disable state of the gravity vector calculation.
void MotionEC_SetOrientationEnable(MEC_state_t state)
Set enable/disable state of the Euler angles calculation.
uint8_t MotionEC_GetLibVersion(char *version)
Get the library version.
void MotionEC_GetGravityEnable(MEC_state_t *state)
Get enable/disable state of the gravity vector calculation.
MEC_state_t
Definition: motion_ec.h:80
float DTime
Definition: motion_ec.h:68
void MotionEC_SetFrequency(float freq)
Set sampling frequency (modify filtering parameters)
void MotionEC_SetVirtualGyroEnable(MEC_state_t state)
Set enable/disable state of the virtual gyroscope calculation.
void MotionEC_GetVirtualGyroEnable(MEC_state_t *state)
Get enable/disable state of the virtual gyroscope calculation.
void MotionEC_GetLinearAccEnable(MEC_state_t *state)
Get enable/disable state of the linear acceleration calculation.
void MotionEC_Initialize(float freq)
Initialize and reset the MotionEC engine.
Generated on Mon May 8 2017 15:45:15 for MotionEC Software Library by   doxygen 1.8.9.1