一阶互补滤波,二阶互补滤波,卡尔曼滤波

2023-05-16

一阶互补


// a=tau / (tau + loop time)  

// newAngle = angle measured with atan2 using the accelerometer  

//加速度传感器输出值  

// newRate = angle measured using the gyro  

// looptime = loop time in millis()  

   

float tau=0.075;  

float a=0.0;  

float Complementary(float newAngle, float newRate,int looptime)   

{  

float dtC = float(looptime)/1000.0;  

a=tau/(tau+dtC);  

//以下代码更改成白色,下载后恢复成其他颜色即可看到  

x_angleC= a* (x_angleC + newRate * dtC) + (1-a) * (newAngle);  

return x_angleC;  

}

 

二阶互补


// newAngle = angle measured with atan2 using the accelerometer  

// newRate = angle measured using the gyro  

// looptime = loop time in millis()  

float Complementary2(float newAngle, float newRate,int looptime)   

{  

float k=10;  

float dtc2=float(looptime)/1000.0;  

//以下代码更改成白色,下载后恢复成其他颜色即可看到  

x1 = (newAngle -   x_angle2C)*k*k;  

y1 = dtc2*x1 + y1;  

z1= y1 + (newAngle -   x_angle2C)*2*k + newRate;  

x_angle2C = dtc2*z1 + x_angle2C;  

return x_angle2C;  

} Here too we just have to setthe k and magically we get the angle.

卡尔曼滤波


// KasBot V1 - Kalman filter module  

   

float Q_angle  =  0.01; //0.001  

float Q_gyro   =  0.0003;  //0.003  

float R_angle  =  0.01;  //0.03  

   

float x_bias = 0;  

float P_00 = 0, P_01 = 0, P_10 = 0, P_11 = 0;  

float  y, S;  

float K_0, K_1;  

   

// newAngle = angle measured with atan2 using the accelerometer  

// newRate = angle measured using the gyro  

// looptime = loop time in millis()  

   

float kalmanCalculate(float newAngle, float newRate,int looptime)  

{  

float dt = float(looptime)/1000;  

x_angle += dt * (newRate - x_bias);  

//以下代码更改成白色,下载后恢复成其他颜色即可看到  

P_00 +=  - dt * (P_10 + P_01) + Q_angle * dt;  

P_01 +=  - dt * P_11;  

P_10 +=  - dt * P_11;  

P_11 +=  + Q_gyro * dt;  

   

y = newAngle - x_angle;  

S = P_00 + R_angle;  

K_0 = P_00 / S;  

K_1 = P_10 / S;  

   

x_angle +=  K_0 * y;  

x_bias  +=  K_1 * y;  

P_00 -= K_0 * P_00;  

P_01 -= K_0 * P_01;  

P_10 -= K_1 * P_00;  

P_11 -= K_1 * P_01;  

   

return x_angle;  

} To get the answer, you have toset 3 parameters: Q_angle, R_angle,R_gyro.

 

 

详细卡尔曼滤波

/* -*- indent-tabs-mode:T;c-basic-offset:8; tab-width:8; -*- vi: set ts=8:

 *$Id: tilt.c,v 1.1 2003/07/09 18:23:29 john Exp $

 *

 * 1dimensional tilt sensor using a dual axis accelerometer

 *and single axis angular rate gyro.  Thetwo sensors are fused

 *via a two state Kalman filter, with one state being the angle

 *and the other state being the gyro bias.

 *

 *Gyro bias is automatically tracked by the filter.  This seems

 *like magic.

 *

 *Please note that there are lots of comments in the functions and

 * inblocks before the functions.  Kalmanfiltering is an already complex

 *subject, made even more so by extensive hand optimizations to the C code

 *that implements the filter.  I've triedto make an effort of explaining

 *the optimizations, but feel free to send mail to the mailing list,

 *autopilot-devel@lists.sf.net, with questions about this code.

 *

 *

 *(c) 2003 Trammell Hudson <hudson@rotomotion.com>

 *

 *************

 *

 *  Thisfile is part of the autopilot onboard code package.

 * 

 * Autopilot is free software; you can redistribute it and/or modify

 *  itunder the terms of the GNU General Public License as published by

 *  theFree Software Foundation; either version 2 of the License, or

 *  (atyour option) any later version.

 * 

 * Autopilot is distributed in the hope that it will be useful,

 *  butWITHOUT ANY WARRANTY; without even the implied warranty of

 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

 *  GNUGeneral Public License for more details.

 * 

 *  Youshould have received a copy of the GNU General Public License

 *  alongwith Autopilot; if not, write to the Free Software

 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA

 *

 */

