- 2
- 0
- 约5.28万字
- 约 9页
- 2017-07-26 发布于河南
- 举报
德国四元惯性导航算法
/*
* AHRS
* Copyright 2010 S.O.H. Madgwick
*
* This program is free software: you can redistribute it and/or
* modify it under the terms of the GNU Lesser Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser Public License for more details.
*
* You should have received a copy of the GNU Lesser Public License
* along with this program. If not, see
* /licenses/.
*/
// AHRS.c
// S.O.H. Madgwick
// 25th August 2010
//
// Quaternion implementation of the DCM filter [Mayhony et al]. Incorporates the magnetic distortion
// compensation algorithms from my filter [Madgwick] which eliminates the need for a reference
// direction of flux (bx bz) to be predefined and limits the effect of magnetic distortions to yaw
// axis only.
//
// User must define halfT as the (sample period / 2), and the filter gains Kp and Ki.
//
// Global variables q0, q1, q2, q3 are the quaternion elements representing the estimated
// orientation. See my report for an overview of the use of quaternions in this application.
//
// User must call AHRSupdate() every sample period and parse calibrated gyroscope (gx, gy, gz),
// accelerometer (ax, ay, ay) and magnetometer (mx, my, mz) data. Gyroscope units are
// radians/second, accelerometer and magnetometer units are irrelevant as the vector is normalised.
//
#include stm32f10x.h
#include AHRS.h
#include Positioning.h
#include math.h
#include stdio.h
/* Private define ------------------------------------------------------------*/
#define Kp 2.0f
您可能关注的文档
- 工程力学材料力学 9.ppt
- 工程原理计算.doc
- 工程地质评论问题答案.doc
- 工程施工过程.doc
- 工程材料和制造基地模拟量.doc
- 工程力学第一阶段测试题.doc
- 工程机械配置.doc
- 工程力学第7章 - 倒转.ppt
- 工程流体力学第一操作.doc
- 工程力学第一操作解决方案.doc
- 2025-2026学年天津市和平区高三(上)期末数学试卷(含解析).pdf
- 2025-2026学年云南省楚雄州高三(上)期末数学试卷(含答案).pdf
- 2025-2026学年甘肃省天水市张家川实验中学高三(上)期末数学试卷(含答案).docx
- 2025-2026学年福建省厦门市松柏中学高二(上)期末数学试卷(含答案).docx
- 2025-2026学年广西钦州市高一(上)期末物理试卷(含答案).docx
- 2025-2026学年河北省邯郸市临漳县九年级(上)期末化学试卷(含答案).docx
- 2025-2026学年河北省石家庄二十三中七年级(上)期末历史试卷(含答案).docx
- 2025-2026学年海南省五指山市九年级(上)期末化学试卷(含答案).docx
- 2025-2026学年河北省唐山市玉田县九年级(上)期末化学试卷(含答案).docx
- 2025-2026学年河北省邢台市市区九年级(上)期末化学试卷(含答案).docx
最近下载
- 时速160公里动力集中动车组动力车(177页).pptx VIP
- 全国李氏家族字辈.pdf VIP
- 2025储能场站运营的价值定位、运营模式和收益示例-202508v3.pdf VIP
- 小学科学《斜面》优质课件.docx VIP
- 串联型感应加热电源的自动负载匹配技术.pdf VIP
- 2025年新课标《义务教育数学课程标准(2022年版)》测试题及答案.docx VIP
- 老年人谵妄中西医结合诊疗专家共识.pdf VIP
- 膨胀土基坑复合土钉墙试验研究.pdf VIP
- 2021年江苏省无锡市天一高级中学高二物理下学期期末试卷含解析.docx VIP
- 《贵州省公路工程施工监理电子招标文件示范文本(试行)》2025.docx VIP
原创力文档

文档评论(0)