增加MAVLink协议 自定义消息.md
来源:互联网 发布:如何提升淘宝店铺销量 编辑:程序博客网 时间:2024/05/16 09:20
在common.xml 或者要使用的飞控xml文件里面增加类似代码
因为飞控、地面站使用ardupilotmega.xml
这里在ardupilotmega.xml里面
增加发动机转速参数消息包
219 to 224 预留的协议ID
如下定义了3个协议包
id221 发动机转速
MOTORS_COUNT发动机数量
MOTORS发动机转速
id222 喷洒农药相关
PESTICIDE_CONSUME 农药剩余
FLOW_RATE喷药速率
id223 用于计算作业区域面积(比如打点器)
DIRECTION,数据发送方向
LATITUDE,当前打点器纬度
LONGITUDE,当前打点器经度
<!-- 219 to 224 RESERVED for more GOPRO--> <!--无人机自定义协议区域--> <message id="221" name="MOTORS"> <description>motors speed</description> <field name="MOTORS_COUNT" type="uint8_t">Motors Count</field> <field name="MOTORS" type="float[8]">Motors speed Array</field> </message> <message id="222" name="PESTICIDE"> <description>Farming Pesticide</description> <field name="PESTICIDE_CONSUME" type="float">Pesticide Consume</field> <field name="FLOW_RATE" type="float">Pesticide flow rate</field> </message> <message id="223" name="SAMPLE_MISSION_AREA"> <description>Sampling Mission Area int the real geographic position</description> <field name="DIRECTION" type="uint8_t">Data transport direction(1 GCS to autopilot, 0 autopilot to GCS)</field> <field name="LATITUDE" type="float">current Sampling position latitude</field> <field name="LONGITUDE" type="float">current Sampling position longitude</field> </message> <!--无人机自定义协议区域-->
然后用 MAVLink Generate 和ardupilotmega.xml生成协议
既可以在ardupilotmega 文件夹下面生成对应的消息包打包和解包的头文件(这里是 mavlink_msg_motors.h
)
最后可以在MAVLinkProtocol.cc里面处理对应的消息包了
阅读全文
0 0
- 增加MAVLink协议 自定义消息.md
- Mavlink地面站编写之八–MAVLINK消息自定义
- QGroundControl笔记 —— 自定义 MAVLink 消息
- Mavlink协议
- Misson Planner增加mavlink消息并显示在status中
- MAVLink协议通信分析——(二)消息结构
- MAVLink协议通信分析——(三)消息解析
- Pixhawk原生固件PX4之自定义MAVLink消息
- PX4源码分析7_添加mavlink自定义消息
- Pixhawk之通过XML文件生成自定义MAVLink消息结构
- VC增加自定义消息
- VC增加自定义消息
- VC增加自定义消息
- VC:增加自定义消息
- 增加用户自定义消息
- Mavlink-2-消息结构
- Mavlink-3-消息解析
- MAVLink协议的移植
- dp-水题
- 快速排序介绍与分析
- C# 分页 aspnetpager
- 地理信息系统矢量数据的组织形式 第二章:数字表面模型
- canvas学习总结四:绘制虚线
- 增加MAVLink协议 自定义消息.md
- Android Studio使用小技巧:提取方法代码片段
- 3932: [CQOI2015]任务查询系统 Time Limit: 20 Sec Memory Limit: 512 MB Submit: 3412 Solved: 1098 [Submit]
- iOS 使用全能的初始化方法
- 计算机导论第二课笔记一
- 浅谈SAP CRM开发——技术概念、与ECC 系列产品区别
- bzoj 4383: [POI2015]Pustynia(线段树优化建图+拓扑序)
- 图像处理中,outlier和inlier分别指什么?
- linux固定IP地址