struct kalman_state
{
int q; //process noise covariance
int r; //measurement noise covariance
int x; //value
int p; //estimation error covariance
int k; //kalman gain
} ;
kalman_state
kalman_init(double q, double r, double p, double intial_value)
{
kalman_state result;
result.q = q;
result.r = r;
result.p = p;
result.x = intial_value;
return result;
}
void setup()
{
}
void loop()
{
}
I have this code in arduino, while it reports error by saying that "ACC-kalman_filter.ino:2: error: 'kalman_state' does not name a type
'kalman_state' does not name a type"
May I know how to fix this
tks a lot