![]() |
ISSDK
1.7
IoT Sensing Software Development Kit
|
The sensor_fusion.h file implements the top level programming interface. More...
#include "math.h"
#include "stdbool.h"
#include "stdio.h"
#include "stdint.h"
#include "issdk_hal.h"
#include "build.h"
#include "magnetic.h"
#include "precisionAccelerometer.h"
#include "orientation.h"
#include "register_io_spi.h"
#include "matrix.h"
Go to the source code of this file.
Data Structures | |
struct | PhysicalSensor |
An instance of PhysicalSensor structure type should be allocated for each physical sensors (combo devices = 1) More... | |
struct | PressureSensor |
The PressureSensor structure stores raw and processed measurements for an altimeter. More... | |
struct | AccelSensor |
The AccelSensor structure stores raw and processed measurements for a 3-axis accelerometer. More... | |
struct | MagSensor |
The MagSensor structure stores raw and processed measurements for a 3-axis magnetic sensor. More... | |
struct | GyroSensor |
The GyroSensor structure stores raw and processed measurements for a 3-axis gyroscope. More... | |
union | FifoSensor |
The FifoSensor union allows us to use common pointers for Accel, Mag & Gyro logical sensor structures. More... | |
struct | SV_1DOF_P_BASIC |
The SV_1DOF_P_BASIC structure contains state information for a pressure sensor/altimeter. More... | |
struct | SV_3DOF_G_BASIC |
This is the 3DOF basic accelerometer state vector structure. More... | |
struct | SV_3DOF_B_BASIC |
This is the 3DOF basic magnetometer state vector structure/. More... | |
struct | SV_3DOF_Y_BASIC |
SV_3DOF_Y_BASIC structure is the 3DOF basic gyroscope state vector structure. More... | |
struct | SV_6DOF_GB_BASIC |
SV_6DOF_GB_BASIC is the 6DOF basic accelerometer and magnetometer state vector structure. More... | |
struct | SV_6DOF_GY_KALMAN |
SV_6DOF_GY_KALMAN is the 6DOF Kalman filter accelerometer and gyroscope state vector structure. More... | |
struct | SV_9DOF_GBY_KALMAN |
SV_9DOF_GBY_KALMAN is the 9DOF Kalman filter accelerometer, magnetometer and gyroscope state vector structure. More... | |
struct | SV_COMMON |
struct | SensorFusionGlobals |
The top level fusion structure. More... | |
Macros | |
#define | true 1 |
Boolean TRUE. More... | |
#define | false 0 |
Boolean FALSE. More... | |
#define | SPI_ADDR 0x00 |
Vector Components | |
Index values for accessing vector terms | |
#define | CHX 0 |
Used to access X-channel entries in various data data structures. More... | |
#define | CHY 1 |
Used to access Y-channel entries in various data data structures. More... | |
#define | CHZ 2 |
Used to access Z-channel entries in various data data structures. More... | |
Generic bit-field values | |
Generic bit-field values | |
#define | B0 (1 << 0) |
#define | B1 (1 << 1) |
#define | B2 (1 << 2) |
#define | B3 (1 << 3) |
Math Constants | |
useful multiplicative conversion constants | |
#define | PI 3.141592654F |
pi More... | |
#define | PIOVER2 1.570796327F |
pi / 2 More... | |
#define | FPIOVER180 0.01745329251994F |
degrees to radians conversion = pi / 180 More... | |
#define | F180OVERPI 57.2957795130823F |
radians to degrees conversion = 180 / pi More... | |
#define | F180OVERPISQ 3282.8063500117F |
square of F180OVERPI More... | |
#define | ONETHIRD 0.33333333F |
one third More... | |
#define | ONESIXTH 0.166666667F |
one sixth More... | |
#define | ONESIXTEENTH 0.0625F |
one sixteenth More... | |
#define | ONEOVER12 0.083333333F |
1 / 12 More... | |
#define | ONEOVER48 0.02083333333F |
1 / 48 More... | |
#define | ONEOVER120 0.0083333333F |
1 / 120 More... | |
#define | ONEOVER3840 0.0002604166667F |
1 / 3840 More... | |
#define | ONEOVERSQRT2 0.707106781F |
1/sqrt(2) More... | |
#define | SQRT15OVER4 0.968245837F |
sqrt(15)/4 More... | |
#define | GTOMSEC2 9.80665 |
standard gravity in m/s2 More... | |
Typedefs | |
typedef enum quaternion | quaternion_type |
the quaternion type to be transmitted More... | |
typedef int8_t() | initializeSensor_t(struct PhysicalSensor *sensor, struct SensorFusionGlobals *sfg) |
typedef int8_t() | readSensor_t(struct PhysicalSensor *sensor, struct SensorFusionGlobals *sfg) |
typedef int8_t() | readSensors_t(struct SensorFusionGlobals *sfg, uint16_t read_loop_counter) |
typedef int8_t() | installSensor_t(struct SensorFusionGlobals *sfg, struct PhysicalSensor *sensor, uint16_t addr, uint16_t schedule, void *bus_driver, registerDeviceInfo_t *busInfo, initializeSensor_t *initialize, readSensor_t *read) |
typedef void() | initializeFusionEngine_t(struct SensorFusionGlobals *sfg) |
typedef void() | runFusion_t(struct SensorFusionGlobals *sfg) |
typedef void() | clearFIFOs_t(struct SensorFusionGlobals *sfg) |
typedef void() | conditionSensorReadings_t(struct SensorFusionGlobals *sfg) |
typedef void() | applyPerturbation_t(struct SensorFusionGlobals *sfg) |
typedef void() | setStatus_t(struct SensorFusionGlobals *sfg, fusion_status_t status) |
typedef void() | updateStatus_t(struct SensorFusionGlobals *sfg) |
typedef void() | ssSetStatus_t(struct StatusSubsystem *pStatus, fusion_status_t status) |
typedef void() | ssUpdateStatus_t(struct StatusSubsystem *pStatus) |
typedef struct SV_COMMON * | SV_ptr |
typedef struct SensorFusionGlobals | SensorFusionGlobals |
The top level fusion structure. More... | |
Integer Typedefs | |
Typedefs to map common integer types to standard form | |
typedef unsigned char | byte |
typedef int8_t | int8 |
typedef int16_t | int16 |
typedef int32_t | int32 |
typedef uint8_t | uint8 |
typedef uint16_t | uint16 |
typedef uint32_t | uint32 |
Enumerations | |
enum | quaternion { Q3, Q3M, Q3G, Q6MA, Q6AG, Q9 } |
the quaternion type to be transmitted More... | |
enum | fusion_status_t { OFF, INITIALIZING, LOWPOWER, NORMAL, RECEIVING_WIRED, RECEIVING_WIRELESS, HARD_FAULT, SOFT_FAULT } |
Application-specific serial communications system. More... | |
Functions | |
void | initSensorFusionGlobals (SensorFusionGlobals *sfg, struct StatusSubsystem *pStatusSubsystem, struct ControlSubsystem *pControlSubsystem) |
utility function to insert default values in the top level structure More... | |
void | conditionSensorReadings (SensorFusionGlobals *sfg) |
void | clearFIFOs (SensorFusionGlobals *sfg) |
Function to clear FIFO at the end of each fusion computation. More... | |
void | zeroArray (struct StatusSubsystem *pStatus, void *data, uint16_t size, uint16_t numElements, uint8_t check) |
void | conditionSample (int16_t sample[3]) |
conditionSample ensures that we never encounter the maximum negative two's complement value for a 16-bit variable (-32768). More... | |
void | addToFifo (union FifoSensor *sensor, uint16_t maxFifoSize, int16_t sample[3]) |
addToFifo is called from within sensor driver read functions More... | |
void | ApplyAccelHAL (struct AccelSensor *Accel) |
Apply the accelerometer Hardware Abstraction Layer. More... | |
void | ApplyMagHAL (struct MagSensor *Mag) |
Apply the magnetometer Hardware Abstraction Layer. More... | |
void | ApplyGyroHAL (struct GyroSensor *Gyro) |
Apply the gyroscope Hardware Abstraction Layer. More... | |
Variables | |
installSensor_t | installSensor |
initializeFusionEngine_t | initializeFusionEngine |
runFusion_t | runFusion |
readSensors_t | readSensors |
applyPerturbation_t | ApplyPerturbation |
ApplyPerturbation is a reverse unit-step test function. More... | |
The sensor_fusion.h file implements the top level programming interface.
Definition in file sensor_fusion.h.
#define B0 (1 << 0) |
Definition at line 98 of file sensor_fusion.h.
#define B1 (1 << 1) |
Definition at line 99 of file sensor_fusion.h.
#define B2 (1 << 2) |
Definition at line 100 of file sensor_fusion.h.
#define B3 (1 << 3) |
Definition at line 101 of file sensor_fusion.h.
#define CHX 0 |
Used to access X-channel entries in various data data structures.
Definition at line 86 of file sensor_fusion.h.
Referenced by addToFifo(), ApplyAccelHAL(), ApplyGyroHAL(), ApplyMagHAL(), conditionSample(), CreateAndSendPackets(), DecodeCommandBytes(), f3DOFMagnetometerMatrixAndroid(), f3DOFMagnetometerMatrixNED(), f3x3matrixDetA(), fAndroidAnglesDegFromRotationMatrix(), fComputeAccelCalibration10(), fComputeAccelCalibration4(), fComputeAccelCalibration7(), fComputeMagCalibration10(), fComputeMagCalibration4(), fComputeMagCalibration7(), feCompassAndroid(), feCompassNED(), feCompassWin8(), fInit_6DOF_GY_KALMAN(), fInit_9DOF_GBY_KALMAN(), fInitializeAccelCalibration(), fInitializeMagCalibration(), fInvertAccelCal(), fInvertMagCal(), fLPFOrientationQuaternion(), fNEDAnglesDegFromRotationMatrix(), fQuaternionFromRotationMatrix(), fQuaternionFromRotationVectorDeg(), fRotationMatrixFromQuaternion(), fRotationVectorDegFromQuaternion(), fRun_3DOF_Y_BASIC(), fRun_6DOF_GY_KALMAN(), fRunAccelCalibration(), fRunMagCalibration(), fUpdateAccelBuffer(), fUpdateMagCalibration10Slice(), fUpdateMagCalibration4Slice(), fUpdateMagCalibration7Slice(), fVeq3x3AxV(), fveqconjgquq(), fveqRu(), fWin8AnglesDegFromRotationMatrix(), FXLS8471Q_Read(), FXOS8700_Init(), FXOS8700_ReadMagData(), initializeSensors(), iUpdateMagBuffer(), MAG3110_Read(), motionCheck(), processMagData(), readAlgoParams(), and readCommon().
#define CHY 1 |
Used to access Y-channel entries in various data data structures.
Definition at line 87 of file sensor_fusion.h.
Referenced by addToFifo(), ApplyAccelHAL(), ApplyGyroHAL(), ApplyMagHAL(), conditionSample(), CreateAndSendPackets(), f3DOFMagnetometerMatrixAndroid(), f3DOFMagnetometerMatrixNED(), f3x3matrixDetA(), fAndroidAnglesDegFromRotationMatrix(), fComputeAccelCalibration10(), fComputeAccelCalibration4(), fComputeAccelCalibration7(), fComputeMagCalibration10(), fComputeMagCalibration4(), fComputeMagCalibration7(), feCompassAndroid(), feCompassNED(), feCompassWin8(), fInitializeAccelCalibration(), fInitializeMagCalibration(), fInvertAccelCal(), fInvertMagCal(), fLPFOrientationQuaternion(), fNEDAnglesDegFromRotationMatrix(), fQuaternionFromRotationMatrix(), fQuaternionFromRotationVectorDeg(), fRotationMatrixFromQuaternion(), fRotationVectorDegFromQuaternion(), fRun_6DOF_GY_KALMAN(), fUpdateMagCalibration10Slice(), fUpdateMagCalibration4Slice(), fUpdateMagCalibration7Slice(), fVeq3x3AxV(), fveqconjgquq(), fveqRu(), fWin8AnglesDegFromRotationMatrix(), FXLS8471Q_Read(), FXOS8700_Init(), FXOS8700_ReadMagData(), iUpdateMagBuffer(), MAG3110_Read(), motionCheck(), readAlgoParams(), and readCommon().
#define CHZ 2 |
Used to access Z-channel entries in various data data structures.
Definition at line 88 of file sensor_fusion.h.
Referenced by addToFifo(), ApplyAccelHAL(), ApplyGyroHAL(), ApplyMagHAL(), conditionSample(), CreateAndSendPackets(), DecodeCommandBytes(), f3DOFMagnetometerMatrixAndroid(), f3DOFMagnetometerMatrixNED(), f3x3matrixDetA(), fAndroidAnglesDegFromRotationMatrix(), fComputeAccelCalibration10(), fComputeAccelCalibration4(), fComputeAccelCalibration7(), fComputeMagCalibration10(), fComputeMagCalibration4(), fComputeMagCalibration7(), feCompassAndroid(), feCompassNED(), feCompassWin8(), fInit_6DOF_GY_KALMAN(), fInit_9DOF_GBY_KALMAN(), fInitializeAccelCalibration(), fInitializeMagCalibration(), fInvertAccelCal(), fInvertMagCal(), fLPFOrientationQuaternion(), fNEDAnglesDegFromRotationMatrix(), fQuaternionFromRotationMatrix(), fQuaternionFromRotationVectorDeg(), fRotationMatrixFromQuaternion(), fRotationVectorDegFromQuaternion(), fRun_3DOF_Y_BASIC(), fRun_6DOF_GY_KALMAN(), fRunAccelCalibration(), fRunMagCalibration(), fUpdateAccelBuffer(), fUpdateMagCalibration10Slice(), fUpdateMagCalibration4Slice(), fUpdateMagCalibration7Slice(), fVeq3x3AxV(), fveqconjgquq(), fveqRu(), fWin8AnglesDegFromRotationMatrix(), FXLS8471Q_Read(), FXOS8700_Init(), FXOS8700_ReadMagData(), initializeSensors(), iUpdateMagBuffer(), MAG3110_Read(), motionCheck(), processMagData(), readAlgoParams(), and readCommon().
#define F180OVERPI 57.2957795130823F |
radians to degrees conversion = 180 / pi
Definition at line 110 of file sensor_fusion.h.
Referenced by ApplyPerturbation(), and fRotationVectorDegFromQuaternion().
#define F180OVERPISQ 3282.8063500117F |
square of F180OVERPI
Definition at line 111 of file sensor_fusion.h.
#define false 0 |
Boolean FALSE.
Definition at line 93 of file sensor_fusion.h.
#define FPIOVER180 0.01745329251994F |
degrees to radians conversion = pi / 180
Definition at line 109 of file sensor_fusion.h.
Referenced by fInit_6DOF_GY_KALMAN(), fInit_9DOF_GBY_KALMAN(), fQuaternionFromRotationVectorDeg(), and fRotationVectorDegFromQuaternion().
#define GTOMSEC2 9.80665 |
standard gravity in m/s2
Definition at line 121 of file sensor_fusion.h.
Referenced by fInit_9DOF_GBY_KALMAN().
#define ONEOVER12 0.083333333F |
#define ONEOVER120 0.0083333333F |
1 / 120
Definition at line 117 of file sensor_fusion.h.
#define ONEOVER3840 0.0002604166667F |
1 / 3840
Definition at line 118 of file sensor_fusion.h.
Referenced by fQuaternionFromRotationVectorDeg().
#define ONEOVER48 0.02083333333F |
1 / 48
Definition at line 116 of file sensor_fusion.h.
Referenced by fQuaternionFromRotationVectorDeg().
#define ONEOVERSQRT2 0.707106781F |
1/sqrt(2)
Definition at line 119 of file sensor_fusion.h.
Referenced by ApplyPerturbation(), and fveqconjgquq().
#define ONESIXTEENTH 0.0625F |
one sixteenth
Definition at line 114 of file sensor_fusion.h.
#define ONESIXTH 0.166666667F |
one sixth
Definition at line 113 of file sensor_fusion.h.
Referenced by fComputeMagCalibration10(), and fComputeMagCalibration7().
#define ONETHIRD 0.33333333F |
one third
Definition at line 112 of file sensor_fusion.h.
Referenced by fComputeMagCalibration10(), fComputeMagCalibration7(), fUpdateMagCalibration10Slice(), and fUpdateMagCalibration7Slice().
#define PI 3.141592654F |
#define PIOVER2 1.570796327F |
pi / 2
Definition at line 108 of file sensor_fusion.h.
#define SPI_ADDR 0x00 |
Definition at line 164 of file sensor_fusion.h.
Referenced by FXLS8471Q_Idle(), FXLS8471Q_Init(), and FXLS8471Q_Read().
#define SQRT15OVER4 0.968245837F |
sqrt(15)/4
Definition at line 120 of file sensor_fusion.h.
#define true 1 |
Boolean TRUE.
Definition at line 92 of file sensor_fusion.h.
typedef void() applyPerturbation_t(struct SensorFusionGlobals *sfg) |
Definition at line 171 of file sensor_fusion.h.
typedef unsigned char byte |
Definition at line 64 of file sensor_fusion.h.
typedef void() clearFIFOs_t(struct SensorFusionGlobals *sfg) |
Definition at line 169 of file sensor_fusion.h.
typedef void() conditionSensorReadings_t(struct SensorFusionGlobals *sfg) |
Definition at line 170 of file sensor_fusion.h.
typedef void() initializeFusionEngine_t(struct SensorFusionGlobals *sfg) |
Definition at line 167 of file sensor_fusion.h.
typedef int8_t() initializeSensor_t(struct PhysicalSensor *sensor, struct SensorFusionGlobals *sfg) |
Definition at line 142 of file sensor_fusion.h.
typedef int8_t() installSensor_t(struct SensorFusionGlobals *sfg, struct PhysicalSensor *sensor, uint16_t addr, uint16_t schedule, void *bus_driver, registerDeviceInfo_t *busInfo, initializeSensor_t *initialize, readSensor_t *read) |
Definition at line 154 of file sensor_fusion.h.
typedef int16_t int16 |
Definition at line 66 of file sensor_fusion.h.
Definition at line 67 of file sensor_fusion.h.
typedef int8_t int8 |
Definition at line 65 of file sensor_fusion.h.
typedef enum quaternion quaternion_type |
the quaternion type to be transmitted
typedef int8_t() readSensor_t(struct PhysicalSensor *sensor, struct SensorFusionGlobals *sfg) |
Definition at line 146 of file sensor_fusion.h.
typedef int8_t() readSensors_t(struct SensorFusionGlobals *sfg, uint16_t read_loop_counter) |
Definition at line 150 of file sensor_fusion.h.
typedef void() runFusion_t(struct SensorFusionGlobals *sfg) |
Definition at line 168 of file sensor_fusion.h.
typedef struct SensorFusionGlobals SensorFusionGlobals |
The top level fusion structure.
The top level fusion structure grows/shrinks based upon flag definitions contained in build.h. These same flags will populate the .iFlags field for run-time access.
typedef void() setStatus_t(struct SensorFusionGlobals *sfg, fusion_status_t status) |
Definition at line 172 of file sensor_fusion.h.
typedef void() ssSetStatus_t(struct StatusSubsystem *pStatus, fusion_status_t status) |
Definition at line 174 of file sensor_fusion.h.
typedef void() ssUpdateStatus_t(struct StatusSubsystem *pStatus) |
Definition at line 175 of file sensor_fusion.h.
Definition at line 473 of file sensor_fusion.h.
typedef uint16_t uint16 |
Definition at line 69 of file sensor_fusion.h.
typedef uint32_t uint32 |
Definition at line 70 of file sensor_fusion.h.
typedef uint8_t uint8 |
Definition at line 68 of file sensor_fusion.h.
typedef void() updateStatus_t(struct SensorFusionGlobals *sfg) |
Definition at line 173 of file sensor_fusion.h.
enum fusion_status_t |
Application-specific serial communications system.
Definition at line 130 of file sensor_fusion.h.
enum quaternion |
the quaternion type to be transmitted
Enumerator | |
---|---|
Q3 | Quaternion derived from 3-axis accel (tilt) |
Q3M | Quaternion derived from 3-axis mag only (auto compass algorithm) |
Q3G | Quaternion derived from 3-axis gyro only (rotation) |
Q6MA | Quaternion derived from 3-axis accel + 3 axis mag (eCompass) |
Q6AG | Quaternion derived from 3-axis accel + 3-axis gyro (gaming) |
Q9 | Quaternion derived from full 9-axis sensor fusion. |
Definition at line 74 of file sensor_fusion.h.
void addToFifo | ( | union FifoSensor * | sensor, |
uint16_t | maxFifoSize, | ||
int16_t | sample[3] | ||
) |
addToFifo is called from within sensor driver read functions
addToFifo is called from within sensor driver read functions to transfer new readings into the sensor structure corresponding to accel, gyro or mag. This function ensures that the software FIFOs are not overrun.
example usage: if (status==SENSOR_ERROR_NONE) addToFifo((FifoSensor*) &(sfg->Mag), MAG_FIFO_SIZE, sample);
sensor | pointer to structure of type AccelSensor, MagSensor or GyroSensor |
maxFifoSize | the size of the software (not hardware) FIFO |
sample | the sample to add |
Definition at line 548 of file sensor_fusion.c.
References FifoSensor::Accel, CHX, CHY, CHZ, AccelSensor::iFIFOCount, AccelSensor::iFIFOExceeded, and AccelSensor::iGsFIFO.
Referenced by FXLS8471Q_Read(), FXOS8700_Init(), FXOS8700_ReadMagData(), and MAG3110_Read().
void ApplyAccelHAL | ( | struct AccelSensor * | Accel | ) |
Apply the accelerometer Hardware Abstraction Layer.
Accel | pointer to accelerometer logical sensor |
Definition at line 48 of file hal_frdm_fxs_mult2_b.c.
References CHX, CHY, CHZ, AccelSensor::iFIFOCount, and AccelSensor::iGsFIFO.
Referenced by initializeSensors().
void ApplyGyroHAL | ( | struct GyroSensor * | Gyro | ) |
Apply the gyroscope Hardware Abstraction Layer.
Gyro | pointer to gyroscope logical sensor |
Definition at line 103 of file hal_frdm_fxs_mult2_b.c.
References CHX, CHY, CHZ, GyroSensor::iFIFOCount, and GyroSensor::iYsFIFO.
Referenced by processMagData().
void ApplyMagHAL | ( | struct MagSensor * | Mag | ) |
Apply the magnetometer Hardware Abstraction Layer.
Mag | pointer to magnetometer logical sensor |
Definition at line 75 of file hal_frdm_fxs_mult2_b.c.
References CHX, CHY, CHZ, MagSensor::iBsFIFO, and MagSensor::iFIFOCount.
Referenced by processMagData().
void clearFIFOs | ( | SensorFusionGlobals * | sfg | ) |
Function to clear FIFO at the end of each fusion computation.
sfg | Global data structure pointer |
Definition at line 380 of file sensor_fusion.c.
References MagSensor::iFIFOCount, MagSensor::iFIFOExceeded, and SensorFusionGlobals::Mag.
Referenced by initializeFusionEngine(), initSensorFusionGlobals(), and runFusion().
void conditionSample | ( | int16_t | sample[3] | ) |
conditionSample ensures that we never encounter the maximum negative two's complement value for a 16-bit variable (-32768).
conditionSample ensures that we never encounter the maximum negative two's complement value for a 16-bit variable (-32768). This value cannot be negated, because the maximum positive value is +32767. We need the ability to negate to gaurantee that subsequent HAL operations can be run successfully.
sample | 16-bit register value from triaxial sensor read |
Definition at line 536 of file sensor_fusion.c.
Referenced by FXLS8471Q_Read(), FXOS8700_Init(), FXOS8700_ReadMagData(), and MAG3110_Read().
void conditionSensorReadings | ( | SensorFusionGlobals * | sfg | ) |
conditionSensorReadings() transforms raw software FIFO readings into forms that can be consumed by the sensor fusion engine. This include sample averaging and (in the case of the gyro) integrations, applying hardware abstraction layers, and calibration functions. This function is normally involved via the "sfg." global pointer.
sfg | Global data structure pointer |
Definition at line 322 of file sensor_fusion.c.
References MagSensor::isEnabled, SensorFusionGlobals::Mag, and processMagData().
Referenced by initSensorFusionGlobals().
void initSensorFusionGlobals | ( | SensorFusionGlobals * | sfg, |
struct StatusSubsystem * | pStatusSubsystem, | ||
struct ControlSubsystem * | pControlSubsystem | ||
) |
utility function to insert default values in the top level structure
sfg | Global data structure pointer |
pStatusSubsystem | Status subsystem pointer |
pControlSubsystem | Control subsystem pointer |
Definition at line 77 of file sensor_fusion.c.
References SensorFusionGlobals::applyPerturbation, ApplyPerturbation, clearFIFOs(), SensorFusionGlobals::clearFIFOs, conditionSensorReadings(), SensorFusionGlobals::conditionSensorReadings, F_1DOF_P_BASIC, F_3DOF_B_BASIC, F_3DOF_G_BASIC, F_3DOF_Y_BASIC, F_6DOF_GB_BASIC, F_6DOF_GY_KALMAN, F_9DOF_GBY_KALMAN, F_ALL_SENSORS, F_USING_ACCEL, F_USING_GYRO, F_USING_MAG, F_USING_PRESSURE, F_USING_TEMPERATURE, SensorFusionGlobals::iFlags, initializeFusionEngine(), SensorFusionGlobals::initializeFusionEngine, installSensor(), SensorFusionGlobals::installSensor, SensorFusionGlobals::iPerturbation, MagSensor::iWhoAmI, SensorFusionGlobals::loopcounter, SensorFusionGlobals::Mag, SensorFusionGlobals::pControlSubsystem, SensorFusionGlobals::pSensors, SensorFusionGlobals::pStatusSubsystem, queueStatus(), SensorFusionGlobals::queueStatus, readSensors(), SensorFusionGlobals::readSensors, runFusion(), SensorFusionGlobals::runFusion, setStatus(), SensorFusionGlobals::setStatus, SensorFusionGlobals::systick_I2C, SensorFusionGlobals::systick_Spare, testStatus(), SensorFusionGlobals::testStatus, updateStatus(), and SensorFusionGlobals::updateStatus.
Referenced by main().
void zeroArray | ( | struct StatusSubsystem * | pStatus, |
void * | data, | ||
uint16_t | size, | ||
uint16_t | numElements, | ||
uint8_t | check | ||
) |
pStatus | Status subsystem pointer |
data | pointer to array to be zeroed |
size | data type size = 8, 16 or 32 |
numElements | number of elements to zero out |
check | true if you would like to verify writes, false otherwise |
Definition at line 337 of file sensor_fusion.c.
References data, HARD_FAULT, and StatusSubsystem::set.
applyPerturbation_t ApplyPerturbation |
ApplyPerturbation is a reverse unit-step test function.
The ApplyPerturbation function applies a user-specified step function to prior fusion results which is then "released" in the next fusion cycle. When used in conjuction with the NXP Sensor Fusion Toolbox, this provides a visual indication of the dynamic behavior of the library. ApplyPerturbation() is defined in debug.c.
Definition at line 639 of file sensor_fusion.h.
Referenced by initSensorFusionGlobals().
initializeFusionEngine_t initializeFusionEngine |
Definition at line 571 of file sensor_fusion.h.
installSensor_t installSensor |
Definition at line 570 of file sensor_fusion.h.
readSensors_t readSensors |
Definition at line 584 of file sensor_fusion.h.
runFusion_t runFusion |
Definition at line 583 of file sensor_fusion.h.