#include <math.h>

 

 

/*

 *Our update rate.  This is how often ourstate is updated with

 *gyro rate measurements.  For now, we doit every time an

 * 8bit counter running at CLK/1024 expires. You will have to

 *change this value if you update at a different rate.

 */

static const float     dt    = ( 1024.0 * 256.0 )/ 8000000.0;

 

 

/*

 *Our covariance matrix.  This is updatedat every time step to

 *determine how well the sensors are tracking the actual state.

 */

static float             P[2][2] = {

       {1, 0 },

       {0, 1 },

};

 

 

/*

 *Our two states, the angle and the gyro bias. As a byproduct of computing

 *the angle, we also have an unbiased angular rate available.   These are

 *read-only to the user of the module.

 */

float               angle;

float               q_bias;

float               rate;

 

 

/*

 * Rrepresents the measurement covariance noise. In this case,

 * itis a 1x1 matrix that says that we expect 0.3 rad jitter

 *from the accelerometer.

 */

static const float     R_angle   = 0.3;

 

 

/*

 * Qis a 2x2 matrix that represents the process covariance noise.

 * Inthis case, it indicates how much we trust the acceleromter

 *relative to the gyros.

 */

static const float     Q_angle  = 0.001;

static const float     Q_gyro   = 0.003;

 

 

/*

 *state_update is called every dt with a biased gyro measurement

 * bythe user of the module.  It updates thecurrent angle and

 *rate estimate.

 *

 *The pitch gyro measurement should be scaled into real units, but

 *does not need any bias removal.  Thefilter will track the bias.

 *

 *Our state vector is:

 *

 *    X = [ angle, gyro_bias ]

 *

 * Itruns the state estimation forward via the state functions:

 *

 *    Xdot = [ angle_dot, gyro_bias_dot ]

 *

 *    angle_dot       =gyro - gyro_bias

 *    gyro_bias_dot = 0

 *

 *And updates the covariance matrix via the function:

 *

 *    Pdot = A*P + P*A' + Q

 *

 * Ais the Jacobian of Xdot with respect to the states:

 *

 *    A = [ d(angle_dot)/d(angle)     d(angle_dot)/d(gyro_bias) ]

 *        [d(gyro_bias_dot)/d(angle) d(gyro_bias_dot)/d(gyro_bias) ]

 *

 *      = [0 -1 ]

 *        [0  0 ]

 *

 *Due to the small CPU available on the microcontroller, we've

 *hand optimized the C code to only compute the terms that are

 *explicitly non-zero, as well as expanded out the matrix math

 * tobe done in as few steps as possible. This does make it harder

 * toread, debug and extend, but also allows us to do this with

 *very little CPU time.

 */

void

state_update(   const float             q_m /* Pitch gyro measurement */)

{

       /*Unbias our gyro */

       constfloat             q = q_m - q_bias;

 

       /*

        * Compute the derivative of the covariancematrix

        *

        *    Pdot= A*P + P*A' + Q

        *

        * We've hand computed the expansion of A = [ 0-1, 0 0 ] multiplied

        * by P and P multiplied by A' = [ 0 0, -1, 0].  This is then added

        * to the diagonal elements of Q, which areQ_angle and Q_gyro.

        */

       constfloat             Pdot[2 * 2] = {

              Q_angle- P[0][1] - P[1][0],  /* 0,0 */

                      - P[1][1],              /* 0,1 */

                      -P[1][1],              /* 1,0 */

              Q_gyro                        /* 1,1 */

       };

 

       /*Store our unbias gyro estimate */

       rate= q;

 

       /*

        * Update our angle estimate

        * angle += angle_dot * dt

        *      += (gyro - gyro_bias) * dt

        *      += q * dt

        */

       angle+= q * dt;

 

       /*Update the covariance matrix */

       P[0][0]+= Pdot[0] * dt;

       P[0][1]+= Pdot[1] * dt;

       P[1][0]+= Pdot[2] * dt;

       P[1][1]+= Pdot[3] * dt;

}

 

 

