MAV'RIC
Classes | Public Member Functions | Static Public Member Functions | Protected Attributes
AHRS_madgwick Class Reference

#include <ahrs_madgwick.hpp>

Inheritance diagram for AHRS_madgwick:
Inheritance graph
[legend]
Collaboration diagram for AHRS_madgwick:
Collaboration graph
[legend]

List of all members.

Classes

struct  conf_t
 Configuration for ahrs _madgwick. More...

Public Member Functions

 AHRS_madgwick (const Imu &imu, const Airspeed_analog &airspeed, const conf_t &config=default_config())
 Init function.
bool update (void)
 Main update function.
float last_update_s (void) const
 Last update in seconds.
bool is_healthy (void) const
 Indicates which estimate can be trusted.
quat_t attitude (void) const
 Estimated attitude.
std::array< float, 3 > angular_speed (void) const
 Estimated angular velocity.
std::array< float, 3 > linear_acceleration (void) const
 Estimated linear acceleration.

Static Public Member Functions

static conf_t default_config ()
 Default configuration.

Protected Attributes

const Imuimu_
 Reference to IMU sensors.
const Airspeed_analogairspeed_
 Reference to the airspeed sensor.
quat_t attitude_
 Estimated attitude.
std::array< float, 3 > angular_speed_
 Estimated angular speed.
std::array< float, 3 > linear_acc_
 Estimated linear acceleration.
float last_update_s_
 Last update time.
float beta_
 2 * proportional gain (Kp)
float zeta_
 Gyro drift bias gain.
uint32_t acceleration_correction_
 Enable the correction of the parasitic accelerations ?
float correction_speed_
 Airspeed from which the correction should start.

Detailed Description

Disclaimer: this WIP


Constructor & Destructor Documentation

AHRS_madgwick::AHRS_madgwick ( const Imu imu,
const Airspeed_analog airspeed,
const conf_t config = default_config() 
)

Init function.

Parameters:
imuReference to IMU structure
airspeedReference to airspeed sensor
configConfig structure
Returns:
True if success, false if not

Member Function Documentation

std::array< float, 3 > AHRS_madgwick::angular_speed ( void  ) const [virtual]

Estimated angular velocity.

Returns:
3D angular velocity

Implements AHRS.

quat_t AHRS_madgwick::attitude ( void  ) const [virtual]

Estimated attitude.

Returns:
quaternion

Implements AHRS.

bool AHRS_madgwick::is_healthy ( void  ) const [virtual]

Indicates which estimate can be trusted.

Parameters:
typeType of estimate
Returns:
boolean

Implements AHRS.

float AHRS_madgwick::last_update_s ( void  ) const [virtual]

Last update in seconds.

Returns:
time

Implements AHRS.

std::array< float, 3 > AHRS_madgwick::linear_acceleration ( void  ) const [virtual]

Estimated linear acceleration.

Returns:
3D linear acceleration

Implements AHRS.

bool AHRS_madgwick::update ( void  ) [virtual]

Main update function.

Returns:
success

Implements AHRS.

Here is the call graph for this function:


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines