AHRS
Dependencies: Eigen
matrix.h@4:3c21fb0c9e84, 2019-05-03 (annotated)
- Committer:
- altb2
- Date:
- Fri May 03 13:46:40 2019 +0000
- Revision:
- 4:3c21fb0c9e84
mit EKF, noch nicht lauffaehig
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
altb2 | 4:3c21fb0c9e84 | 1 | |
altb2 | 4:3c21fb0c9e84 | 2 | #ifndef MYMATRIX_H_ |
altb2 | 4:3c21fb0c9e84 | 3 | #define MYMATRIX_H_ |
altb2 | 4:3c21fb0c9e84 | 4 | |
altb2 | 4:3c21fb0c9e84 | 5 | #include <mbed.h> |
altb2 | 4:3c21fb0c9e84 | 6 | |
altb2 | 4:3c21fb0c9e84 | 7 | class matrix |
altb2 | 4:3c21fb0c9e84 | 8 | { |
altb2 | 4:3c21fb0c9e84 | 9 | public: |
altb2 | 4:3c21fb0c9e84 | 10 | matrix(){}; |
altb2 | 4:3c21fb0c9e84 | 11 | matrix(uint8_t,uint8_t,float); |
altb2 | 4:3c21fb0c9e84 | 12 | matrix(uint8_t); //define n x n Unity Matrix |
altb2 | 4:3c21fb0c9e84 | 13 | matrix(uint8_t,float); //define n x n diagonal matrix with equal entries (e*I) |
altb2 | 4:3c21fb0c9e84 | 14 | matrix operator*(const matrix& B); |
altb2 | 4:3c21fb0c9e84 | 15 | matrix operator *=(const matrix& B); // calculat A'*B |
altb2 | 4:3c21fb0c9e84 | 16 | matrix operator /=(const matrix& B); |
altb2 | 4:3c21fb0c9e84 | 17 | matrix operator +(const matrix& B); |
altb2 | 4:3c21fb0c9e84 | 18 | void operator +=(const matrix& B); |
altb2 | 4:3c21fb0c9e84 | 19 | matrix operator -(const matrix& B); |
altb2 | 4:3c21fb0c9e84 | 20 | void scale(float); |
altb2 | 4:3c21fb0c9e84 | 21 | matrix inv_2x2(void); |
altb2 | 4:3c21fb0c9e84 | 22 | void mcopy(matrix *); |
altb2 | 4:3c21fb0c9e84 | 23 | void printout(void); |
altb2 | 4:3c21fb0c9e84 | 24 | void put_entry(uint8_t,uint8_t,float); |
altb2 | 4:3c21fb0c9e84 | 25 | void fill_row(uint8_t i,float *e); |
altb2 | 4:3c21fb0c9e84 | 26 | void fill_col(uint8_t i,float *e); |
altb2 | 4:3c21fb0c9e84 | 27 | uint8_t getI(void); |
altb2 | 4:3c21fb0c9e84 | 28 | uint8_t getJ(void); |
altb2 | 4:3c21fb0c9e84 | 29 | virtual ~matrix(); |
altb2 | 4:3c21fb0c9e84 | 30 | float** a; |
altb2 | 4:3c21fb0c9e84 | 31 | |
altb2 | 4:3c21fb0c9e84 | 32 | |
altb2 | 4:3c21fb0c9e84 | 33 | private: |
altb2 | 4:3c21fb0c9e84 | 34 | uint8_t I,J; |
altb2 | 4:3c21fb0c9e84 | 35 | }; |
altb2 | 4:3c21fb0c9e84 | 36 | |
altb2 | 4:3c21fb0c9e84 | 37 | #endif |