/*

 *kalman_update is called by a user of the module when a new

 *accelerometer measurement is available. ax_m and az_m do not

 *need to be scaled into actual units, but must be zeroed and have

 *the same scale.

 *

 *This does not need to be called every time step, but can be if

 *the accelerometer data are available at the same rate as the

 *rate gyro measurement.

 *

 *For a two-axis accelerometer mounted perpendicular to the rotation

 *axis, we can compute the angle for the full 360 degree rotation

 *with no linearization errors by using the arctangent of the two

 *readings.

 *

 * Ascommented in state_update, the math here is simplified to

 *make it possible to execute on a small microcontroller with no

 *floating point unit.  It will be hard toread the actual code and

 *see what is happening, which is why there is this extensive

 *comment block.

 *

 *The C matrix is a 1x2 (measurements x states) matrix that

 * isthe Jacobian matrix of the measurement value with respect

 * tothe states.  In this case, C is:

 *

 *    C = [ d(angle_m)/d(angle)  d(angle_m)/d(gyro_bias) ]

 *      = [1 0 ]

 *

 *because the angle measurement directly corresponds to the angle

 *estimate and the angle measurement has no relation to the gyro

 *bias.

 */

void

kalman_update(

       constfloat             ax_m,     /* X acceleration */

       constfloat             az_m       /* Z acceleration */

)

{

       /*Compute our measured angle and the error in our estimate */


//以下代码更改成白色,下载后恢复成其他颜色即可看到  

       constfloat             angle_m = atan2( -az_m,ax_m );

       constfloat             angle_err = angle_m -angle;

 

       /*

        * C_0 shows how the state measurement directlyrelates to

        * the state estimate.

       *

        * The C_1 shows that the state measurement doesnot relate

        * to the gyro bias estimate.  We don't actually use this, so

        * we comment it out.

        */

       constfloat             C_0 = 1;

       /*const float          C_1 = 0; */

 

       /*

        * PCt<2,1> = P<2,2> *C'<2,1>, which we use twice.  Thismakes

        * it worthwhile to precompute and store thetwo values.

        * Note that C[0,1] = C_1 is zero, so we do notcompute that

        * term.

        */

       constfloat             PCt_0 = C_0 * P[0][0];/* + C_1 * P[0][1] = 0 */

       constfloat             PCt_1 = C_0 * P[1][0];/* + C_1 * P[1][1] = 0 */

             

       /*

        * Compute the error estimate.  From the Kalman filter paper:

        *

        *    E =C P C' + R

        *

        * Dimensionally,

        *

        *    E<1,1>= C<1,2> P<2,2> C'<2,1> + R<1,1>

        *

        * Again, note that C_1 is zero, so we do notcompute the term.

        */

       constfloat             E =

              R_angle

              +C_0 * PCt_0

       /*    + C_1 * PCt_1 = 0 */

       ;

 

       /*

        * Compute the Kalman filter gains.  From the Kalman paper:

        *

        *    K =P C' inv(E)

        *

        * Dimensionally:

        *

        *    K<2,1>= P<2,2> C'<2,1> inv(E)<1,1>

        *

        * Luckilly, E is <1,1>, so the inverseof E is just 1/E.

        */

       constfloat             K_0 = PCt_0 / E;

       constfloat             K_1 = PCt_1 / E;

             

       /*

        * Update covariance matrix.  Again, from the Kalman filter paper:

        *

        *    P =P - K C P

        *

        * Dimensionally:

        *

        *    P<2,2>-= K<2,1> C<1,2> P<2,2>

        *

        * We first compute t<1,2> = C P.  Note that:

        *

        *    t[0,0]= C[0,0] * P[0,0] + C[0,1] * P[1,0]

        *

        * But, since C_1 is zero, we have:

        *

        *    t[0,0]= C[0,0] * P[0,0] = PCt[0,0]

        *

        * This saves us a floating point multiply.

        */

       constfloat             t_0 = PCt_0; /* C_0 *P[0][0] + C_1 * P[1][0] */

       constfloat             t_1 = C_0 * P[0][1]; /*+ C_1 * P[1][1]  = 0 */

 

       P[0][0]-= K_0 * t_0;

       P[0][1]-= K_0 * t_1;

       P[1][0]-= K_1 * t_0;

       P[1][1]-= K_1 * t_1;

      

       /*

        * Update our state estimate.  Again, from the Kalman paper:

        *

        *    X +=K * err

        *

        * And, dimensionally,

        *

        *    X<2>= X<2> + K<2,1> * err<1,1>

        *

        * err is a measurement of the difference inthe measured state

        * and the estimate state.  In our case, it is just the difference

        * between the two accelerometer measured angleand our estimated

        * angle.

        */

       angle       += K_0 * angle_err;

       q_bias     += K_1 * angle_err;

}

 

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

