1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#include "ts.h"
bool ts_test_kalman_filter( void )
{
fp_t const x0[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
fp_t const e0[] = {
1.0,
1.5024875621890548,
2.0099009900990099,
2.5245821283270429,
3.0487331327055625,
3.5843788460830162,
4.1333360364582399,
4.6971903124447723,
5.2772810678708257,
5.8746943630334316
};
fp_t const * const x[] = { x0 };
fp_t const * const e[] = { e0 };
struct { fp_t Q; fp_t R; } c = { 0.01, 1.0 };
return ts_test(ts_kalman_filter, ts_kalman_filter_offset, x, e, 10, (ts_constant_t *)&c, &ts_kalman_filter_p);
}
|