![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Final Tree
Dependencies: mbed BMI160 max32630fthr_pitch USBDevice Math
Sensors/Orientation.h
- Committer:
- bjbance
- Date:
- 2019-01-28
- Revision:
- 7:b33be863fbb5
File content as of revision 7:b33be863fbb5:
#include "mbed.h" #include "bmi160.h" #include "max32630fthr.h" #include "stdlib.h" #include "USBSerial.h" #include "math.h" void dumpImuRegisters(BMI160 &imu); void printRegister(BMI160 &imu, BMI160::Registers reg); void printBlock(BMI160 &imu, BMI160::Registers startReg, BMI160::Registers stopReg); void writeReg(BMI160 &imu, BMI160::Registers reg, uint8_t data); float compFilter(float K, float pitch, float gyroX, float accY, float accZ,float DT); class Orientation{ float pitch, time1, time2; float k; public: void init(); float getPitch(); void updatePitch(); };