1 | /************************************ |
---|
2 | Extended Kalman Filter |
---|
3 | Matrix operations |
---|
4 | |
---|
5 | V. Smidl |
---|
6 | |
---|
7 | Rev. 30.8.2010 |
---|
8 | |
---|
9 | 30.8.2010 Prvni verze |
---|
10 | |
---|
11 | *************************************/ |
---|
12 | |
---|
13 | #define qAU 14 |
---|
14 | #define qD 14 |
---|
15 | #define qCh 14 |
---|
16 | |
---|
17 | #define int16 int |
---|
18 | #define int32 long |
---|
19 | |
---|
20 | /* Matrix multiply Full matrix by upper diagonal matrix with unit diagonal; */ |
---|
21 | extern void mmultAU(int16 *m1, int16 *up, int16 *result, unsigned int16 rows, unsigned int16 columns); |
---|
22 | |
---|
23 | /* Matrix multiply Full matrix by upper diagonal matrix; */ |
---|
24 | extern void mmultACh(int16 *m1, int16 *up, int16 *result, unsigned int16 rows, unsigned int16 columns); |
---|
25 | |
---|
26 | /* perform Thorton update of UD matrix using PSI*U, Q, and temporaries G, Dold, for size dimx*/ |
---|
27 | extern void thorton(int16 *U, int16 *D, int16 *PSIU, int16 *Q, int16 *G, int16 *Dold, unsigned int16 dimx); |
---|
28 | |
---|
29 | /* perform Bierman update of UD matrix using difz, R and xp, for size dimx*/ |
---|
30 | extern void bierman(int16 *difz, int16 *xp, int16 *U, int16 *D, int16 *R, unsigned int16 dimy, unsigned int16 dimx ); |
---|
31 | |
---|
32 | /* perform Thorton update of UD matrix using PSI*U, Q, and temporaries G, Dold, for size dimx*/ |
---|
33 | extern void thorton_fast(int16 *U, int16 *D, int16 *PSIU, int16 *Q, int16 *G, int16 *Dold, unsigned int16 dimx); |
---|
34 | |
---|
35 | /* perform Bierman update of UD matrix using difz, R and xp, for size dimx*/ |
---|
36 | extern void bierman_fast(int16 *difz, int16 *xp, int16 *U, int16 *D, int16 *R, unsigned int16 dimy, unsigned int16 dimx ); |
---|
37 | |
---|
38 | /* perform Householder update of Ch matrix using PSI*Ch , Q, */ |
---|
39 | extern void householder(int16 *Ch /*= int16 *PSICh*/, int16 *Q, unsigned int16 dimx); |
---|
40 | |
---|
41 | /* perform Givens update of Ch matrix using PSI*Ch , Q, */ |
---|
42 | extern void givens(int16 *Ch /*= int16 *PSICh*/, int16 *Q, unsigned int16 dimx); |
---|
43 | |
---|
44 | /* perform Carlson update of Ch matrix using difz, R and xp, for size dimx*/ |
---|
45 | extern void carlson(int16 *difz, int16 *xp, int16 *Ch, int16 *R, unsigned int16 dimy, unsigned int16 dimx ); |
---|