Autodrone
Multi-Domain Vehicle
madgwick.h File Reference

This file gives the function to create our RPY values. More...

Go to the source code of this file.

Macros

#define sampleFreqDef   500.0f
 
#define betaDef   5.0f
 

Functions

void madgwickInit (void)
 Initializes quaternion and other variables. More...
 
void updateIMU (float gx, float gy, float gz, float ax, float ay, float az)
 Creates quaternion from gyro and accel values. More...
 
void computeAngles (void)
 Computes angles from quaternion. More...
 

Variables

float beta
 
float q0
 
float q1
 
float q2
 
float q3
 
float invSampleFreq
 
float roll
 
float pitch
 
float yaw
 
char anglesComputed
 

Detailed Description

This file gives the function to create our RPY values.

Author
Jeremy Wolfe
Date
03 MAR 2022

Macro Definition Documentation

◆ betaDef

#define betaDef   5.0f

◆ sampleFreqDef

#define sampleFreqDef   500.0f

Function Documentation

◆ computeAngles()

void computeAngles ( void  )

Computes angles from quaternion.

Returns
Void.

◆ madgwickInit()

void madgwickInit ( void  )

Initializes quaternion and other variables.

Returns
Void.

◆ updateIMU()

void updateIMU ( float  gx,
float  gy,
float  gz,
float  ax,
float  ay,
float  az 
)

Creates quaternion from gyro and accel values.

Parameters
floatgx Gyro roll data in deg/s.
floatgy Gyro pitch data in deg/s.
floatgz Gyro yaw data in deg/s.
floatax Accel x-axis data in m/s^2.
floatay Accel y-axis data in m/s^2.
floataz Accel z-axis data in m/s^2.
Returns
Void.

Variable Documentation

◆ anglesComputed

char anglesComputed
extern

◆ beta

float beta
extern

◆ invSampleFreq

float invSampleFreq
extern

◆ pitch

float pitch
extern

◆ q0

float q0
extern

◆ q1

float q1
extern

◆ q2

float q2
extern

◆ q3

float q3
extern

◆ roll

float roll
extern

◆ yaw

float yaw
extern