And then find the second order online complementary code, didn't see, can you explain the popular point?
Float K2=0.2;//the weight value of accelerometer
Float x1, x2, y1.//computing intermediate variable
Float Angle;//filter output Angle
Void Erjielvbo (float angle_m, float gyro_m)
{
X1=(angle_m - Angle) * (1 - K2) * (1 - K2);
Y1=y1 + x1 x dt;
X2=y1 + 2 * (1 - K2) * (angle_m - angle2) + gyro_m;
Angle Angle + x2=* dt;
}
Angle_m: acceleration and the Angle of
Gyro_m: angular velocity
Dt: integration time
Kalman filtering is too complex, not to consider first,
CodePudding user response:
https://blog.csdn.net/seek97/article/details/81294097? Utm_source=blogkpcl6Look at this article
CodePudding user response: