![]() |
ISSDK
1.8
IoT Sensing Software Development Kit
|
check to see if the board is moving. More...
#include "sensor_fusion.h"
Go to the source code of this file.
Functions | |
bool | motionCheck (float sample[3], float baseline[3], float tolerance, uint32_t winLength, uint32_t *count) |
check to see if the board is moving.
This function would normally be called from your fusion_tasks in your main.c. See main_freertos_two_tasks_power_cycling.c for example usage.
Definition in file motionCheck.c.
bool motionCheck | ( | float | sample[3], |
float | baseline[3], | ||
float | tolerance, | ||
uint32_t | winLength, | ||
uint32_t * | count | ||
) |
The motionCheck() function is not a sensor fusion function. It is a function that simply monitors an accelerometer or magnetometer tri-axial sensor output, returning Boolean true if the sensor appears to be stationary, and false otherwise. This function would normally be called from your fusion_tasks in your main().
sample | processed triaxial sensor sample (accel or mag) |
baseline | previous value to compare to |
tolerance | how much tolerance you can stand |
winLength | how many samples need to be stable to assert "noMotion" |
count | how many samples so far we've been not moving |
Definition at line 23 of file motionCheck.c.