增加星基御3通信协议
This commit is contained in:
parent
b1ecb64a12
commit
1f8d75cf12
109
工作/艾航/星基/星基御3通信协议.md
Normal file
109
工作/艾航/星基/星基御3通信协议.md
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
## mavlink_msg MISSION_HEAD
|
||||||
|
***航线基础数据***
|
||||||
|
|
||||||
|
| 元素 | 名称 | 类型 | 单位 | 取值与释义 | 是否必需(默认值) |
|
||||||
|
| ------------ | ------ | ---------- | --- | -------------------------------------------- | --------- |
|
||||||
|
| missionId | 任务Id | uint32_t | - | 任务id | 必需元素 |
|
||||||
|
| lineId | 航线id | uint32_t | - | | |
|
||||||
|
| pointCount | 航点数量 | uint32_t | 个 | | 必需元素 |
|
||||||
|
| finishAction | 结束动作 | 枚举-int | - | 0:返航<br>1:原地降落<br>2:悬停 | 必需元素 |
|
||||||
|
| isRecord | 是否录像 | 枚举-int | | 0:不录像<br>1:录像 | 必需元素 |
|
||||||
|
| ImgSaveType | 图片保存模式 | uint8_t[3] | - | 三个int依次表示<br>变焦<br>广角<br>红外<br>0:不存储<br>1:存储 | 必需元素 |
|
||||||
|
## mavlink_msg WAYPOINT
|
||||||
|
|
||||||
|
***每个航点的信息***
|
||||||
|
|
||||||
|
| 元素 | 名称 | 类型 | 单位 | 取值与释义 | 是否必需 |
|
||||||
|
| ---------------- | ------- | ----------- | --- | ------------------------------------------------------------------------------------- | ---- |
|
||||||
|
| index | 航点索引 | uint32_t | - | 从1开始依次递增 | 必需 |
|
||||||
|
| longitude | 经度 | double | 度 | 航点经度 | 必需 |
|
||||||
|
| latitude | 纬度 | double | 度 | 航点纬度 | 必需 |
|
||||||
|
| relativeHeight | 相对高度 | float | 米 | 相对高度 | 必需 |
|
||||||
|
| absoluteHeight | 海拔高度 | float | 米 | 海拔高度 | 必需 |
|
||||||
|
| speed | 航点速度 | uint8_t | m/s | 航点飞行速度 | 必需 |
|
||||||
|
| waypointHeadMode | 偏航角模式 | 枚举-int | - | 0:跟随航线方向<br>1:锁定当前偏航角 | 必需 |
|
||||||
|
| waypointHead | 偏航角 | int16_t | 度 | 无人机偏航角 | 必需 |
|
||||||
|
| action_count | 航点动作数量 | uint8_t | 个 | 航点动作数量统计 | 必需 |
|
||||||
|
| action_types | 航点动作类型 | 枚举-int | - | 1:单拍 <br>2:开始录像 <br>3:结束录像 <br>4:对焦 <br>5:变焦 <br>6:旋转云台 <br>7:飞行器偏航 <br>8:悬停等待 | 必需 |
|
||||||
|
| action_param1 | 航点动作参数1 | int16_t[10] | | 数组第一个为第一个动作的参数以此类推 | 必需 |
|
||||||
|
| action_param2 | 航点动作参数2 | int16_t[10] | | 数组第一个为第一个动作的参数以此类推 | 必需 |
|
||||||
|
| action_param3 | 航点动作参数3 | int8_t[10] | | 数组第一个为第一个动作的参数以此类推 | 必需 |
|
||||||
|
| action_param4 | 航点动作参数4 | int8_t[10] | | 数组第一个为第一个动作的参数以此类推 | 必需 |
|
||||||
|
| action_param5 | 航点动作参数5 | int8_t[10] | | 数组第一个为第一个动作的参数以此类推 | 必需 |
|
||||||
|
|
||||||
|
#### action 单拍
|
||||||
|
| 元素 | 名称 | 类型 | 单位 | 取值与释义 | 是否必需 |
|
||||||
|
| ------------- | --- | ------- | --- | ----- | ---- |
|
||||||
|
| action_param1 | | int16_t | | | 非必需 |
|
||||||
|
| action_param2 | | int16_t | | | 非必需 |
|
||||||
|
| action_param3 | | int8_t | | | 非必需 |
|
||||||
|
| action_param4 | | int8_t | | | 非必需 |
|
||||||
|
| action_param5 | | int8_t | | 相机位置 | 必需 |
|
||||||
|
|
||||||
|
#### action 开始录像
|
||||||
|
|
||||||
|
| 元素 | 名称 | 类型 | 单位 | 取值与释义 | 是否必需 |
|
||||||
|
| ------------- | --- | ------- | --- | ----- | ---- |
|
||||||
|
| action_param1 | | int16_t | | | 非必需 |
|
||||||
|
| action_param2 | | int16_t | | | 非必需 |
|
||||||
|
| action_param3 | | int8_t | | | 非必需 |
|
||||||
|
| action_param4 | | int8_t | | | 非必需 |
|
||||||
|
| action_param5 | | int8_t | | 相机位置 | 必需 |
|
||||||
|
#### action 结束录像
|
||||||
|
| 元素 | 名称 | 类型 | 单位 | 取值与释义 | 是否必需 |
|
||||||
|
| ------------- | --- | ------- | --- | ----- | ---- |
|
||||||
|
| action_param1 | | int16_t | | | 非必需 |
|
||||||
|
| action_param2 | | int16_t | | | 非必需 |
|
||||||
|
| action_param3 | | int8_t | | | 非必需 |
|
||||||
|
| action_param4 | | int8_t | | | 非必需 |
|
||||||
|
| action_param5 | | int8_t | | 相机位置 | 必需 |
|
||||||
|
#### action 对焦
|
||||||
|
| 元素 | 名称 | 类型 | 单位 | 取值与释义 | 是否必需 |
|
||||||
|
| ------------- | --- | ------- | --- | ----- | ---- |
|
||||||
|
| action_param1 | | int16_t | | | 非必需 |
|
||||||
|
| action_param2 | | int16_t | | | 非必需 |
|
||||||
|
| action_param3 | | int8_t | | | 非必需 |
|
||||||
|
| action_param4 | | int8_t | | | 非必需 |
|
||||||
|
| action_param5 | | int8_t | | 相机位置 | 必需 |
|
||||||
|
#### action 变焦
|
||||||
|
|
||||||
|
| 元素 | 名称 | 类型 | 单位 | 取值与释义 | 是否必需 |
|
||||||
|
| ------------- | --- | ------- | --- | ----- | ---- |
|
||||||
|
| action_param1 | | int16_t | | 0.1倍 | 非必需 |
|
||||||
|
| action_param2 | | int16_t | | | 非必需 |
|
||||||
|
| action_param3 | | int8_t | | | 非必需 |
|
||||||
|
| action_param4 | | int8_t | | | 非必需 |
|
||||||
|
| action_param5 | | int8_t | | 相机位置 | 必需 |
|
||||||
|
|
||||||
|
#### action 旋转云台
|
||||||
|
|
||||||
|
| 元素 | 名称 | 类型 | 单位 | 取值与释义 | 是否必需 |
|
||||||
|
| ------------- | ------ | ------- | ---- | ----------------- | ---- |
|
||||||
|
| action_param1 | 云台俯仰角度 | int16_t | 0.1度 | 如果取值大于1800 则不使能俯仰 | 必需 |
|
||||||
|
| action_param2 | 云台偏航角度 | int16_t | 0.1度 | 如果取值大于1800 则不使能偏航 | 必需 |
|
||||||
|
| action_param3 | 云台旋转时间 | int8_t | 0.1秒 | | 非必需 |
|
||||||
|
| action_param4 | | int8_t | | | 非必需 |
|
||||||
|
| action_param5 | | int8_t | | 相机位置 | 必需 |
|
||||||
|
#### action 飞行器偏航
|
||||||
|
| 元素 | 名称 | 类型 | 单位 | 取值与释义 | 是否必需 |
|
||||||
|
| ------------- | -------- | ------- | ------ | ------------------ | ---- |
|
||||||
|
| action_param1 | 飞行器目标偏航角 | int16_t | 0.1度 | [-180, 180] | 必需 |
|
||||||
|
| action_param2 | | int16_t | | | 非必需 |
|
||||||
|
| action_param3 | | int8_t | | | 非必需 |
|
||||||
|
| action_param4 | | int8_t | | | 非必需 |
|
||||||
|
| action_param5 | 偏航角模式 | int8_t | 枚举-int | 0顺时针旋转 <br>1逆时针旋转 | 必需 |
|
||||||
|
#### action 悬停等待
|
||||||
|
|
||||||
|
| 元素 | 名称 | 类型 | 单位 | 取值与释义 | 是否必需 |
|
||||||
|
| ------------- | ---- | ------- | ---- | ------- | ---- |
|
||||||
|
| action_param1 | 悬停时间 | int16_t | 0.1秒 | 飞行器悬停时间 | 必需 |
|
||||||
|
| action_param2 | | int16_t | | | 非必需 |
|
||||||
|
| action_param3 | | int8_t | | | 非必需 |
|
||||||
|
| action_param4 | | int8_t | | | 非必需 |
|
||||||
|
| action_param5 | | int8_t | | | 非必需 |
|
||||||
|
## mavlink_msg MISSION_END
|
||||||
|
***任务数据发送结束,收到后停止解析接收对应任务数据***
|
||||||
|
|
||||||
|
| 元素 | 名称 | 类型 | 单位 | 取值与释义 | 是否必需 |
|
||||||
|
| ------------- | ---- | -------- | --- | ----- | ---- |
|
||||||
|
| missionId | 任务id | uint32_t | | | 必需 |
|
||||||
190
工作/艾航/星基/星基接口文档.md
Normal file
190
工作/艾航/星基/星基接口文档.md
Normal file
@ -0,0 +1,190 @@
|
|||||||
|
# M300,M350版本
|
||||||
|
## psdk -> msdk 心跳
|
||||||
|
### sample
|
||||||
|
|
||||||
|
```json
|
||||||
|
{"d":[101.41,0.0,30.308899902,119.93859993],"e":[0,0,0,0,4,15,1730951069]}
|
||||||
|
```
|
||||||
|
### 字段解析
|
||||||
|
|
||||||
|
| 字段名 | 字段值介绍 | 字段类型 | 是否必填 |
|
||||||
|
| --- | --------- | ------ | ---- |
|
||||||
|
| d | 无人机当前坐标信息 | 数组 | 是 |
|
||||||
|
| » | 海拔高度 | float | 是 |
|
||||||
|
| » | 相对高度 | float | 是 |
|
||||||
|
| » | 纬度 | double | 是 |
|
||||||
|
| » | 经度 | double | 是 |
|
||||||
|
| e | 无人机当前状态 | 数组 | 是 |
|
||||||
|
| » | 指令类型 | int | 是 |
|
||||||
|
| » | 无人机当前任务id | int | 是 |
|
||||||
|
| » | 无人机当前任务状态 | int | 是 |
|
||||||
|
| » | 无人机当前航点进度 | int | 是 |
|
||||||
|
| » | 无人机rtk 状态 | int | 是 |
|
||||||
|
| » | 无人机搜星数量 | int | 是 |
|
||||||
|
| » | 无人机当前系统时间 | long | 是 |
|
||||||
|
|
||||||
|
## msdk -> psdk 任务指令
|
||||||
|
|
||||||
|
```json
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"absoluteHeight": 108.24,
|
||||||
|
"actionList": [
|
||||||
|
{
|
||||||
|
"param": "{\"speed\":12}",
|
||||||
|
"type": "speed"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"param": "{\"aircraftHeading\":0.1}",
|
||||||
|
"type": "heading"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"param": "{\"gimbalPitchRotateAngle\":0.0,\"gimbalPitchRotateEnable\":true,\"gimbalRollRotateAngle\":0,\"gimbalRollRotateEnable\":false,\"gimbalRotateMode\":\"absoluteAngle\",\"gimbalRotateTime\":0,\"gimbalRotateTimeEnable\":false,\"gimbalYawRotateAngle\":-5.599999904632568,\"gimbalYawRotateEnable\":true,\"payloadPositionIndex\":0}",
|
||||||
|
"type": "angle"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"param": "{\"focalLength\":47,\"focalTimes\":2.0,\"payloadPositionIndex\":0,\"zoomType\":1}",
|
||||||
|
"type": "zoomMultiple"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"param": "{\"hoverTime\":1.0}",
|
||||||
|
"type": "hover"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"param": "{\"payloadPositionIndex\":0}",
|
||||||
|
"type": "isPhoto"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"droneLocationLat": 30.308944909,
|
||||||
|
"droneLocationLng": 119.938599702,
|
||||||
|
"flyHeight": 8.1,
|
||||||
|
"index": 0,
|
||||||
|
"isJumpFly": false,
|
||||||
|
"is_add_point": false,
|
||||||
|
"jumpHeight": 0,
|
||||||
|
"noseDirection": 0,
|
||||||
|
"pointId": -1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"absoluteHeight": 108.29,
|
||||||
|
"actionList": [
|
||||||
|
{
|
||||||
|
"param": "{\"speed\":12}",
|
||||||
|
"type": "speed"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"param": "{\"aircraftHeading\":0.0}",
|
||||||
|
"type": "heading"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"param": "{\"gimbalPitchRotateAngle\":-84.69999694824219,\"gimbalPitchRotateEnable\":true,\"gimbalRollRotateAngle\":0,\"gimbalRollRotateEnable\":false,\"gimbalRotateMode\":\"absoluteAngle\",\"gimbalRotateTime\":0,\"gimbalRotateTimeEnable\":false,\"gimbalYawRotateAngle\":-6.604998588562012,\"gimbalYawRotateEnable\":true,\"payloadPositionIndex\":0}",
|
||||||
|
"type": "angle"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"param": "{\"focalLength\":47,\"focalTimes\":2.0,\"payloadPositionIndex\":0,\"zoomType\":1}",
|
||||||
|
"type": "zoomMultiple"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"param": "{\"hoverTime\":1.0}",
|
||||||
|
"type": "hover"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"param": "{\"payloadPositionIndex\":0}",
|
||||||
|
"type": "isPhoto"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"droneLocationLat": 30.308980327,
|
||||||
|
"droneLocationLng": 119.938601212,
|
||||||
|
"flyHeight": 8.15,
|
||||||
|
"index": 0,
|
||||||
|
"isJumpFly": false,
|
||||||
|
"is_add_point": false,
|
||||||
|
"jumpHeight": 0,
|
||||||
|
"noseDirection": 0,
|
||||||
|
"pointId": -1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"absoluteHeight": 108.3,
|
||||||
|
"actionList": [
|
||||||
|
{
|
||||||
|
"param": "{\"speed\":12}",
|
||||||
|
"type": "speed"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"param": "{\"aircraftHeading\":0.0}",
|
||||||
|
"type": "heading"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"param": "{\"gimbalPitchRotateAngle\":-57.70000076293945,\"gimbalPitchRotateEnable\":true,\"gimbalRollRotateAngle\":0,\"gimbalRollRotateEnable\":false,\"gimbalRotateMode\":\"absoluteAngle\",\"gimbalRotateTime\":0,\"gimbalRotateTimeEnable\":false,\"gimbalYawRotateAngle\":-6.605701923370361,\"gimbalYawRotateEnable\":true,\"payloadPositionIndex\":0}",
|
||||||
|
"type": "angle"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"param": "{\"focalLength\":47,\"focalTimes\":2.0,\"payloadPositionIndex\":0,\"zoomType\":1}",
|
||||||
|
"type": "zoomMultiple"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"param": "{\"hoverTime\":1.0}",
|
||||||
|
"type": "hover"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"param": "{\"payloadPositionIndex\":0}",
|
||||||
|
"type": "isPhoto"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"droneLocationLat": 30.309235505,
|
||||||
|
"droneLocationLng": 119.938600115,
|
||||||
|
"flyHeight": 8.16,
|
||||||
|
"index": 0,
|
||||||
|
"isJumpFly": false,
|
||||||
|
"is_add_point": false,
|
||||||
|
"jumpHeight": 0,
|
||||||
|
"noseDirection": 0,
|
||||||
|
"pointId": -1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
### 参数
|
||||||
|
|
||||||
|
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|
||||||
|
| ---------------- | -------- | ---- | ---- | ------ | ---- |
|
||||||
|
| absoluteHeight | number | true | none | 海拔高度 | none |
|
||||||
|
| actionList | [object] | true | none | 航点动作列表 | none |
|
||||||
|
| » param | string | true | none | 航点动作参数 | none |
|
||||||
|
| » type | string | true | none | 航点动作类型 | none |
|
||||||
|
| droneLocationLat | number | true | none | 航点纬度 | none |
|
||||||
|
| droneLocationLng | number | true | none | 航点经度 | none |
|
||||||
|
| flyHeight | number | true | none | 相对高度 | none |
|
||||||
|
| index | integer | true | none | 航点索引 | none |
|
||||||
|
| isJumpFly | boolean | true | none | 是否为跳飞点 | none |
|
||||||
|
| is_add_point | boolean | true | none | | none |
|
||||||
|
| jumpHeight | integer | true | none | 跳飞高度 | none |
|
||||||
|
| noseDirection | integer | true | none | | none |
|
||||||
|
| pointId | integer | true | none | 航点ID | none |
|
||||||
|
|
||||||
|
# M3T M30 版本
|
||||||
|
|
||||||
|
## psdk -> msdk 心跳
|
||||||
|
### sample
|
||||||
|
|
||||||
|
```json
|
||||||
|
{"d":[101.41,0.0,30.308899902,119.93859993],"e":[0,0,0,0,4,15,1730951069]}
|
||||||
|
```
|
||||||
|
### 字段解析
|
||||||
|
|
||||||
|
| 字段名 | 字段值介绍 | 字段类型 | 是否必填 |
|
||||||
|
| --- | --------- | ------ | ---- |
|
||||||
|
| d | 无人机当前坐标信息 | 数组 | 是 |
|
||||||
|
| » | 海拔高度 | float | 是 |
|
||||||
|
| » | 相对高度 | float | 是 |
|
||||||
|
| » | 纬度 | double | 是 |
|
||||||
|
| » | 经度 | double | 是 |
|
||||||
|
| e | 无人机当前状态 | 数组 | 是 |
|
||||||
|
| » | 指令类型 | int | 是 |
|
||||||
|
| » | 无人机当前任务id | int | 是 |
|
||||||
|
| » | 无人机当前任务状态 | int | 是 |
|
||||||
|
| » | 无人机当前航点进度 | int | 是 |
|
||||||
|
| » | 无人机rtk 状态 | int | 是 |
|
||||||
|
| » | 无人机搜星数量 | int | 是 |
|
||||||
|
| » | 无人机当前系统时间 | long | 是 |
|
||||||
Loading…
x
Reference in New Issue
Block a user