(2) 从陀螺仪中获取原始数据并处理; (3) 更新数据并输出。 2. 代码分析 官方的驱动主要是了 MPL软件库(Motion Processing Library),要移植该软件库我们需 要为它提供 I2C 读写接口、定时服务以及 MPU6050 的数据更新标志。若需要输出调试信 息到上位机,还需要提供串口接口。 I2C 读写接口 MPL库的内部对 I2C 读写时都使用 i2c_write 及 i2c_read 函数,在文件“inv_mpu.c” 中给出了它们的接口格式,见代码清单 43-1。 代码清单 43-9 I2C 读写接口(inv_mpu.c 文件) 1 /* The following functions must be defined for this platform: 2 * i2c_write(unsigned char slave_addr, unsigned char reg_addr, 3 * unsigned char length, unsigned char const *data) 4 * i2c_read(unsigned char slave_addr, unsigned char reg_addr, 5 * unsigned char length, unsigned char *data) 6 */ 7 8 #define i2c_write Sensors_I2C_WriteRegister 9 #define i2c_read Sensors_I2C_ReadRegister 这些接口的格式与我们上一小节写的 I2C 读写函数 Sensors_I2C_ReadRegister 及 Sensors_I2C_WriteRegister 一致,所以可直接使用宏替换。 提供定时服务 MPL软件库中使用到了延时及时间戳功能,要求需要提供 delay_ms 函数实现毫秒级延 时,提供 get_ms 获取毫秒级的时间戳,它们的接口格式也在“inv_mpu.c”文件中给出, 见代码清单 43-2。 代码清单 43-10 定时服务接口(inv_mpu.c 文件) 1 /* 2 * delay_ms(unsigned long num_ms) 3 * get_ms(unsigned long *count) 4 */ 5 6 #define delay_ms Delay_ms 7 #define get_ms get_tick_count 我们为接口提供的 Delay_ms 及 get_tick_count 函数定义在 bsp_SysTick.c 文件,我们使 用 SysTick 每毫秒产生一次中断,进行计时,见代码清单 43-11。 代码清单 43-11 使用 Systick 进行定时(bsp_SysTick.c) 1 2 static __IO u32 TimingDelay; 3 static __IO uint32_t g_ul_ms_ticks=0; 4 /** 5 * @brief us 延时程序,1ms 为一个单位 6 * @param 7 * @arg nTime: Delay_ms( 1 ) 则实现的延时为 1 ms 8 * @retval 无 9 */ 10 void Delay_ms(__IO u32 nTime)
2023-02-17 11:43:35 33.8MB STM32F429 M4核
1
matlab生成维纳过程代码介绍 我尝试在此存储库中实现给定的wiener过滤器变体。 用法 运行main.m matlab代码。 结果保存在./result/ 。 main.m使用wiener_filter.m和Sxx_train.m ,它们包含主过滤器和PSD估计器(首先使用多个图像进行训练)。 要查看以前运行中保存的一些结果,请查看./saved_results/ 。 理论 在维纳滤波器中,我们尝试重建已与已知误差函数h(t)卷积的图像。 卷积图像还包含加性白噪声(高斯)。 该滤波器使重建的去噪图像和原始图像之间的均方根误差最小。 Weiner滤波器减小的误差度量是MSE与重构图像和原始图像之间的L2距离成正比。 在计算需要与变形图像卷积的“去模糊滤波器”时,滤波器需要S_xx,即原始图像的PSD。 但这不可能,因为我们要生成原始图像本身。 过滤器通过多种方式解决此问题,我在实现中使用的方式是利用以下经验事实:所有自然图像的PSD几乎相似,因此可以使用另一个未损坏图像的PSD来估计PSD。原始图像。 我们计算10个尺寸相似的图像的PSD,将其平均化,并将该值用作Weiner滤波器
2022-11-06 16:14:16 15.39MB 系统开源
1
中文名: Camel 实战 原名: Camel in Action 作者: Claus Ibsen Jonathan Anstey 资源格式: PDF 版本: 英文文字版/更新源代码 出版社: Manning书号: 9781935182368发行时间: 2010年12月 地区: 美国 语言: 英文 简介: 内容介绍: Apache Camel is a Java framework that lets you implement the standard enterprise integration patterns in a few lines of code. With a concise but sophisticated DSL you snap integration logic into your app, Lego-style, using Java, XML, or Scala. Camel supports over 80 common transports such as HTTP, REST, JMS, and Web Services. Camel in Action is a Camel tutorial full of small examples showing how to work with the integration patterns. It starts with core concepts like sending, receiving, routing, and transforming data. It then shows you the entire lifecycle and goes in depth on how to test, deal with errors, scale, deploy, and even monitor your app—details you can find only in the Camel code itself. Written by the developers of Camel, this book distills their experience and practical insights so that you can tackle integration tasks like a pro. 目录: Part 1 First steps 1 Meeting Camel 2 Routing with Camel Part 2 Core Camel 3 Transforming data with Camel 4 Using beans with Camel 5 Error handling 6 Testing with Camel 7 Understanding components 8 Enterprise integration patterns Part 3 Out in the wild 9 Using transactions 10 Concurrency and scalability 11 Developing Camel projects 12 Management and monitoring 13 Running and deploying Camel 14 Bean routing and remoting appendix A Simple, the expression language appendix B Expressions and predicates appendix C The producer and consumer templates appendix D The Camel community appendix E Akka and Camel
2022-11-04 11:48:26 3.89MB Camel
1
人像后期大师专业后期工具套装Nathaniel Gerdes-MASTER PACK Lightroom 预设套装包括:+人像编辑+颜色校正+编辑皮肤+画笔/面部修饰等等其他
2022-07-20 14:06:28 60KB Lightroom lr 预设滤镜 照片滤镜
1
该存储库包含Jonathan I. Dingel和Brent Neiman的注释“ ”注释下的代码。 这是一个完整的复制程序包,从头开始生成从和下载所有必需数据的,从头开始产生所有结果。 结果 如果您只想下载我们的结果而不运行任何复制代码,则可以获取以下CSV文件: 和行业水平结果 (感谢 ) 代码组织 工作流被组织为一系列任务。 每个任务文件夹包含三个文件夹: input , code , output 。 一个任务的输出被一个或多个下游任务用作输入。 描述了任务之间的输入-输出关系。 我们使用实用程序来自动化该工作流程。 下载此复制程序包(并安装相关软件)后,只需在命令行中键入make ,即可复制出现在纸张中的图形和表格。 软件需求 该项目的任务是通过Stata代码和Shell脚本实现的。 任务流结构使用符号链接。 要运行代码,您必须已安装Stata。 我们在Mac OS X上使用
2022-06-28 04:15:15 978KB economics Stata
1
This is, on the surface, a book about writing device drivers for the Linux system. That is a worthy goal, of course; the flow of new hardware products is not likely to slow down anytime soon, and somebody is going to have to make all those new gadgets work with Linux. But this book is also about how the Linux kernel works and how to adapt its workings to your needs or interests. Linux is an open system; with this book, we hope, it is more open and accessible to a larger community of developers.
2022-05-06 13:01:05 6.98MB Linux
1
纳特汉斯·塔科夫·拉达尔 构成我的Tarkov雷达的一系列应用程序。 特征 内存读取客户端(DMA,/ Source /) 中继服务器(/ wwwCheats / TarkovRadarProcessor /) 介面用户端(/ wwwCheats / www /) 计划 我计划在稳定的C版本可用时将vmread换成Heep的新memflow库,请检查一下它看起来真的很棒! (并支持更多的DMA方法): : 模型 Linux客户端 Linux主机客户端使用Vmread从在虚拟机中运行的游戏中读取内存。 ( )通过模板化读取功能,可以轻松地更新客户端以支持PCILeech。 偏移量需要更新,找到LGW偏移量,然后使用作弊引擎进行单解剖来查找所需的所有内容。 中继服务器 中继服务器是用于将游戏数据从Linux客户端传输到支持接口的代理,可以利用自定义接口来利用中继服务器。 接口客户端
2022-02-24 14:57:35 256KB C++
1
The theory and practice of time series analysis have developed rapidly since the appear- ance in 1970 of the seminal work of George E. P. Box and Gwilym M. Jenkins, Time Series Analysis: Forecasting and Control, now available in its third edition (1994) with co-author Gregory C. Reinsel. Many books on time series have appeared since then, but some of them give too little practical application, while others give too little theoretical background. This book attempts to present both application, and theory at a level acces- sible to a wide variety of students and practitioners. Our approach is to mix application and theory throughout the book as they are naturally needed.
2022-02-24 10:42:00 6.16MB 时间序列
1
深入解析Mac OS X & iOS操作系统[Jonathan Levin]-带目录完整,系统的讲解了MacOS和 iOS的底层原理,希望能够帮助有兴趣的同学。
2022-01-15 18:12:54 220.8MB 带目录 完整版
1
老师说操作系统看不下去的就看《深入理解计算机系统》,这个也看不下去的就看现在这本书。
2021-11-20 20:04:02 47.67MB 程序设计 Linux
1