zy上云api


蜂群属性上报

<h1>蜂群属性上报内容表格</h1> <h2>完整JSON示例</h2> <pre><code class="language-json">{ &amp;quot;bid&amp;quot;: &amp;quot;1761009108260-3461&amp;quot;, &amp;quot;data&amp;quot;: { &amp;quot;properties&amp;quot;: { &amp;quot;overallStatus&amp;quot;: { &amp;quot;health_status&amp;quot;: 0, &amp;quot;control_object_type&amp;quot;: 2, &amp;quot;selected_uav_id&amp;quot;: 1, &amp;quot;selected_team_id&amp;quot;: 1, &amp;quot;pod_switching_type&amp;quot;: 0, &amp;quot;selected_pod_id&amp;quot;: 1 }, &amp;quot;teams&amp;quot;: [ { &amp;quot;formation&amp;quot;: 0, &amp;quot;members&amp;quot;: [2, 3, 1], &amp;quot;space&amp;quot;: 0, &amp;quot;team_id&amp;quot;: 1 } ], &amp;quot;uavs&amp;quot;: [ { &amp;quot;sn&amp;quot;: &amp;quot;2&amp;quot;, &amp;quot;latitude&amp;quot;: 22.4115285, &amp;quot;longitude&amp;quot;: 113.5616545, &amp;quot;asl&amp;quot;: 0.07000000029802322, &amp;quot;alt&amp;quot;: 0.0, &amp;quot;team_id&amp;quot;: 1, &amp;quot;flight_mode&amp;quot;: 81, &amp;quot;is_leader&amp;quot;: 0, &amp;quot;horizontal_speed&amp;quot;: 0.0, &amp;quot;vertical_speed&amp;quot;: 0.0, &amp;quot;battery_remaining&amp;quot;: 0, &amp;quot;battery_voltage&amp;quot;: 0.0, &amp;quot;satellites_visible&amp;quot;: 0, &amp;quot;hposerr&amp;quot;: 0.0, &amp;quot;vposerr&amp;quot;: 0.0, &amp;quot;signal_strength&amp;quot;: 0, &amp;quot;rtk&amp;quot;: 0, &amp;quot;attitude_control_healthy&amp;quot;: 1, &amp;quot;home_latitude&amp;quot;: 0.0, &amp;quot;home_longitude&amp;quot;: 0.0, &amp;quot;armed&amp;quot;: false, &amp;quot;landed_state&amp;quot;: false, &amp;quot;is_online&amp;quot;: 1, &amp;quot;attack_mode&amp;quot;: 1, &amp;quot;attack_after_behavior&amp;quot;: 6, &amp;quot;lost_return&amp;quot;: 1, &amp;quot;low_battery_behavior&amp;quot;: 1, &amp;quot;has_base_info&amp;quot;: true, &amp;quot;has_status_info&amp;quot;: true }, { &amp;quot;sn&amp;quot;: &amp;quot;3&amp;quot;, &amp;quot;latitude&amp;quot;: 22.4115286, &amp;quot;longitude&amp;quot;: 113.5616934, &amp;quot;asl&amp;quot;: 0.07000000029802322, &amp;quot;alt&amp;quot;: 0.0, &amp;quot;team_id&amp;quot;: 1, &amp;quot;flight_mode&amp;quot;: 81, &amp;quot;is_leader&amp;quot;: 0, &amp;quot;horizontal_speed&amp;quot;: 0.0, &amp;quot;vertical_speed&amp;quot;: 0.0, &amp;quot;battery_remaining&amp;quot;: 0, &amp;quot;battery_voltage&amp;quot;: 0.0, &amp;quot;satellites_visible&amp;quot;: 0, &amp;quot;hposerr&amp;quot;: 0.0, &amp;quot;vposerr&amp;quot;: 0.0, &amp;quot;signal_strength&amp;quot;: 0, &amp;quot;rtk&amp;quot;: 0, &amp;quot;attitude_control_healthy&amp;quot;: 1, &amp;quot;home_latitude&amp;quot;: 0.0, &amp;quot;home_longitude&amp;quot;: 0.0, &amp;quot;armed&amp;quot;: false, &amp;quot;landed_state&amp;quot;: false, &amp;quot;is_online&amp;quot;: 1, &amp;quot;attack_mode&amp;quot;: 1, &amp;quot;attack_after_behavior&amp;quot;: 6, &amp;quot;lost_return&amp;quot;: 1, &amp;quot;low_battery_behavior&amp;quot;: 1, &amp;quot;has_base_info&amp;quot;: true, &amp;quot;has_status_info&amp;quot;: true }, { &amp;quot;sn&amp;quot;: &amp;quot;1&amp;quot;, &amp;quot;latitude&amp;quot;: 22.4115285, &amp;quot;longitude&amp;quot;: 113.5616156, &amp;quot;asl&amp;quot;: 0.07000000029802322, &amp;quot;alt&amp;quot;: 0.0, &amp;quot;team_id&amp;quot;: 1, &amp;quot;flight_mode&amp;quot;: 81, &amp;quot;is_leader&amp;quot;: 0, &amp;quot;horizontal_speed&amp;quot;: 0.0, &amp;quot;vertical_speed&amp;quot;: 0.0, &amp;quot;battery_remaining&amp;quot;: 0, &amp;quot;battery_voltage&amp;quot;: 0.0, &amp;quot;satellites_visible&amp;quot;: 0, &amp;quot;hposerr&amp;quot;: 0.0, &amp;quot;vposerr&amp;quot;: 0.0, &amp;quot;signal_strength&amp;quot;: 0, &amp;quot;rtk&amp;quot;: 0, &amp;quot;attitude_control_healthy&amp;quot;: 1, &amp;quot;home_latitude&amp;quot;: 0.0, &amp;quot;home_longitude&amp;quot;: 0.0, &amp;quot;armed&amp;quot;: false, &amp;quot;landed_state&amp;quot;: false, &amp;quot;is_online&amp;quot;: 1, &amp;quot;attack_mode&amp;quot;: 1, &amp;quot;attack_after_behavior&amp;quot;: 6, &amp;quot;lost_return&amp;quot;: 1, &amp;quot;low_battery_behavior&amp;quot;: 1, &amp;quot;has_base_info&amp;quot;: true, &amp;quot;has_status_info&amp;quot;: true } ] } }, &amp;quot;method&amp;quot;: &amp;quot;reportProperties&amp;quot;, &amp;quot;tid&amp;quot;: &amp;quot;1761009108260-9519&amp;quot;, &amp;quot;timestamp&amp;quot;: 1761009108260 }</code></pre> <h2>整体状态 (properties.overallStatus)</h2> <table> <thead> <tr> <th>字段名</th> <th>类型</th> <th>描述</th> <th>示例值</th> </tr> </thead> <tbody> <tr> <td>health_status</td> <td>int</td> <td>健康状态 (0=健康, 1=异常)</td> <td>0</td> </tr> <tr> <td>control_object_type</td> <td>int</td> <td>控制对象类型 (0=单控, 1=多控, 2=组控)</td> <td>2</td> </tr> <tr> <td>selected_uav_id</td> <td>int</td> <td>选中无人机ID</td> <td>1</td> </tr> <tr> <td>selected_team_id</td> <td>int</td> <td>选中队伍ID</td> <td>1</td> </tr> <tr> <td>pod_switching_type</td> <td>int</td> <td>吊舱切换类型 (0=手动, 1=自动)</td> <td>0</td> </tr> <tr> <td>selected_pod_id</td> <td>int</td> <td>选中吊舱ID</td> <td>1</td> </tr> </tbody> </table> <h2>队伍信息 (properties.teams)</h2> <table> <thead> <tr> <th>字段名</th> <th>类型</th> <th>描述</th> <th>示例值</th> </tr> </thead> <tbody> <tr> <td>team_id</td> <td>int</td> <td>队伍ID</td> <td>0为没编队,不为0即已设置编队</td> </tr> <tr> <td>formation</td> <td>int</td> <td>队形模式 (0-8)</td> <td>0</td> </tr> <tr> <td>space</td> <td>int</td> <td>编队间距(米)</td> <td>0</td> </tr> <tr> <td>members</td> <td>array[int]</td> <td>队伍成员ID列表</td> <td>[2, 3, 1]</td> </tr> </tbody> </table> <h2>无人机信息 (properties.uavs[])</h2> <table> <thead> <tr> <th>字段名</th> <th>类型</th> <th>描述</th> <th>示例值</th> </tr> </thead> <tbody> <tr> <td>sn</td> <td>string</td> <td>飞机序列号</td> <td>&quot;1&quot;</td> </tr> <tr> <td>latitude</td> <td>double</td> <td>纬度</td> <td>22.4115285</td> </tr> <tr> <td>longitude</td> <td>double</td> <td>经度</td> <td>113.5616156</td> </tr> <tr> <td>asl</td> <td>double</td> <td>海拔高度(米)</td> <td>0.07</td> </tr> <tr> <td>alt</td> <td>double</td> <td>相对高度(米)</td> <td>0.0</td> </tr> <tr> <td>team_id</td> <td>int</td> <td>所属队伍ID</td> <td>1</td> </tr> <tr> <td>flight_mode</td> <td>int</td> <td>飞行模式</td> <td>81</td> </tr> <tr> <td>is_leader</td> <td>int</td> <td>是否队长 (0/1)</td> <td>0</td> </tr> <tr> <td>horizontal_speed</td> <td>float</td> <td>水平速度(m/s)</td> <td>0.0</td> </tr> <tr> <td>vertical_speed</td> <td>float</td> <td>垂直速度(m/s)</td> <td>0.0</td> </tr> <tr> <td>battery_remaining</td> <td>int</td> <td>电池剩余百分比</td> <td>0</td> </tr> <tr> <td>battery_voltage</td> <td>float</td> <td>电池电压(V)</td> <td>0.0</td> </tr> <tr> <td>satellites_visible</td> <td>int</td> <td>GPS卫星数</td> <td>0</td> </tr> <tr> <td>hposerr</td> <td>float</td> <td>水平定位精度</td> <td>0.0</td> </tr> <tr> <td>vposerr</td> <td>float</td> <td>垂直定位精度</td> <td>0.0</td> </tr> <tr> <td>signal_strength</td> <td>int</td> <td>信号强度</td> <td>0</td> </tr> <tr> <td>rtk</td> <td>int</td> <td>是否RTK (0/1)</td> <td>0</td> </tr> <tr> <td>attitude_control_healthy</td> <td>int</td> <td>姿态控制健康 (0/1)</td> <td>1</td> </tr> <tr> <td>home_latitude</td> <td>double</td> <td>返航点纬度</td> <td>0.0</td> </tr> <tr> <td>home_longitude</td> <td>double</td> <td>返航点经度</td> <td>0.0</td> </tr> <tr> <td>armed</td> <td>bool</td> <td>是否已解锁</td> <td>false</td> </tr> <tr> <td>landed_state</td> <td>bool</td> <td>是否正在飞行</td> <td>false</td> </tr> <tr> <td>is_online</td> <td>int</td> <td>是否在线 (0/1)</td> <td>1</td> </tr> <tr> <td>attack_mode</td> <td>int</td> <td>攻击模式</td> <td>1</td> </tr> <tr> <td>attack_after_behavior</td> <td>int</td> <td>攻击后行为</td> <td>6</td> </tr> <tr> <td>lost_return</td> <td>int</td> <td>失连返航策略</td> <td>1</td> </tr> <tr> <td>low_battery_behavior</td> <td>int</td> <td>低电量动作</td> <td>1</td> </tr> <tr> <td>has_base_info</td> <td>bool</td> <td>是否有基础信息</td> <td>true</td> </tr> <tr> <td>has_status_info</td> <td>bool</td> <td>是否有状态信息</td> <td>true</td> </tr> </tbody> </table> <h2>控制对象类型枚举值 (controlObjectType)</h2> <table> <thead> <tr> <th>值</th> <th>类型名称</th> <th>描述</th> </tr> </thead> <tbody> <tr> <td>0</td> <td>SINGLE</td> <td>单控模式</td> </tr> <tr> <td>1</td> <td>BITMASK</td> <td>多控模式</td> </tr> <tr> <td>2</td> <td>GROUP</td> <td>组控模式</td> </tr> </tbody> </table> <h2>飞行模式枚举值 (mode)</h2> <table> <thead> <tr> <th>值</th> <th>模式名称</th> <th>描述</th> </tr> </thead> <tbody> <tr> <td>0</td> <td>NotConnected</td> <td>飞行器未连接</td> </tr> <tr> <td>1</td> <td>Standby</td> <td>起飞准备完成</td> </tr> <tr> <td>2</td> <td>Manual</td> <td>手动飞行</td> </tr> <tr> <td>3</td> <td>AltitudeHold</td> <td>高度保持(常用于部分手动模式)</td> </tr> <tr> <td>4</td> <td>PositionHold</td> <td>定点悬停(Loiter)</td> </tr> <tr> <td>5</td> <td>AutoMission</td> <td>航线飞行(自动任务)</td> </tr> <tr> <td>6</td> <td>RTL</td> <td>返航</td> </tr> <tr> <td>7</td> <td>Land</td> <td>降落</td> </tr> <tr> <td>8</td> <td>RcFailsafe</td> <td>失联</td> </tr> <tr> <td>10</td> <td>Stabilize</td> <td>自稳模式</td> </tr> <tr> <td>17</td> <td>Brake</td> <td>急停</td> </tr> <tr> <td>60</td> <td>Manual</td> <td>手动飞行(扩展)</td> </tr> <tr> <td>80</td> <td>SwarmManual</td> <td>集群手控</td> </tr> <tr> <td>81</td> <td>SwarmGuided</td> <td>集群引导</td> </tr> <tr> <td>82</td> <td>SwarmAuto</td> <td>集群自动航线</td> </tr> <tr> <td>83</td> <td>SwarmAttack</td> <td>集群自动攻击</td> </tr> <tr> <td>127</td> <td>AvionicsOverhaul</td> <td>检修模式,紫燕自定义模式</td> </tr> <tr> <td>99</td> <td>Unknown</td> <td>未知模式(无法识别)</td> </tr> </tbody> </table> <h2>队形模式枚举值 (formation)</h2> <table> <thead> <tr> <th>值</th> <th>队形名称</th> <th>描述</th> </tr> </thead> <tbody> <tr> <td>0</td> <td>None</td> <td>无编队</td> </tr> <tr> <td>1</td> <td>Line</td> <td>横队</td> </tr> <tr> <td>2</td> <td>Column</td> <td>列队</td> </tr> <tr> <td>3</td> <td>Surround</td> <td>包围式</td> </tr> <tr> <td>4</td> <td>Square</td> <td>方形</td> </tr> <tr> <td>5</td> <td>Triangle</td> <td>三角形</td> </tr> <tr> <td>6</td> <td>InvertedV</td> <td>倒V形</td> </tr> <tr> <td>7</td> <td>VShape</td> <td>V形</td> </tr> <tr> <td>8</td> <td>Random</td> <td>随机</td> </tr> </tbody> </table> <h2>攻击模式枚举值 (attackMode)</h2> <table> <thead> <tr> <th>值</th> <th>模式名称</th> <th>描述</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>Suicide</td> <td>自杀式</td> </tr> <tr> <td>2</td> <td>FixedPointDrop</td> <td>定点抛投</td> </tr> <tr> <td>3</td> <td>CarpetDrop</td> <td>地毯式抛投</td> </tr> </tbody> </table> <h2>攻击后行为枚举值 (attackAfterBehavior)</h2> <table> <thead> <tr> <th>值</th> <th>行为名称</th> <th>描述</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>Lock</td> <td>上锁</td> </tr> <tr> <td>6</td> <td>Return</td> <td>返航</td> </tr> <tr> <td>9</td> <td>Land</td> <td>降落</td> </tr> </tbody> </table> <h2>失连返航策略枚举值 (lostReturn)</h2> <table> <thead> <tr> <th>值</th> <th>策略名称</th> <th>描述</th> </tr> </thead> <tbody> <tr> <td>0</td> <td>Disabled</td> <td>关闭失联返航</td> </tr> <tr> <td>1</td> <td>ReturnAllModes</td> <td>所有模式都返航</td> </tr> <tr> <td>2</td> <td>ReturnExceptAuto</td> <td>除自动模式外,其他模式都返航</td> </tr> </tbody> </table> <h2>低电量动作枚举值 (lowBatteryBehavior)</h2> <table> <thead> <tr> <th>值</th> <th>动作名称</th> <th>描述</th> </tr> </thead> <tbody> <tr> <td>0</td> <td>Disabled</td> <td>关闭低压保护</td> </tr> <tr> <td>1</td> <td>Land</td> <td>降落</td> </tr> <tr> <td>2</td> <td>Return</td> <td>返航</td> </tr> </tbody> </table> <h2>吊舱切换类型枚举值 (podSwitchingType)</h2> <table> <thead> <tr> <th>值</th> <th>类型名称</th> <th>描述</th> </tr> </thead> <tbody> <tr> <td>0</td> <td>MANUAL_SWITCH</td> <td>手动切换</td> </tr> <tr> <td>1</td> <td>AUTO_SWITCH</td> <td>自动切换</td> </tr> </tbody> </table> <h2>数据异常说明</h2> <h2>结构优化说明</h2> <h3>2024年结构优化变更</h3> <p><strong>变更内容</strong>:</p> <ul> <li>将原来的嵌套结构 <code>baseInfo</code> 和 <code>status</code> 合并为平铺结构</li> <li>添加了 <code>hasBaseInfo</code> 和 <code>hasStatusInfo</code> 字段来标识数据有效性</li> <li>简化了JSON结构,提高了数据访问效率</li> <li><strong>统一属性命名</strong>:与单机DroneStatus保持一致的字段命名和说明</li> </ul> <p><strong>属性命名统一变更</strong>:</p> <p><strong>整体状态字段</strong>:</p> <ul> <li><code>healthStatus</code> → <code>health_status</code> (健康状态)</li> <li><code>controlObjectType</code> → <code>control_object_type</code> (控制对象类型)</li> <li><code>selectedUavId</code> → <code>selected_uav_id</code> (选中无人机ID)</li> <li><code>selectedTeamId</code> → <code>selected_team_id</code> (选中队伍ID)</li> <li><code>podSwitchingType</code> → <code>pod_switching_type</code> (吊舱切换类型)</li> <li><code>selectedPodId</code> → <code>selected_pod_id</code> (选中吊舱ID)</li> </ul> <p><strong>队伍信息字段</strong>:</p> <ul> <li><code>teamId</code> → <code>team_id</code> (队伍ID)</li> </ul> <p><strong>无人机信息字段</strong>:</p> <ul> <li><code>altitude</code> → <code>asl</code> (海拔高度)</li> <li><code>relativeAlt</code> → <code>alt</code> (相对高度)</li> <li><code>mode</code> → <code>flight_mode</code> (飞行模式)</li> <li><code>groundSpeed</code> → <code>horizontal_speed</code> (水平速度)</li> <li><code>verticalSpeed</code> → <code>vertical_speed</code> (垂直速度)</li> <li><code>batteryPercentage</code> → <code>battery_remaining</code> (电池剩余百分比)</li> <li><code>voltage</code> → <code>battery_voltage</code> (电池电压)</li> <li><code>satcount</code> → <code>satellites_visible</code> (GPS卫星数)</li> <li><code>linkQuality</code> → <code>signal_strength</code> (信号强度)</li> <li><code>isArmed</code> → <code>armed</code> (是否已解锁)</li> <li><code>isTakeoff</code> → <code>landed_state</code> (是否正在飞行)</li> <li><code>isLeader</code> → <code>is_leader</code> (是否队长)</li> <li><code>isOnline</code> → <code>is_online</code> (是否在线)</li> <li><code>attitudeControlHealthy</code> → <code>attitude_control_healthy</code> (姿态控制健康)</li> <li><code>attackMode</code> → <code>attack_mode</code> (攻击模式)</li> <li><code>attackAfterBehavior</code> → <code>attack_after_behavior</code> (攻击后行为)</li> <li><code>lostReturn</code> → <code>lost_return</code> (失连返航策略)</li> <li><code>lowBatteryBehavior</code> → <code>low_battery_behavior</code> (低电量动作)</li> <li><code>hasBaseInfo</code> → <code>has_base_info</code> (是否有基础信息)</li> <li><code>hasStatusInfo</code> → <code>has_status_info</code> (是否有状态信息)</li> </ul> <p><strong>新增字段</strong>:</p> <ul> <li><code>home_latitude</code> (返航点纬度)</li> <li><code>home_longitude</code> (返航点经度)</li> </ul> <p><strong>变更前</strong>:</p> <pre><code class="language-json">{ &amp;quot;baseInfo&amp;quot;: { /* 基础信息 */ }, &amp;quot;status&amp;quot;: { /* 状态信息 */ }, &amp;quot;isOnline&amp;quot;: 1 }</code></pre> <p><strong>变更后</strong>:</p> <pre><code class="language-json">{ /* 所有字段平铺,与单机DroneStatus命名保持一致,使用下划线命名规则 */ &amp;quot;sn&amp;quot;: &amp;quot;1&amp;quot;, &amp;quot;latitude&amp;quot;: 22.4115285, &amp;quot;asl&amp;quot;: 0.07, &amp;quot;alt&amp;quot;: 0.0, &amp;quot;team_id&amp;quot;: 1, &amp;quot;flight_mode&amp;quot;: 81, &amp;quot;is_leader&amp;quot;: 0, &amp;quot;horizontal_speed&amp;quot;: 0.0, &amp;quot;vertical_speed&amp;quot;: 0.0, &amp;quot;battery_remaining&amp;quot;: 0, &amp;quot;battery_voltage&amp;quot;: 0.0, &amp;quot;satellites_visible&amp;quot;: 0, &amp;quot;signal_strength&amp;quot;: 0, &amp;quot;attitude_control_healthy&amp;quot;: 1, &amp;quot;home_latitude&amp;quot;: 0.0, &amp;quot;home_longitude&amp;quot;: 0.0, &amp;quot;armed&amp;quot;: false, &amp;quot;landed_state&amp;quot;: false, &amp;quot;is_online&amp;quot;: 1, &amp;quot;attack_mode&amp;quot;: 1, &amp;quot;attack_after_behavior&amp;quot;: 6, &amp;quot;lost_return&amp;quot;: 1, &amp;quot;low_battery_behavior&amp;quot;: 1, &amp;quot;has_base_info&amp;quot;: true, &amp;quot;has_status_info&amp;quot;: true }</code></pre>

页面列表

ITEM_HTML