一阶互补滤波,二阶互补滤波,卡尔曼滤波 的相关文章

  • 关于最新版的keil5不能正常调试或者调试过程自动停止的解决方法

    适用范围 1 在进入debug的功能中提示J link is defective xff0c 大概意思就是最新版的J LINK驱动跟正在用的硬件不匹配 xff0c 要你更换驱动或者更换硬件 xff08 其实是使用盗版的J LINK会出现的问
  • C++11变参模板的参数包

    Parameter pack 原文来自这里 A template parameter pack is a template parameter that accepts zero or more template arguments non
  • Linux socket 关闭场景

    测试环境 root 64 centos192 168 1 12 cat etc system release CentOS release 6 9 Final 工具 xff1a 服务器 192 168 1 12 ipython Python
  • QGroundControl地面站二次开发环境搭建(win+linux+android)

    更新时间 xff1a 2017 6 19 大家好 xff0c 我是learn xff0c 下面主要介绍一下QGroundControl地面站的环境搭建 网上也有好多教程 xff0c 我就不再麻烦了 xff0c 补充一下好了 http blo
  • std::vector用法

    vector 是C 43 43 标准模板库中的部分内容 xff0c 它是一个多功能的 xff0c 能够操作多种数据结构和算法的模板类和函数库 vector之所以被认为是一个容器 xff0c 是因为它能够像容器一样存放各种类型的对象 xff0
  • Linux串口(serial、uart)驱动程序设计

    一 核心数据结构 串口驱动有3个核心数据结构 xff0c 它们都定义在 lt include linux serial core h gt 1 uart driver uart driver包含了串口设备名 串口驱动名 主次设备号 串口控制
  • Xshell 5 评估过期,需要采购,不能使用的解决办法

    Xshell 5 当然 xff0c 现在我们可以直接撸 Xshell 6 了 卸载原来的 Xshell 5进入 Xshell 5 官网 xff1a https www netsarang com页面上点导航栏的 Free Licence x
  • mapreduce编程(一)-二次排序

    mr自带的例子中的源码SecondarySort xff0c 我重新写了一下 xff0c 基本没变 这个例子中定义的map和reduce如下 xff0c 关键是它对输入输出类型的定义 xff1a xff08 java泛型编程 xff09 p
  • Android apk执行shell脚本 工具类

    在做Android应用时 xff0c 经常需要执行shell脚本 xff0c 以快速实现某些功能 xff1b 在Android应用程序中执行shell脚本可以省去一大堆繁琐的代码 xff0c 还可以避免不必要的错误 xff1b 比如 xff
  • Python最强装逼神技!微信远程控制电脑,想让你电脑关机就关机!

    今天带给大家一个非常有意思的 python 程序 xff0c 基于 itchat 实现微信控制电脑 你可以通过在微信发送命令 xff0c 来拍摄当前电脑的使用者 xff0c 然后图片会发送到你的微信上 甚至你可以发送命令来远程关闭电脑 程序
  • 基于ESKF的IMU姿态融合【附MATLAB代码】

    目录 0 前言1 什么是ESKF2 系统方程2 1 状态变量2 2 imu的测量值2 3 预测方程及雅克比矩阵2 4 测量方程及雅克比矩阵 3 kalman filter loop计算4 Show me the code5 代码下载链接 0
  • 【笔记】自适应卡尔曼滤波 Adaptive Extended Kalman Filter

    0 阅读文章 Adaptive Adjustment of Noise Covariance in Kalman Filter for Dynamic State Estimation 1 主要内容 一般情况下 xff0c kalman中的
  • 二、Docker:Dockerfile的使用、指令详解和示例

    什么是 Dockerfile xff1f Dockerfile 是一个用来构建镜像的文本文件 xff0c 文本内容包含了一条条构建镜像所需的指令和说明 使用 Dockerfile 定制镜像 1 使用 dockerfile 定制 nginx
  • # STM32中断方式实现串口通信(标准库)

    STM32中断方式实现串口通信 xff08 标准库 xff09 文章目录 STM32中断方式实现串口通信 xff08 标准库 xff09 一 串口通信原理以及中断原理一 问题分析1 涉及外设2 状态机实现 二 创建MDK xff08 kei
  • 一张图看懂阿里云网络产品[一]网络产品概览

    一张图看懂网络产品系列文章 xff0c 让用户用最少的时间了解网络产品 xff0c 本文章是第一篇 网络产品概览 系列文章持续更新中 xff0c 敬请关注 xff3b 一 xff3d 网络产品概览 xff3b 二 xff3d VPC xff
  • MapReduce原理及编程实现

    文章目录 MapReduce原理及编程实现MapReduce基本概念MapReduce执行过程Mapper阶段Reducer阶段Combiner类Partitioner类 MapReduce实现WordCountKey amp Value类
  • 2020-10-20 学习日志(Crazepony控制环)

    2020年10月20日 学习任务 xff1a 完成Crazepony控制环的理解 之前是通过姿态解算获得了 四元数 旋转矩阵 欧拉角 CtrlAttiRate void CtrlAttiRate void float yawRateTarg
  • STL学习笔记之迭代器--iterator

    STL设计的精髓在于 xff0c 把容器 xff08 Containers xff09 和算法 xff08 Algorithms xff09 分开 xff0c 彼此独立设计 xff0c 最后再用迭代器 xff08 Iterator xff0
  • 提升工作效率之PCB设计软件“立创EDA”

    文章目录 前言一 立创EDA二 PCB生产三 团队功能总结 前言 由于工作需要设计一款硬件调试小工具 xff0c 考虑到器件采购和PCB制版都在立创商城上进行 xff0c 索性就试用立创EDA进行PCB设计 结论在前 xff1a 立创线上E
  • nvidia显卡,驱动以及cuda版本对应查询

    实验室新买了一块rtx 2080和titan rtx xff0c 需要分别配置驱动和cuda xff0c 但是一直也找不到显卡和cuda的官方对照表 xff0c 每次都是百度 谷歌 必应 xff0c 参考别人安装之旅 今天突然发现了驱动和c

