1 Star 5 Fork 2

flyloong / NRF52832_LSM6DSL

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
AHRS.h 1.16 KB
一键复制 编辑 原始数据 按行查看 历史
flyloong 提交于 2019-09-24 00:39 . first commit
//
// LSM9SDS0_AHRS.h
// LSM9SDS0 AHRS
//
// Created by Nicholas Robinson on 04/19/14.
// Copyright (c) 2014 Nicholas Robinson. All rights reserved.
//
#ifndef __AHRS_H__
#define __AHRS_H__
#include "math.h"
// Madgwick Constants
#define GyroMeasError PI * (10.0f / 180.0f)
#define beta sqrt(3.0f / 4.0f) * GyroMeasError
#define Kp 2.0f
#define Ki 0.000f
#define PI 3.1416f
extern float pitch,pitch2, yaw, roll;
static float q[4]={1,0,0,0};
static float rMat[3][3];
static float dt=0.002;
static float mahonyErrors[3]={0};
void madgwickQuaternionUpdate(float ax, float ay, float az, float gx, float gy, float gz, float mx, float my, float mz);
void mahonyQuaternionUpdate(float ax, float ay, float az, float gx, float gy, float gz, float mx, float my, float mz);
void MahonyAHRSupdateIMU(float gx, float gy, float gz, float ax, float ay, float az);
void MahonyAHRSupdate(float gx, float gy, float gz, float ax, float ay, float az, float mx, float my, float mz);
void AHRS_updateEulerAngles(void);
float invSqrt(float x) ;
#endif // __LSM9DS0_AHRS_H__
C
1
https://gitee.com/lbig/NRF52832_LSM6DSL.git
git@gitee.com:lbig/NRF52832_LSM6DSL.git
lbig
NRF52832_LSM6DSL
NRF52832_LSM6DSL
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891