Browse Source

feat: 添加航点吊舱缩放参数

Liu Yang 8 months ago
parent
commit
e6820d9f92

+ 3 - 0
msg_definitions/VKFly.xml

@@ -442,6 +442,9 @@
       <entry value="2" name="VKFLY_GIMBAL_WP_ACT_SET_PITCH_YAW_FOLLOW">
         <description>Do set gimbla pitch value, yaw follow drone head.</description>
       </entry>
+      <entry value="3" name="VKFLY_GIMBAL_WP_SET_ZOOM">
+        <description>Do set gimbla Zoom.</description>
+      </entry>
     </enum>
 
     <enum name="VKFLY_THROW_CHAN_TYPE" bitmask="true">

+ 33 - 11
readme.md

@@ -325,7 +325,8 @@ typedef enum VKFLY_GIMBAL_WP_ACT
     VKFLY_GIMBAL_WP_ACT_NONE=0, /* 无动作 | */
     VKFLY_GIMBAL_WP_ACT_SET_ANG=1, /* 设置云台角度 | */
     VKFLY_GIMBAL_WP_ACT_SET_PITCH_YAW_FOLLOW=2, /* 设置云台俯仰角度+航向跟随机头 | */
-    VKFLY_GIMBAL_WP_ACT_ENUM_END=3, /*  | */
+    VKFLY_GIMBAL_WP_SET_ZOOM=3, /* 设置云台相机画面缩放 | */
+    VKFLY_GIMBAL_WP_ACT_ENUM_END=4, /*  | */
 } VKFLY_GIMBAL_WP_ACT;
 ```
 
@@ -830,16 +831,37 @@ param3 作为飞往该点速度使用m/s, NAN表示使用飞控默认巡航速
 #### 4.1.3 拍照航点 VKFLY_CMD_NAV_WP
 
 拍照航点.
-  
-| 参数   | 说明                                                                                                                                                                                                                                                                                                         |
-| ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
-| param1 | 该参数按 byte[4] 进行使用. <br>byte[0]-byte[1] s16, 悬停时间, 单位 s. 0 表示不进行悬停自动转弯. <br>byte[2]-byte[3] s16, 巡航速度, 单位 dm/s. 0 或负数表示使用默认巡航速度参数.                                                                                                                              |
-| param2 | 该参数按 byte[4] 进行使用. <br>byte[0] u8, 达到该航点时是否单独触发一次相机动作. 参考 VKFLY_DIGICAM_WP_ACT <br>byte[1] u8, 为启动相机自动拍照控制模式. 参考 VKFLY_PHOTO_CTRL_MODE. <br>byte[2]-byte[3] u16, 为拍照模式间隔参数. 当拍照模式为定时时单位为s, 当拍照模式为定距拍照时单位为m. 范围 1-UINT16_MAX. |
-| param3 | 该参数按 byte[4] 进行使用. <br>byte[0] u8, 吊舱云台控制动作. 参考 VKFLY_GIMBAL_WP_ACT <br>byte[1] s8, 给定俯仰角, 单位 deg, 下视负.<br>byte[2]-byte[3] s16, 给定吊舱相对航向角, 单位 deg, 右转为正.                                                                                                          |
-| param4 | 该参数按 byte[4] 进行使用. <br>byte[0] u8, 为航向模式参考 VKFLY_YAW_CTRL_MODE. <br>byte[1] u8, 预留. <br>byte[2]-byte[3] s16, 范围-180-180. 当航向模式为 VKFLY_YAW_TO_SETVAL 时表示给定的航向值, 单位deg. 当航向模式为指向 <br>HOME 或 NEXT_WP 或 INTEREST 等给定点点时, 表示叠加的航向偏移.                 |
-| param5 | 纬度 1e-7deg                                                                                                                                                                                                                                                                                                 |
-| param6 | 经度 1e-7deg                                                                                                                                                                                                                                                                                                 |
-| param7 | 高度 m                                                                                                                                                                                                                                                                                                       |
+
+param1 分为 byte[4] 进行使用. 
+
+| 字节 | 类型  | 说明                                                  |
+| ---- | ----- | ----------------------------------------------------- |
+| 2    | int16 | 悬停时间, 单位 s. 0 表示不进行悬停自动转弯            |
+| 2    | int16 | 巡航速度, 单位 dm/s. 0 或负数表示使用默认巡航速度参数 |
+
+param2 分为 byte[4] 进行使用.
+
+| 字节 | 类型   | 说明                                                                                    |
+| ---- | ------ | --------------------------------------------------------------------------------------- |
+| 1    | uint8  | 到达航点是否触发拍照或录像动作  参考  VKFLY_DIGICAM_WP_ACT.                             |
+| 1    | uint8  | 航点触发自动定时或定距拍照控制  参考  VKFLY_PHOTO_CTRL_MODE.                            |
+| 2    | uint16 | 为拍照模式间隔参数. 当自动拍照模式为定时时单位为s <br>当自动拍照模式为定距拍照时单位为m |
+
+param3 分为 byte[4] 进行使用.
+
+| 字节 | 类型  | 说明                                                                                                         |
+| ---- | ----- | ------------------------------------------------------------------------------------------------------------ |
+| 1    | uint8 | 航点吊舱云台控制动作 VKFLY_GIMBAL_WP_ACT                                                                     |
+| 1    | int8  | 当吊舱动作为设置角度时为吊俯仰角, 范围 -90-90                                                                                          |
+| 2    | int16 | 当吊舱动作为设置角度时为吊舱航向角, 范围 -180-180. <br>当吊舱动作为设置缩放时为缩放倍率 * 10, 比如 5 倍为 50 |
+
+其它 param4\5\6如下  
+| 参数   | 说明                                                                                                                                                                                                                                                                                         |
+| ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| param4 | 该参数按 byte[4] 进行使用. <br>byte[0] u8, 为航向模式参考 VKFLY_YAW_CTRL_MODE. <br>byte[1] u8, 预留. <br>byte[2]-byte[3] s16, 范围-180-180. 当航向模式为 VKFLY_YAW_TO_SETVAL 时表示给定的航向值, 单位deg. 当航向模式为指向 <br>HOME 或 NEXT_WP 或 INTEREST 等给定点点时, 表示叠加的航向偏移. |
+| param5 | 纬度 1e-7deg                                                                                                                                                                                                                                                                                 |
+| param6 | 经度 1e-7deg                                                                                                                                                                                                                                                                                 |
+| param7 | 高度 m                                                                                                                                                                                                                                                                                       |
 
 #### 4.1.4 抛投航点 VKFLY_CMD_NAV_WP_THROW
 

+ 3 - 2
v2.0/VKFly/VKFly.h

@@ -10,7 +10,7 @@
     #error Wrong include order: MAVLINK_VKFLY.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call.
 #endif
 
-#define MAVLINK_VKFLY_XML_HASH -4488967979592242041
+#define MAVLINK_VKFLY_XML_HASH 6365727633432075425
 
 #ifdef __cplusplus
 extern "C" {
@@ -341,7 +341,8 @@ typedef enum VKFLY_GIMBAL_WP_ACT
    VKFLY_GIMBAL_WP_ACT_NONE=0, /* Do nothing. | */
    VKFLY_GIMBAL_WP_ACT_SET_ANG=1, /* Do set gimbal pitch and yaw angle value. | */
    VKFLY_GIMBAL_WP_ACT_SET_PITCH_YAW_FOLLOW=2, /* Do set gimbla pitch value, yaw follow drone head. | */
-   VKFLY_GIMBAL_WP_ACT_ENUM_END=3, /*  | */
+   VKFLY_GIMBAL_WP_SET_ZOOM=3, /* Do set gimbla Zoom. | */
+   VKFLY_GIMBAL_WP_ACT_ENUM_END=4, /*  | */
 } VKFLY_GIMBAL_WP_ACT;
 #endif
 

+ 1 - 1
v2.0/VKFly/mavlink.h

@@ -6,7 +6,7 @@
 #ifndef MAVLINK_H
 #define MAVLINK_H
 
-#define MAVLINK_PRIMARY_XML_HASH -4488967979592242041
+#define MAVLINK_PRIMARY_XML_HASH 6365727633432075425
 
 #ifndef MAVLINK_STX
 #define MAVLINK_STX 253

+ 1 - 1
v2.0/VKFly/version.h

@@ -7,7 +7,7 @@
 #ifndef MAVLINK_VERSION_H
 #define MAVLINK_VERSION_H
 
-#define MAVLINK_BUILD_DATE "Thu Nov 21 2024"
+#define MAVLINK_BUILD_DATE "Mon Dec 02 2024"
 #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
 #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
  

+ 1 - 1
v2.0/common/common.h

@@ -10,7 +10,7 @@
     #error Wrong include order: MAVLINK_COMMON.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call.
 #endif
 
-#define MAVLINK_COMMON_XML_HASH 1239892170518097068
+#define MAVLINK_COMMON_XML_HASH -6666667228635070027
 
 #ifdef __cplusplus
 extern "C" {

+ 1 - 1
v2.0/common/mavlink.h

@@ -6,7 +6,7 @@
 #ifndef MAVLINK_H
 #define MAVLINK_H
 
-#define MAVLINK_PRIMARY_XML_HASH 1239892170518097068
+#define MAVLINK_PRIMARY_XML_HASH -6666667228635070027
 
 #ifndef MAVLINK_STX
 #define MAVLINK_STX 253

+ 1 - 1
v2.0/common/version.h

@@ -7,7 +7,7 @@
 #ifndef MAVLINK_VERSION_H
 #define MAVLINK_VERSION_H
 
-#define MAVLINK_BUILD_DATE "Thu Nov 21 2024"
+#define MAVLINK_BUILD_DATE "Mon Dec 02 2024"
 #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
 #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
  

+ 1 - 1
v2.0/minimal/mavlink.h

@@ -6,7 +6,7 @@
 #ifndef MAVLINK_H
 #define MAVLINK_H
 
-#define MAVLINK_PRIMARY_XML_HASH 8704855588041561803
+#define MAVLINK_PRIMARY_XML_HASH -834993013869353878
 
 #ifndef MAVLINK_STX
 #define MAVLINK_STX 253

+ 1 - 1
v2.0/minimal/minimal.h

@@ -10,7 +10,7 @@
     #error Wrong include order: MAVLINK_MINIMAL.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call.
 #endif
 
-#define MAVLINK_MINIMAL_XML_HASH 8704855588041561803
+#define MAVLINK_MINIMAL_XML_HASH -834993013869353878
 
 #ifdef __cplusplus
 extern "C" {

+ 1 - 1
v2.0/minimal/version.h

@@ -7,7 +7,7 @@
 #ifndef MAVLINK_VERSION_H
 #define MAVLINK_VERSION_H
 
-#define MAVLINK_BUILD_DATE "Thu Nov 21 2024"
+#define MAVLINK_BUILD_DATE "Mon Dec 02 2024"
 #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
 #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 22
  

+ 1 - 1
v2.0/standard/mavlink.h

@@ -6,7 +6,7 @@
 #ifndef MAVLINK_H
 #define MAVLINK_H
 
-#define MAVLINK_PRIMARY_XML_HASH -6314738245746489701
+#define MAVLINK_PRIMARY_XML_HASH -6176536022386484924
 
 #ifndef MAVLINK_STX
 #define MAVLINK_STX 253

+ 1 - 1
v2.0/standard/standard.h

@@ -10,7 +10,7 @@
     #error Wrong include order: MAVLINK_STANDARD.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call.
 #endif
 
-#define MAVLINK_STANDARD_XML_HASH -6314738245746489701
+#define MAVLINK_STANDARD_XML_HASH -6176536022386484924
 
 #ifdef __cplusplus
 extern "C" {

+ 1 - 1
v2.0/standard/version.h

@@ -7,7 +7,7 @@
 #ifndef MAVLINK_VERSION_H
 #define MAVLINK_VERSION_H
 
-#define MAVLINK_BUILD_DATE "Thu Nov 21 2024"
+#define MAVLINK_BUILD_DATE "Mon Dec 02 2024"
 #define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
 #define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 22