随机推荐

  • LoRa 信噪比和接收灵敏度

    文章目录 前言一 信噪比极限 xff08 SNR LIMIT xff09 二 接收灵敏度 前言 介绍信噪比极限和如何计算接收灵敏度 参考资料 xff1a LoRa信噪比和接收灵敏度 一 信噪比极限 xff08 SNR LIMIT xff09
  • C在字符串后面加/0和0

    使用复制字符串时 xff0c 经常会遇到字符串后面跟着一大堆莫名其妙的字符串 xff0c 例如屯屯屯 之类的东西 xff0c 这是因为在使用字符串时没有在字符串结尾加 0或0 通常分配一块内存到堆上或栈上时 xff0c 内存区域可能会有之前
  • 基于k8s+prometheus实现双vip可监控Web高可用集群

    目录 一 规划整个项目的拓扑结构和项目的思维导图 二 修改好各个主机的主机名 xff0c 并配置好每台机器的ip地址 网关和dns等 2 1修改每个主机的ip地址和主机名 2 2 关闭firewalld和selinux 三 使用k8s实现W
  • PX4源码开发人员文档(一)——软件架构

    软件架构 PX4 在广播消息网络内 xff0c 按照一组节点 xff08 nodes xff09 的形式进行组织 xff0c 网络之间使用像如 姿态 和 位置 之类的语义通道来传递系统状态 软件的堆栈结构主要分为四层 应用程序接口 提供给a
  • ardupilot线程理解

    对于apm和pixhawk一直存在疑惑 xff0c 到现在还不是特别清楚 今天在http dev ardupilot com 看到下面的说明 xff0c 感觉很有用 xff0c 对于整体理解amp代码很有帮助 xff0c 所以记下来 转载请
  • Pixhawk源码笔记三:串行接口UART和Console

    这里 xff0c 我们对 APM UART Console 接口进行讲解 如有问题 xff0c 可以交流30175224 64 qq com 新浪 64 WalkAnt xff0c 转载本博客文章 xff0c 请注明出处 xff0c 以便更
  • C/C++中二维数组和指针关系分析

    在C c 43 43 中 xff0c 数组和指针有着密切的关系 xff0c 有很多地方说数组就是指针式错误的一种说法 这两者是不同的数据结构 其实 xff0c 在C c 43 43 中没有所谓的二维数组 xff0c 书面表达就是数组的数组
  • 四叉树空间索引原理及其实现

    今天依然在放假中 xff0c 在此将以前在学校写的四叉树的东西拿出来和大家分享 四叉树索引的基本思想是将地理空间递归划分为不同层次的树结构 它将已知范围的空间等分成四个相等的子空间 xff0c 如此递归下去 xff0c 直至树的层次达到一定
  • DirectXShaderCompiler mac编译

    Directxshader compiler mac编译 1 前置条件 Please make sure you have the following resources before building GitPython Version
  • intel -tbb 源码cmake构建

    cmake minimum required VERSION 3 0 0 FATAL ERROR set CMAKE CXX STANDARD 17 project tbb CXX add library tbb SHARED void c
  • 如何修改数据库密码

    多可文档管理系统是自带数据库的 xff0c 就是你在安装多可文档管理系统的同时 xff0c 数据库就已经自动安装上了 这个数据库有个默认密码 xff0c 为了数据库里的数据安全 xff0c 建议你安装完多可后 xff0c 就立刻修改数据库的
  • iOS编译openmp

    1 下载openmp源码 https github com llvm llvm project releases download llvmorg 14 0 6 openmp 14 0 6 src tar xz 2 下载ios toolch
  • 我的2013-从GIS学生到GIS职业人的飞跃

    我的 2013 从 GIS 学生GIS 职业人的飞跃 前言 xff1a 从末日中度过了 2012 年 xff0c 我们伟大的人类把这个世界末日的谎言给揭穿了 xff0c 但是不知不觉中 xff0c 2013 年又即将悄悄从我们身边溜走 xf
  • 矩阵的特征值和特征向量的雅克比算法C/C++实现

    矩阵的特征值和特征向量是线性代数以及矩阵论中非常重要的一个概念 在遥感领域也是经常用到 xff0c 比如多光谱以及高光谱图像的主成分分析要求解波段间协方差矩阵或者相关系数矩阵的特征值和特征向量 根据普通线性代数中的概念 xff0c 特征值和
  • windows多线程详解

    在一个牛人的博客上看到了这篇文章 xff0c 所以就转过来了 xff0c 地址是http blog csdn net morewindows article details 7421759 本文将带领你与多线程作第一次亲密接触 xff0c
  • tiff文件读取

    以下是VC下读取TIFF文件的代码 char szFileName 61 34 K 地图 fujian DEM fujian1 tif 34 TIFF tiff 61 TIFFOpen szFileName 34 r 34 打开Tiff文件
  • GIS开发人员需要掌握的知识和技能

    对于GIS行业 xff0c 可能很多人不是很了解 xff0c 对我来说也不是很了解 xff0c 在此呢 xff0c 我就我自己的看法发表一下简单的看法 xff0c 有什么不同的意见可以一起交流 GIS虽说是属于地理科学或者说测绘科学与技术的
  • GIS算法的一点理解

    在GIS这个专业也混了好几年了 xff0c 但是始终没有对GIS算法有过真正的研究 xff0c 可以说大部分不懂 目前关于GIS算法的书籍不是特别多 xff0c 数来数去也就那么几本 xff0c 南师大几个老师编写的地理信息系统算法基础 x
  • char*转LPCWSTR解决方案

    在Windows编程中 xff0c 经常会碰到字符串之间的转换 xff0c char 转LPCWSTR也是其中一个比较常见的转换 下面就列出几种比较常用的转换方法 1 通过MultiByteToWideChar函数转换 MultiByteT
  • 一阶互补滤波,二阶互补滤波,卡尔曼滤波

    一阶互补 a 61 tau tau 43 loop time newAngle 61 angle measured with atan2 using the accelerometer 加速度传感器输出值 newRate 61 angle