Larus glider flight sensor system 3.9.2024
Software-In-The-Loop test and validation system
Loading...
Searching...
No Matches
Kalman_V_A_Aoff_observer.cpp
Go to the documentation of this file.
1/***********************************************************************/
26
27ROM float Kalman_V_A_Aoff_observer_t::Gain[N][L]=
28 {
29 0.045525746461218f, 0.005179336297606f,
30 0.102816402740272f, 0.906791781469036f,
31 -0.097637066442666f, 0.001591461803718f
32 };
33
34void Kalman_V_A_Aoff_observer_t::update( const float velocity, const float acceleration)
35{
36 // predict x[] by propagating it through the system model
37 float x_est_0 = x[0] + Ta * x[1];
38 float x_est_1 = x[1];
39 float x_est_2 = x[2];
40
41 float innovation_v = velocity - x_est_0;
42 float innovation_a = acceleration - x_est_1 - x_est_2;
43
44 // x[] correction
45 x[0] = x_est_0 + Gain[0][0] * innovation_v + Gain[0][1] * innovation_a;
46 x[1] = x_est_1 + Gain[1][0] * innovation_v + Gain[1][1] * innovation_a;
47 x[2] = x_est_2 + Gain[2][0] * innovation_v + Gain[2][1] * innovation_a;
48}
void update(const float velocity, const float acceleration)
mathematical vector of arbitrary type and size
Definition vector.h:40
#define ROM