MotionAW Software Library: algorithms/Middlewares/ST/STM32_MotionAW_Library/Inc/motion_aw.h Source File

Motion AW

MotionAW Software Library
MotionAW Software Library Documentation
motion_aw.h
Go to the documentation of this file.
1 
38 /* Define to prevent recursive inclusion -------------------------------------*/
39 #ifndef _MOTION_AW_H_
40 #define _MOTION_AW_H_
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 
46 /* Includes ------------------------------------------------------------------*/
47 #include <stdint.h>
48 
61 /* Exported constants --------------------------------------------------------*/
62 #define NUM_ACTIVITIES 9
63 
64 /* Exported types ------------------------------------------------------------*/
65  typedef struct
66 {
67  float AccX; /* Acceleration in X axis in [g] */
68  float AccY; /* Acceleration in Y axis in [g] */
69  float AccZ; /* Acceleration in Z axis in [g] */
70 } MAW_input_t;
71 
72 typedef enum
73 {
76  MAW_STANDING = 0x02,
77  MAW_SITTING = 0x03,
78  MAW_LYING = 0x04,
79  MAW_WALKING = 0x05,
81  MAW_JOGGING = 0x07,
82  MAW_BIKING = 0x08
84 
85 typedef struct {
87  uint16_t confidence;
89  uint32_t activity_total_duration[NUM_ACTIVITIES];
90 } MAW_output_t;
91 
96 /* Exported variables --------------------------------------------------------*/
97 /* Exported macro ------------------------------------------------------------*/
98 
103 /* Exported functions ------------------------------------------------------- */
104 
110 void MotionAW_Initialize(void);
111 
117 void MotionAW_SetOrientation_Acc(const char *acc_orientation);
118 
125 void MotionAW_Update(MAW_input_t *data_in, MAW_output_t *data_out);
126 
132 void MotionAW_Reset(void);
133 
140 
146 uint8_t MotionAW_GetLibVersion(char *version);
147 
148 
161 #ifdef __cplusplus
162 }
163 #endif
164 
165 #endif /* _MOTION_AW_H_ */
166 
167 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
uint32_t current_activity_duration
Definition: motion_aw.h:88
void MotionAW_Initialize(void)
Initialize the MotionAW engine.
MAW_activity_t current_activity
Definition: motion_aw.h:86
uint16_t confidence
Definition: motion_aw.h:87
void MotionAW_Reset_Activity_Duration(void)
Resets total activity duration counters.
MAW_activity_t
Definition: motion_aw.h:72
float AccX
Definition: motion_aw.h:67
void MotionAW_SetOrientation_Acc(const char *acc_orientation)
Set the MotionAW accelerometer data orientation.
void MotionAW_Update(MAW_input_t *data_in, MAW_output_t *data_out)
Run activity recognition algorithm.
void MotionAW_Reset(void)
Resets activity recognition algorithm.
uint8_t MotionAW_GetLibVersion(char *version)
Get the library version.
float AccZ
Definition: motion_aw.h:69
float AccY
Definition: motion_aw.h:68
#define NUM_ACTIVITIES
Definition: motion_aw.h:62
Generated on Fri Mar 31 2017 11:00:54 for MotionAW Software Library by   doxygen 1.8.9.1