Marco Oehler / Mbed OS Lab7
Embed: (wiki syntax)

« Back to documentation index

TiltAngle Class Reference

TiltAngle Class Reference

This class determines the IMU's tilt angle around the x-axis. More...

#include <TiltAngle.h>

Public Member Functions

 TiltAngle (IMU &imu)
 Creates a TiltAngle object.
virtual ~TiltAngle ()
 Deletes the TiltAngle object.
float readTiltAngleA ()
 Reads the tilt angle around the x-axis, calculated from accelerometer readings.
float readTiltAngleG ()
 Reads the tilt angle around the x-axis, integrated from gyro readings.
float readTiltAngleK ()
 Reads the tilt angle around the x-axis, obtained with a Kalman filter.
float readTiltAngleC ()
 Reads the tilt angle around the x-axis, obtained with a complementary filter.

Detailed Description

This class determines the IMU's tilt angle around the x-axis.

Definition at line 18 of file TiltAngle.h.


Constructor & Destructor Documentation

TiltAngle ( IMU imu )

Creates a TiltAngle object.

Parameters:
imua reference to the IMU to use.

Definition at line 26 of file TiltAngle.cpp.

~TiltAngle (  ) [virtual]

Deletes the TiltAngle object.

Definition at line 59 of file TiltAngle.cpp.


Member Function Documentation

float readTiltAngleA (  )

Reads the tilt angle around the x-axis, calculated from accelerometer readings.

Returns:
the tilt angle, given in [rad].

Definition at line 68 of file TiltAngle.cpp.

float readTiltAngleC (  )

Reads the tilt angle around the x-axis, obtained with a complementary filter.

Returns:
the tilt angle, given in [rad].

Definition at line 95 of file TiltAngle.cpp.

float readTiltAngleG (  )

Reads the tilt angle around the x-axis, integrated from gyro readings.

Returns:
the tilt angle, given in [rad].

Definition at line 77 of file TiltAngle.cpp.

float readTiltAngleK (  )

Reads the tilt angle around the x-axis, obtained with a Kalman filter.

Returns:
the tilt angle, given in [rad].

Definition at line 86 of file TiltAngle.cpp.