![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Final Tree
Dependencies: mbed BMI160 max32630fthr_pitch USBDevice Math
Sensors/Orientation.h@7:b33be863fbb5, 2019-01-28 (annotated)
- Committer:
- bjbance
- Date:
- Mon Jan 28 09:00:47 2019 +0000
- Revision:
- 7:b33be863fbb5
Separate library for sensors
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bjbance | 7:b33be863fbb5 | 1 | #include "mbed.h" |
bjbance | 7:b33be863fbb5 | 2 | #include "bmi160.h" |
bjbance | 7:b33be863fbb5 | 3 | #include "max32630fthr.h" |
bjbance | 7:b33be863fbb5 | 4 | #include "stdlib.h" |
bjbance | 7:b33be863fbb5 | 5 | |
bjbance | 7:b33be863fbb5 | 6 | |
bjbance | 7:b33be863fbb5 | 7 | |
bjbance | 7:b33be863fbb5 | 8 | #include "USBSerial.h" |
bjbance | 7:b33be863fbb5 | 9 | #include "math.h" |
bjbance | 7:b33be863fbb5 | 10 | |
bjbance | 7:b33be863fbb5 | 11 | |
bjbance | 7:b33be863fbb5 | 12 | |
bjbance | 7:b33be863fbb5 | 13 | void dumpImuRegisters(BMI160 &imu); |
bjbance | 7:b33be863fbb5 | 14 | void printRegister(BMI160 &imu, BMI160::Registers reg); |
bjbance | 7:b33be863fbb5 | 15 | void printBlock(BMI160 &imu, BMI160::Registers startReg, BMI160::Registers stopReg); |
bjbance | 7:b33be863fbb5 | 16 | void writeReg(BMI160 &imu, BMI160::Registers reg, uint8_t data); |
bjbance | 7:b33be863fbb5 | 17 | float compFilter(float K, float pitch, float gyroX, float accY, float accZ,float DT); |
bjbance | 7:b33be863fbb5 | 18 | |
bjbance | 7:b33be863fbb5 | 19 | |
bjbance | 7:b33be863fbb5 | 20 | class Orientation{ |
bjbance | 7:b33be863fbb5 | 21 | float pitch, time1, time2; |
bjbance | 7:b33be863fbb5 | 22 | float k; |
bjbance | 7:b33be863fbb5 | 23 | |
bjbance | 7:b33be863fbb5 | 24 | |
bjbance | 7:b33be863fbb5 | 25 | |
bjbance | 7:b33be863fbb5 | 26 | |
bjbance | 7:b33be863fbb5 | 27 | |
bjbance | 7:b33be863fbb5 | 28 | |
bjbance | 7:b33be863fbb5 | 29 | |
bjbance | 7:b33be863fbb5 | 30 | public: |
bjbance | 7:b33be863fbb5 | 31 | void init(); |
bjbance | 7:b33be863fbb5 | 32 | float getPitch(); |
bjbance | 7:b33be863fbb5 | 33 | void updatePitch(); |
bjbance | 7:b33be863fbb5 | 34 | |
bjbance | 7:b33be863fbb5 | 35 | |
bjbance | 7:b33be863fbb5 | 36 | }; |
bjbance | 7:b33be863fbb5 | 37 | |
bjbance | 7:b33be863fbb5 | 38 |