FreeIMU Library
Open Hardware Framework for Motion Sensing
 All Data Structures Files Functions Variables Macros
Public Member Functions | Data Fields
FreeIMU Class Reference

#include <FreeIMU.h>

Public Member Functions

 FreeIMU ()
void init ()
void init (bool fastmode)
void init (int acc_addr, int gyro_addr, bool fastmode)
void getRawValues (int *raw_values)
void getValues (float *values)
void getQ (float *q)
void getEuler (float *angles)
void getYawPitchRoll (float *ypr)
void getEulerRad (float *angles)
void getYawPitchRollRad (float *ypr)

Data Fields

ADXL345 acc
HMC58X3 magn
ITG3200 gyro
MS561101BA baro
int * raw_acc
int raw_gyro
int raw_magn

Constructor & Destructor Documentation

FreeIMU::FreeIMU ( )

Member Function Documentation

void FreeIMU::getEuler ( float *  angles)

Returns the Euler angles in degrees defined with the Aerospace sequence. See Sebastian O.H. Madwick report "An efficient orientation filter for inertial and intertial/magnetic sensor arrays" Chapter 2 Quaternion representation

Parameters
anglesthree floats array which will be populated by the Euler angles in degrees
void FreeIMU::getEulerRad ( float *  angles)

Returns the Euler angles in radians defined with the Aerospace sequence. See Sebastian O.H. Madwick report "An efficient orientation filter for inertial and intertial/magnetic sensor arrays" Chapter 2 Quaternion representation

Parameters
anglesthree floats array which will be populated by the Euler angles in radians
void FreeIMU::getQ ( float *  q)

Populates array q with a quaternion representing the IMU orientation with respect to the Earth

Parameters
qthe quaternion to populate using the q = [ ]
void FreeIMU::getRawValues ( int *  raw_values)
void FreeIMU::getValues ( float *  values)
void FreeIMU::getYawPitchRoll ( float *  ypr)

Returns the yaw pitch and roll angles, respectively defined as the angles in degrees between the Earth North and the IMU X axis (yaw), the Earth ground plane and the IMU X axis (pitch) and the Earth ground plane and the IMU Y axis.

Note
This is not an Euler representation: the rotations aren't consecutive rotations but only angles from Earth and the IMU. For Euler representation Yaw, Pitch and Roll see FreeIMU::getEuler
Parameters
yprthree floats array which will be populated by Yaw, Pitch and Roll angles in degrees
void FreeIMU::getYawPitchRollRad ( float *  ypr)

Returns the yaw pitch and roll angles, respectively defined as the angles in radians between the Earth North and the IMU X axis (yaw), the Earth ground plane and the IMU X axis (pitch) and the Earth ground plane and the IMU Y axis.

Note
This is not an Euler representation: the rotations aren't consecutive rotations but only angles from Earth and the IMU. For Euler representation Yaw, Pitch and Roll see FreeIMU::getEuler
Parameters
yprthree floats array which will be populated by Yaw, Pitch and Roll angles in radians
void FreeIMU::init ( )
void FreeIMU::init ( bool  fastmode)
void FreeIMU::init ( int  acc_addr,
int  gyro_addr,
bool  fastmode 
)

Field Documentation

ADXL345 FreeIMU::acc
MS561101BA FreeIMU::baro
ITG3200 FreeIMU::gyro
HMC58X3 FreeIMU::magn
int* FreeIMU::raw_acc
int FreeIMU::raw_gyro
int FreeIMU::raw_magn

The documentation for this class was generated from the following files: