Autodrone
Multi-Domain Vehicle
madgwick.c File Reference

This file gives the function to create our RPY values. Source for this function exists at: https://github.com/arduino-libraries/MadgwickAHRS. More...

#include "board.h"

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. Source for this function exists at: https://github.com/arduino-libraries/MadgwickAHRS.

Author
Jeremy Wolfe
Date
03 MAR 2022

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

◆ beta

float beta

◆ invSampleFreq

float invSampleFreq

◆ pitch

float pitch

◆ q0

float q0

◆ q1

float q1

◆ q2

float q2

◆ q3

float q3

◆ roll

float roll

◆ yaw

float yaw