PebbleOS v4.47.0-327-g7753e801d
Loading...
Searching...
No Matches
vanhees.h File Reference
#include <stdint.h>

Data Structures

struct  pbl_vanhees_sample
 Accelerometer sample, in mG. More...
 

Macros

#define PBL_VANHEES_SAMPLE_HZ   25
 Accelerometer sampling rate expected by the algorithm, in Hz.
 
#define PBL_VANHEES_ANGLE_THRESHOLD_DEG   5
 A larger angle difference between successive epochs is a posture change, in degrees.
 
#define PBL_VANHEES_TIME_THRESHOLD_M   5
 Minimum time without posture change of a sustained inactivity bout, in minutes.
 
#define PBL_VANHEES_LAG_M   (PBL_VANHEES_TIME_THRESHOLD_M - 1)
 Minutes between the end of a minute and its verdict.
 

Functions

uint32_t pbl_vanhees_state_size (void)
 Get the size of the algorithm state.
 
void pbl_vanhees_init (struct pbl_vanhees *state)
 Initialize the algorithm state.
 
void pbl_vanhees_analyze_samples (struct pbl_vanhees *state, const struct pbl_vanhees_sample *samples, uint32_t num_samples)
 Analyze accelerometer samples.
 
bool pbl_vanhees_minute_update (struct pbl_vanhees *state, bool *inactive)
 Classify the minute that ended PBL_VANHEES_LAG_M minutes ago.