ISSDK  1.8
IoT Sensing Software Development Kit
Functions
motionCheck.c File Reference

check to see if the board is moving. More...

#include "sensor_fusion.h"
Include dependency graph for motionCheck.c:

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)
 

Detailed Description

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.

Function Documentation

◆ motionCheck()

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().

Parameters
sampleprocessed triaxial sensor sample (accel or mag)
baselineprevious value to compare to
tolerancehow much tolerance you can stand
winLengthhow many samples need to be stable to assert "noMotion"
counthow many samples so far we've been not moving

Definition at line 23 of file motionCheck.c.

References CHX, CHY, and CHZ.