|
MAV'RIC
|
Driver for sensor LSM330DLC. More...
#include <lsm330dlc.hpp>


Public Member Functions | |
| Lsm330dlc (I2c &i2c) | |
| Constructor. | |
| bool | init (void) |
| Initialise the sensor. | |
| bool | update_acc (void) |
| Main update function. | |
| bool | update_gyr (void) |
| const float & | last_update_us (void) const |
| Get last update time in microseconds. | |
| const std::array< float, 3 > & | gyro (void) const |
| Get X, Y and Z components of angular velocity. | |
| const float & | gyro_X (void) const |
| Get X component of angular velocity. | |
| const float & | gyro_Y (void) const |
| Get Y component of angular velocity. | |
| const float & | gyro_Z (void) const |
| Get Z component of angular velocity. | |
| const std::array< float, 3 > & | acc (void) const |
| Get X, Y and Z components of acceleration. | |
| const float & | acc_X (void) const |
| Get X component of acceleration. | |
| const float & | acc_Y (void) const |
| Get Y component of acceleration. | |
| const float & | acc_Z (void) const |
| Get Z component of acceleration. | |
| const float & | temperature (void) const |
| Get sensor temperature. | |
Driver for sensor LSM330DLC.
This sensor is at the same time a accelerometer and a gyroscope The inherited method Accelerometer::update is implemented as Lsm330dlc::update_acc The inherited method Gyroscope::update is implemented as Lsm330dlc::update_gyr
| Lsm330dlc::Lsm330dlc | ( | I2c & | i2c | ) |
Constructor.
| i2c | Reference to I2C device |
| const std::array< float, 3 > & Lsm330dlc::acc | ( | void | ) | const [virtual] |
Get X, Y and Z components of acceleration.
This is raw data, so X, Y and Z components are biased, not scaled, and given in the sensor frame (not in the UAV frame). Use an Imu object to handle bias removal, scaling and axis rotations
Implements Accelerometer.
| const float & Lsm330dlc::acc_X | ( | void | ) | const [virtual] |
Get X component of acceleration.
This is raw data, so X, Y and Z components are biased, not scaled, and given in the sensor frame (not in the UAV frame). Use an Imu object to handle bias removal, scaling and axis rotations
Implements Accelerometer.
| const float & Lsm330dlc::acc_Y | ( | void | ) | const [virtual] |
Get Y component of acceleration.
This is raw data, so X, Y and Z components are biased, not scaled, and given in the sensor frame (not in the UAV frame). Use an Imu object to handle bias removal, scaling and axis rotations
Implements Accelerometer.
| const float & Lsm330dlc::acc_Z | ( | void | ) | const [virtual] |
Get Z component of acceleration.
This is raw data, so X, Y and Z components are biased, not scaled, and given in the sensor frame (not in the UAV frame). Use an Imu object to handle bias removal, scaling and axis rotations
Implements Accelerometer.
| const std::array< float, 3 > & Lsm330dlc::gyro | ( | void | ) | const [virtual] |
| const float & Lsm330dlc::gyro_X | ( | void | ) | const [virtual] |
| const float & Lsm330dlc::gyro_Y | ( | void | ) | const [virtual] |
| const float & Lsm330dlc::gyro_Z | ( | void | ) | const [virtual] |
| bool Lsm330dlc::init | ( | void | ) | [virtual] |
Initialise the sensor.
Sends configuration via I2C, the I2C peripheral must be activated before this method is called
< CTRL_REG_G_1
< CTRL_REG_G_2
< CTRL_REG_G_3
< CTRL_REG_G_4
< CTRL_REG_G_5
< CTRL_REG_A_1
< CTRL_REG_A_2
< CTRL_REG_A_3
< CTRL_REG_A_4
Implements Accelerometer.


| const float & Lsm330dlc::last_update_us | ( | void | ) | const [virtual] |
| const float & Lsm330dlc::temperature | ( | void | ) | const [virtual] |
| bool Lsm330dlc::update_acc | ( | void | ) | [virtual] |
Main update function.
Get new data from the sensor
Implements Lsm330dlc_acc.

1.7.6.1