AHRS

Dependencies:   Eigen

Dependents:   IndNav_QK3_T265

Committer:
pmic
Date:
Mon Jan 27 10:54:13 2020 +0000
Revision:
30:9b0cd3caf0ec
Parent:
4:3c21fb0c9e84
Correct magnetometer.

Who changed what in which revision?

UserRevisionLine numberNew 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