13#ifndef PRECISIONACCELEROMETER_H
14#define PRECISIONACCELEROMETER_H
23#define ACCEL_CAL_AVERAGING_SECS 2
24#define MAX_ACCEL_CAL_ORIENTATIONS 12
59 volatile int8_t *AccelCalPacketOn
66 volatile int8_t *AccelCalPacketOn
void fRunAccelCalibration(AccelCalibration *pthisAccelCal, AccelBuffer *pthisAccelBuffer, struct AccelSensor *pthisAccel)
function runs the precision accelerometer calibration
void fUpdateAccelBuffer(AccelCalibration *pthisAccelCal, AccelBuffer *pthisAccelBuffer, struct AccelSensor *pthisAccel, volatile int8_t *AccelCalPacketOn)
Update the buffer used to store samples used for accelerometer calibration.
void fInvertAccelCal(struct AccelSensor *pthisAccel, AccelCalibration *pthisAccelCal)
function maps the accelerometer data fGs (g) onto precision calibrated and de-rotated data fGc (g),...
#define MAX_ACCEL_CAL_ORIENTATIONS
number of stored precision accelerometer measurements
void fInitializeAccelCalibration(AccelCalibration *pthisAccelCal, AccelBuffer *pthisAccelBuffer, volatile int8_t *AccelCalPacketOn)
Initialize the accelerometer calibration functions.
void fComputeAccelCalibration4(AccelBuffer *pthisAccelBuffer, AccelCalibration *pthisAccelCal, struct AccelSensor *pthisAccel)
calculate the 4 element calibration from the available measurements
void fComputeAccelCalibration7(AccelBuffer *pthisAccelBuffer, AccelCalibration *pthisAccelCal, struct AccelSensor *pthisAccel)
calculate the 7 element calibration from the available measurements
void fComputeAccelCalibration10(AccelBuffer *pthisAccelBuffer, AccelCalibration *pthisAccelCal, struct AccelSensor *pthisAccel)
calculate the 10 element calibration from the available measurements
accelerometer measurement buffer
int16_t iStoreCounter
number of remaining iterations at FUSION_HZ to average measurement
int16_t iStoreFlags
denotes which measurements are present
int16_t iStoreLocation
-1 for none, 0 to 11 for the 12 storage locations
precision accelerometer calibration structure
The AccelSensor structure stores raw and processed measurements for a 3-axis accelerometer.