#ifndef MPU6050H #define MPU6050H template struct xyzvector { T x; T y; T z; }; class _mpu { xyzvector gyro; xyzvector acc_raw; xyzvector acc; long acc_total_vector; int temperature; xyzvector gyro_cal; long loop_timer; float angle_pitch; float angle_roll; bool set_gyro_angles; float angle_roll_acc; float angle_pitch_acc; float yaw_rate; const int calibrationPasses = 500; void readRaw( void ); public: _mpu(){} void processData( void ); void run( void ); void begin( void ); float getangle_pitch( void ) { return angle_pitch; } float getyaw_rate( void ) { return yaw_rate; } void print( void ); }; #endif //MPU6050H