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 qCU 15 |
---|
15 | #define qD 13 |
---|
16 | #define qCh 14 |
---|
17 | |
---|
18 | #define int16 short |
---|
19 | #define int32 int |
---|
20 | |
---|
21 | /* Matrix multiply Full matrix by upper diagonal matrix with unit diagonal; */ |
---|
22 | extern void mmultAU(int16 *m1, int16 *up, int16 *result, unsigned int16 rows, unsigned int16 columns); |
---|
23 | |
---|
24 | /* Matrix multiply Full matrix by upper diagonal matrix with unit diagonal; */ |
---|
25 | extern void mmultCU(int16 *m1, int16 *up, int16 *result, unsigned int16 rows, unsigned int16 columns); |
---|
26 | |
---|
27 | /* Matrix multiply Full matrix by upper diagonal matrix; */ |
---|
28 | extern void mmultACh(int16 *m1, int16 *up, int16 *result, unsigned int16 rows, unsigned int16 columns); |
---|
29 | |
---|
30 | /* perform Thorton update of UD matrix using PSI*U, Q, and temporaries G, Dold, for size dimx*/ |
---|
31 | extern void thorton(int16 *U, int16 *D, int16 *PSIU, int16 *Q, int16 *G, int16 *Dold, unsigned int16 dimx); |
---|
32 | |
---|
33 | /* perform Bierman update of UD matrix using difz, R and xp, for size dimx*/ |
---|
34 | extern void bierman(int16 *difz, int16 *xp, int16 *U, int16 *D, int16 *R, unsigned int16 dimy, unsigned int16 dimx ); |
---|
35 | |
---|
36 | /* perform Thorton update of UD matrix using PSI*U, Q, and temporaries G, Dold, for size dimx*/ |
---|
37 | extern void thorton_fast(int16 *U, int16 *D, int16 *PSIU, int16 *Q, int16 *G, int16 *Dold, unsigned int16 dimx); |
---|
38 | |
---|
39 | /* perform Bierman update of UD matrix using difz, R and xp, for size dimx*/ |
---|
40 | extern void bierman_fast(int16 *difz, int16 *xp, int16 *U, int16 *D, int16 *R, unsigned int16 dimy, unsigned int16 dimx ); |
---|
41 | |
---|
42 | /* perform Bierman update of UD matrix using difz, R and xp, for size dimx*/ |
---|
43 | extern void bierman_fastC(int16 *difz, int16 *xp, int16 *U, int16 *D, int16 *C, int16 *R, unsigned int16 dimy, unsigned int16 dimx ); |
---|
44 | |
---|
45 | /* perform Householder update of Ch matrix using PSI*Ch , Q, */ |
---|
46 | extern void householder(int16 *Ch /*= int16 *PSICh*/, int16 *Q, unsigned int16 dimx); |
---|
47 | |
---|
48 | /* perform Givens update of Ch matrix using PSI*Ch , Q, */ |
---|
49 | extern void givens(int16 *Ch /*= int16 *PSICh*/, int16 *Q, unsigned int16 dimx); |
---|
50 | |
---|
51 | /* perform Carlson update of Ch matrix using difz, R and xp, for size dimx*/ |
---|
52 | extern void carlson(int16 *difz, int16 *xp, int16 *Ch, int16 *R, unsigned int16 dimy, unsigned int16 dimx ); |
---|
53 | |
---|
54 | /* perform Givens update of Ch matrix using PSI*Ch , Q, */ |
---|
55 | extern void givens_fast(int16 *Ch /*= int16 *PSICh*/, int16 *Q, unsigned int16 dimx); |
---|
56 | |
---|
57 | /* perform Carlson update of Ch matrix using difz, R and xp, for size dimx*/ |
---|
58 | extern void carlson_fast(int16 *difz, int16 *xp, int16 *Ch, int16 *R, unsigned int16 dimy, unsigned int16 dimx ); |
---|
59 | |
---|
60 | /* perform Carlson update of Ch matrix using difz, R and xp, for size dimx*/ |
---|
61 | extern void carlson_fastC(int16 *difz, int16 *xp, int16 *Ch, int16 *C, int16 *R, unsigned int16 dimy, unsigned int16 dimx ); |
---|