![]() |
ME507 Airheads Project v1.1.0
Flight Stabilization for Glider
|
Class to interface and get pitch, yaw, roll data from the LSM6DSOX accelerometer and gyroscope. More...
#include <IMU.h>
Public Member Functions | |
| LSM6DSOX (void) | |
| Header function for LSM6DSOX to initialize object More... | |
| void | read_data (float &GYRO_X, float &GYRO_Y, float &GYRO_Z, float &ACCEL_X, float &ACCEL_Y, float &ACCEL_Z) |
| Header function to read gyro and accelerometer data. More... | |
| void | get_angle (float time, float &pitch, float &yaw, float &roll) |
| Header function to get pitch, yaw, and roll data. More... | |
| void | zero (void) |
| Header function to zero yaw. More... | |
Class to interface and get pitch, yaw, roll data from the LSM6DSOX accelerometer and gyroscope.
| LSM6DSOX::LSM6DSOX | ( | void | ) |
| void LSM6DSOX::get_angle | ( | float | new_time, |
| float & | pitch_in, | ||
| float & | yaw_in, | ||
| float & | roll_in | ||
| ) |
Header function to get pitch, yaw, and roll data.
Calculates the pitch, yaw, and roll from sensor data.
| new_time | Time at which the function is called using time.h |
| pitch_in | Reference parameter to pitch |
| yaw_in | Reference parameter to yaw |
| roll_in | Reference parameter for roll_in |
| void LSM6DSOX::read_data | ( | float & | GYRO_X, |
| float & | GYRO_Y, | ||
| float & | GYRO_Z, | ||
| float & | ACCEL_X, | ||
| float & | ACCEL_Y, | ||
| float & | ACCEL_Z | ||
| ) |
Header function to read gyro and accelerometer data.
Reads the data for gyroscope and accelerometer.
| GYRO_X | Reference parameter for Gyro X reading in rad/s |
| GYRO_Y | Reference parameter for Gyro Y reading in rad/s |
| GYRO_Z | Reference parameter for Gyro Z reading in rad/s |
| ACCEL_X | Reference parameter for Accelerometer X reading in m/s^2 |
| ACCEL_Y | Reference parameter for Accelerometer Y reading in m/s^2 |
| ACCEL_Z | Reference parameter for Accelerometer Z reading in m/s^2 |
| void LSM6DSOX::zero | ( | void | ) |
Header function to zero yaw.
Sets current yaw angle to be the offset.