Larus glider flight sensor system
3.9.2024
Software-In-The-Loop test and validation system
Loading...
Searching...
No Matches
Kalman_V_A_observer.cpp
Go to the documentation of this file.
1
/***********************************************************************/
25
#include <
Kalman_V_A_observer.h
>
26
27
ROM
float
Kalman_V_A_observer_t::Gain[N][L]=
28
{
29
0.002460426151335f, 0.008147862943514f,
30
0.000527203519767f, 0.011290372131367f,
31
};
32
33
float
Kalman_V_A_observer_t::update
(
const
float
velocity,
const
float
acceleration)
34
{
35
// predict x[] by propagating it through the system model
36
float
x_est_0
= x[0] + Ta * x[1];
37
float
x_est_1
= x[1];
38
39
float
innovation_v
= velocity -
x_est_0
;
40
float
innovation_a
= acceleration -
x_est_1
;
41
42
// x[] correction
43
x[0] =
x_est_0
+ Gain[0][0] *
innovation_v
+ Gain[0][1] *
innovation_a
;
44
x[1] =
x_est_1
+ Gain[1][0] *
innovation_v
+ Gain[1][1] *
innovation_a
;
45
46
return
x[1];
// return velocity
47
}
Kalman_V_A_observer.h
Kalman_V_A_observer_t::update
float update(const float velocity, const float acceleration)
Definition
Kalman_V_A_observer.cpp:33
vector
mathematical vector of arbitrary type and size
Definition
vector.h:40
ROM
#define ROM
Definition
embedded_memory.h:30
lib
NAV_Algorithms
Kalman_V_A_observer.cpp
Generated by
1.9.8