N4 Flight Software N4
Flight software used for the N4 flight computers
Loading...
Searching...
No Matches
MPU6050 Class Reference

Public Member Functions

 MPU6050 (uint8_t address, uint32_t accel_fs_range, uint32_t gyro_fs_range)
 
void init ()
 
float readXAcceleration ()
 
float readYAcceleration ()
 
float readZAcceleration ()
 
float readXAngularVelocity ()
 
float readYAngularVelocity ()
 
float readZAngularVelocity ()
 
float readTemperature ()
 
void filterImu ()
 
float getRoll ()
 
float getPitch ()
 

Public Attributes

int16_t acc_x
 
int16_t acc_y
 
int16_t acc_z
 
float acc_x_real
 
float acc_y_real
 
float acc_z_real
 
int16_t ang_vel_x
 
int16_t ang_vel_y
 
int16_t ang_vel_z
 
float ang_vel_x_real
 
float ang_vel_y_real
 
float ang_vel_z_real
 
int16_t temp
 
float temp_real
 
float pitch_angle
 
float roll_angle
 
float acc_x_ms
 
float acc_y_ms
 
float acc_z_ms
 

Member Function Documentation

◆ filterImu()

void MPU6050::filterImu ( )

perform sensor fusion perfom complementary filter to remove accelerometer high frequrecny noise remove low frequency noise from gyroscope and fuse the sensors

◆ getPitch()

float MPU6050::getPitch ( )

compute the roll angle angle along the longitudinal axis return pitch angle in degrees

◆ getRoll()

float MPU6050::getRoll ( )

compute the pitch angle angle along the transverse axis return roll angle in degrees

◆ readXAcceleration()

float MPU6050::readXAcceleration ( )

Read X axiS acceleration

◆ readYAcceleration()

float MPU6050::readYAcceleration ( )

Read Y acceleration

◆ readZAcceleration()

float MPU6050::readZAcceleration ( )

Read Z acceleration


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