摘要
介绍了基于STM32F103处理器实现无人机安控器主要功能的方法。阐述了通过计算有序排列的相邻向量叉积的正负来判断一个点是否在凸多边形内的算法,给出了常用无人机安控区域的定义,设计了无人机自主安控器模块最简硬件系统和资源分配。采用DMA数据收发和串口总线空闲中断相结合的方式完成不定长帧数据的串口收发,利用DMA数据收发和中断完成对I2 C器件中数据的读写,提交了主要功能程序片段和主程序片段。通过仿真测试和跑车试验验证了无人机自主安控器模块软硬件设计的正确性和可靠性。
In the paper,the method of implementing the main functions of the unmanned aerial vehicle's(UAV)safe controller based on STM32 F103 as the core processor is introduced.The algorithm which is claimed in this paper judges whether a point is in a convex polygon by calculating the positive or negative of the ordered vector cross product.It gives the definition of general saf-control area for UAV.It designes the simplest hardware system and resource allocation of the UAV's safe-controller module.The data transmitting and receiving via serial port for variable-length frame data is completed by the combination of DMA data transceiving and serial bus idle interrupt.The DMA data transceiving and ISR is used to read and write data in the I2 C device.The main function program fragment and the main program fragment have been submitted.The correctness and reliability of the software and hardware design of the UAV's independent safe controller module are verified by the simulation test and running car test.
引文
[1]叶厚良,谌国森,张明.靶弹飞行安全控制器设计[J].上海航天,2015,32(3):68-72.
[2]ST公司.STM32F103xCDE数据手册,2009.
[3]Joseph Yiu.ARM Cortex-M3权威指南[M].宋岩,译.北京:北京航空航天大学出版社,2009.
[4]贾丹平,桂珺.STM32F103x微处理器与μC/OS-II操作系统[M].北京:电子工业出版社,2017.
[5]李宁.ARM开发工具RealView MDK使用入门[M].北京:北京航空航天大学出版社,2008.
[6]庄严,王骁,汤建敏.嵌入式C/C++系统工程师实训教程[M].北京:清华大学出版社,2011.
[7]刘火良,杨森.STM32库开发实战指南基于STM32F103[M].2版.北京:机械工业出版社,2017.
[8]张勇.ARM Cortex-M3嵌入式开发与实践-基于STM32F103[M].北京:清华大学出版社,2017.