10#ifndef __SENSOR_FUSION_H__
11#define __SENSOR_FUSION_H__
14#define sampleFreqDef 500.0f
19void updateIMU(
float gx,
float gy,
float gz,
float ax,
float ay,
float az);
44 return roll * 57.29578f;
55 return pitch * 57.29578f;
66 return yaw * 57.29578f;
void updateIMU(float gx, float gy, float gz, float ax, float ay, float az)
Creates quaternion from gyro and accel values.
Definition: madgwick.c:59
float q1
Definition: madgwick.c:17
char anglesComputed
Definition: madgwick.c:24
float roll
Definition: madgwick.c:21
float q0
Definition: madgwick.c:16
float pitch
Definition: madgwick.c:22
float invSampleFreq
Definition: madgwick.c:20
void computeAngles(void)
Computes angles from quaternion.
Definition: madgwick.c:154
float yaw
Definition: madgwick.c:23
float beta
Definition: madgwick.c:15
float q3
Definition: madgwick.c:19
void madgwickInit(void)
Initializes quaternion and other variables.
Definition: madgwick.c:34
float q2
Definition: madgwick.c:18