日志回放
<p>[TOC]</p>
<h4>日志管理</h4>
<h5>分页获取飞行记录 (getFlightRecords)</h5>
<ol>
<li>服务描述 </li>
</ol>
<table>
<thead>
<tr>
<th>参数</th>
<th>类型</th>
<th>描述</th>
<th>是否必传</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>page</td>
<td>int</td>
<td>- 页码</td>
<td>是</td>
<td></td>
</tr>
<tr>
<td>pageSize</td>
<td>int</td>
<td>-页码大小</td>
<td>是</td>
<td></td>
</tr>
<tr>
<td>keyword</td>
<td>int `</td>
<td>模糊查询</td>
<td>是</td>
<td></td>
</tr>
</tbody>
</table>
<p>示例请求</p>
<pre><code class="language-json">{
&quot;tid&quot;: &quot;1234567890&quot;,
&quot;bid&quot;: &quot;9876543210&quot;,
&quot;method&quot;: &quot;getFlightRecords&quot;,
&quot;data&quot;: {
&quot;custom&quot;: {
&quot;page&quot;: 1,
&quot;pageSize&quot;: 5,
&quot;keyword&quot;: &quot;&quot;
}
},
&quot;timestamp&quot;: 1700000000000
}</code></pre>
<ol>
<li>响应格式
响应消息中包含服务调用的结果,包括返回码和错误信息(如果有的话)。
示例响应</li>
</ol>
<pre><code class="language-json">{
&quot;bid&quot;: &quot;9876543210&quot;,
&quot;code&quot;: 0,
&quot;data&quot;: {
&quot;page&quot;: 1,
&quot;pageSize&quot;: 5,
&quot;records&quot;: [
{
&quot;distance&quot;: 1446.2879638671875,
&quot;droneId&quot;: &quot;DRONE_17170238699647056262&quot;,
&quot;duration&quot;: 167,
&quot;endTime&quot;: &quot;1755663485&quot;,
&quot;itemId&quot;: 16,
&quot;maxAltitude&quot;: 0.0,
&quot;maxSpeed&quot;: 8.0,
&quot;note&quot;: &quot;&quot;,
&quot;startTime&quot;: &quot;1755663317&quot;,
&quot;status&quot;: 1
},
{
&quot;distance&quot;: 1446.2879638671875,
&quot;droneId&quot;: &quot;DRONE_17170238699647056262&quot;,
&quot;duration&quot;: 167,
&quot;endTime&quot;: &quot;1755663485&quot;,
&quot;itemId&quot;: 16,
&quot;maxAltitude&quot;: 0.0,
&quot;maxSpeed&quot;: 8.0,
&quot;note&quot;: &quot;&quot;,
&quot;startTime&quot;: &quot;1755663317&quot;,
&quot;status&quot;: 1
},
{
&quot;distance&quot;: 1446.2879638671875,
&quot;droneId&quot;: &quot;DRONE_17170238699647056262&quot;,
&quot;duration&quot;: 167,
&quot;endTime&quot;: &quot;1755663485&quot;,
&quot;itemId&quot;: 16,
&quot;maxAltitude&quot;: 0.0,
&quot;maxSpeed&quot;: 8.0,
&quot;note&quot;: &quot;&quot;,
&quot;startTime&quot;: &quot;1755663317&quot;,
&quot;status&quot;: 1
},
{
&quot;distance&quot;: 1446.2879638671875,
&quot;droneId&quot;: &quot;DRONE_17170238699647056262&quot;,
&quot;duration&quot;: 167,
&quot;endTime&quot;: &quot;1755663485&quot;,
&quot;itemId&quot;: 16,
&quot;maxAltitude&quot;: 0.0,
&quot;maxSpeed&quot;: 8.0,
&quot;note&quot;: &quot;&quot;,
&quot;startTime&quot;: &quot;1755663317&quot;,
&quot;status&quot;: 1
},
{
&quot;distance&quot;: 1446.2879638671875,
&quot;droneId&quot;: &quot;DRONE_17170238699647056262&quot;,
&quot;duration&quot;: 167,
&quot;endTime&quot;: &quot;1755663485&quot;,
&quot;itemId&quot;: 16,
&quot;maxAltitude&quot;: 0.0,
&quot;maxSpeed&quot;: 8.0,
&quot;note&quot;: &quot;&quot;,
&quot;startTime&quot;: &quot;1755663317&quot;,
&quot;status&quot;: 1
}
],
&quot;total&quot;: 9,
&quot;totalPages&quot;: 2
},
&quot;message&quot;: &quot;success&quot;,
&quot;tid&quot;: &quot;1234567890&quot;,
&quot;timestamp&quot;: 1755760883126
}</code></pre>
<h5>飞行统计 (getFlightStatistics)</h5>
<ol>
<li>服务描述 </li>
</ol>
<p>示例请求</p>
<pre><code class="language-json">{
&quot;tid&quot;: &quot;1234567890&quot;,
&quot;bid&quot;: &quot;9876543210&quot;,
&quot;method&quot;: &quot;getFlightStatistics&quot;,
&quot;data&quot;: {
},
&quot;timestamp&quot;: 1700000000000
}
</code></pre>
<ol>
<li>响应格式
响应消息中包含服务调用的结果,包括返回码和错误信息(如果有的话)。
示例响应</li>
</ol>
<pre><code class="language-json">{
&quot;bid&quot;: &quot;9876543210&quot;,
&quot;code&quot;: 0,
&quot;data&quot;: {
&quot;averageDistance&quot;: 1325.6395263671875,
&quot;averageDuration&quot;: 167,
&quot;maxAltitude&quot;: 50.01100158691406,
&quot;maxSpeed&quot;: 9.300000190734863,
&quot;totalDistance&quot;: 11930.755859375,
&quot;totalDuration&quot;: 1504,
&quot;totalFlights&quot;: 9
},
&quot;message&quot;: &quot;success&quot;,
&quot;tid&quot;: &quot;1234567890&quot;,
&quot;timestamp&quot;: 1755762971857
}</code></pre>
<table>
<thead>
<tr>
<th>指标 (Metric)</th>
<th>数值 (Value)</th>
<th>单位 (Unit)</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>飞行距离</strong></td>
<td>1325.64</td>
<td>米</td>
</tr>
<tr>
<td><strong>飞行时长</strong></td>
<td>167</td>
<td>秒</td>
</tr>
<tr>
<td><strong>最大飞行高度</strong></td>
<td>50.01</td>
<td>米</td>
</tr>
<tr>
<td><strong>最大飞行速度</strong></td>
<td>9.30</td>
<td>米/秒</td>
</tr>
<tr>
<td><strong>总飞行距离</strong></td>
<td>11930.76</td>
<td>米</td>
</tr>
<tr>
<td><strong>总飞行时长</strong></td>
<td>1504</td>
<td>秒</td>
</tr>
<tr>
<td><strong>总飞行次数</strong></td>
<td>9</td>
<td>次</td>
</tr>
</tbody>
</table>
<h5>提取飞行轨迹 (extractFlightTrajectoryHybrid)</h5>
<ol>
<li>服务描述 </li>
</ol>
<table>
<thead>
<tr>
<th>参数</th>
<th>类型</th>
<th>描述</th>
<th>是否必传</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>recordId</td>
<td>int</td>
<td>飞行任务id</td>
<td>是</td>
<td></td>
</tr>
</tbody>
</table>
<p>示例请求</p>
<pre><code class="language-json">{
&quot;tid&quot;: &quot;1234567890&quot;,
&quot;bid&quot;: &quot;9876543210&quot;,
&quot;method&quot;: &quot;extractFlightTrajectoryHybrid&quot;,
&quot;data&quot;: {
&quot;custom&quot;: {
&quot;recordId&quot;:18
}
},
&quot;timestamp&quot;: 1700000000000
}
</code></pre>
<ol>
<li>响应格式
响应消息中包含服务调用的结果,包括返回码和错误信息(如果有的话)。
示例响应</li>
</ol>
<pre><code class="language-json">{
&quot;bid&quot;: &quot;9876543210&quot;,
&quot;message&quot;: &quot;success&quot;,
&quot;tid&quot;: &quot;1234567890&quot;,
&quot;timestamp&quot;: 1755769419316,
&quot;code&quot;: 0,
&quot;data&quot;: {
&quot;pointCount&quot;: 207,
&quot;recordId&quot;: 18,
&quot;trajectory&quot;: [
{
&quot;altitude&quot;: 0.0,
&quot;battery&quot;: 0.0,
&quot;latitude&quot;: 22.324352264404297,
&quot;longitude&quot;: 113.5496826171875,
&quot;pitch&quot;: 0.2132415771484375,
&quot;roll&quot;: 0.074127197265625,
&quot;speed&quot;: 0.0,
&quot;timestamp&quot;: 1755669229,
&quot;yaw&quot;: 87.49689483642578
}
]
}
}</code></pre>
<h5>删除飞行记录 (deleteFlightRecord)</h5>
<ol>
<li>服务描述 </li>
</ol>
<table>
<thead>
<tr>
<th>参数</th>
<th>类型</th>
<th>描述</th>
<th>是否必传</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>recordId</td>
<td>int</td>
<td>飞行任务id</td>
<td>是</td>
<td></td>
</tr>
</tbody>
</table>
<p>示例请求</p>
<pre><code class="language-json">{
&quot;tid&quot;: &quot;1234567890&quot;,
&quot;bid&quot;: &quot;9876543210&quot;,
&quot;method&quot;: &quot;deleteFlightRecord&quot;,
&quot;data&quot;: {
&quot;custom&quot;: {
&quot;recordIds&quot;:[1,2]
}
},
&quot;timestamp&quot;: 1700000000000
}
</code></pre>
<ol>
<li>响应格式
响应消息中包含服务调用的结果,包括返回码和错误信息(如果有的话)。
示例响应</li>
</ol>
<pre><code class="language-json">{
&quot;bid&quot;: &quot;9876543210&quot;,
&quot;message&quot;: &quot;success&quot;,
&quot;tid&quot;: &quot;1234567890&quot;,
&quot;timestamp&quot;: 1755769419316,
&quot;code&quot;: 0,
&quot;data&quot;: {
&quot;pointCount&quot;: 207,
&quot;recordId&quot;: 18,
&quot;trajectory&quot;: [
{
&quot;altitude&quot;: 0.0,
&quot;battery&quot;: 0.0,
&quot;latitude&quot;: 22.324352264404297,
&quot;longitude&quot;: 113.5496826171875,
&quot;pitch&quot;: 0.2132415771484375,
&quot;roll&quot;: 0.074127197265625,
&quot;speed&quot;: 0.0,
&quot;timestamp&quot;: 1755669229,
&quot;yaw&quot;: 87.49689483642578
}
]
}
}</code></pre>
<h5>飞行回放控制 (flightReplayControl)</h5>
<ol>
<li>服务描述
该服务用于控制飞行航线的历史回放功能,可以实现开始、暂停、继续、停止回放,以及调整回放速度等操作。</li>
</ol>
<table>
<thead>
<tr>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th style="text-align: center;">必选</th>
<th style="text-align: left;">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">action</td>
<td style="text-align: left;">string</td>
<td style="text-align: center;">是</td>
<td style="text-align: left;">控制指令。可选值: start\pause \resume\stop</td>
</tr>
<tr>
<td style="text-align: left;">recordId</td>
<td style="text-align: left;">long</td>
<td style="text-align: center;">是</td>
<td style="text-align: left;">要回放的飞行记录ID。</td>
</tr>
<tr>
<td style="text-align: left;">speed</td>
<td style="text-align: left;">float</td>
<td style="text-align: center;">否</td>
<td style="text-align: left;">回放速度,默认为 <code>1.0</code>。</td>
</tr>
<tr>
<td style="text-align: left;">startTime</td>
<td style="text-align: left;">long</td>
<td style="text-align: center;">是</td>
<td style="text-align: left;">回放起始时间点(13位毫秒时间戳),仅在 <code>action</code> 为 <code>start</code> 时生效。</td>
</tr>
</tbody>
</table>
<pre><code class="language-json">{
&quot;tid&quot;: &quot;1234567890&quot;,
&quot;bid&quot;: &quot;9876543210&quot;,
&quot;method&quot;: &quot;flightReplayControl&quot;,
&quot;timestamp&quot;: 1700000000000,
&quot;data&quot;: {
&quot;custom&quot;: {
&quot;action&quot;: &quot;start&quot;,
&quot;recordId&quot;: 1001,
&quot;speed&quot;: 1.0,
&quot;loop&quot;: false,
&quot;startTime&quot;: 1700000000000
}
}
}</code></pre>
<ol>
<li>响应格式
服务端持续相应数据
示例响应</li>
</ol>
<pre><code class="language-json">{
&quot;bid&quot;: &quot;xxx&quot;,
&quot;method&quot;: &quot;reportProperties&quot;,
&quot;tid&quot;: &quot;xxx&quot;,
&quot;timestamp&quot;: 1756257912754,
&quot;data&quot;: {
&quot;properties&quot;: {
&quot;source&quot;: &quot;replay&quot;,
&quot;itemId&quot;: 12345,
&quot;flightRecordId&quot;: 1001,
&quot;timestamp&quot;: 1698765432000,
// 位置与高度
&quot;latitude&quot;: 39.9087,
&quot;longitude&quot;: 116.3975,
&quot;altitude&quot;: 100.5,
&quot;rel_alt&quot;: 95.2,
&quot;asl&quot;: 101.3,
&quot;alt&quot;: 95.2,
&quot;relative_alt&quot;: 95.2,
// 姿态角
&quot;roll&quot;: 0.5,
&quot;pitch&quot;: -1.2,
&quot;yaw&quot;: 90.0,
// 电池信息
&quot;battery_voltage&quot;: 25.2,
&quot;battery_current&quot;: 12.5,
&quot;battery_remaining&quot;: 85.0,
// 飞行信息
&quot;horizontal_speed&quot;: 5.2,
&quot;vertical_speed&quot;: 0.3,
&quot;satellites_visible&quot;: 15,
&quot;fly_time&quot;: 120,
&quot;fly_distance&quot;: 520.5,
// 动力系统
&quot;main_rpm&quot;: 3500.0,
&quot;tail_rpm&quot;: 3200.0,
&quot;main_power&quot;: 1500.5,
&quot;tail_power&quot;: 850.2,
&quot;main_current&quot;: 45.2,
&quot;tail_current&quot;: 25.8,
&quot;main_temp&quot;: 45.5,
&quot;tail_temp&quot;: 42.3,
// 通信与导航状态
&quot;signal_strength&quot;: 85,
&quot;ekf&quot;: &quot;velocityVariance:0.05&quot;,
&quot;vibration&quot;: &quot;x:0.1,y:0.2,z:0.15&quot;,
// 控制信息
&quot;gohome_altitude&quot;: 50.0,
&quot;flight_mode&quot;: 0,
// RC遥感值(新增)⭐
&quot;rc_x&quot;: 500,
&quot;rc_y&quot;: -200,
&quot;rc_z&quot;: 800,
&quot;rc_r&quot;: 100,
// 指令信息(新增)⭐
&quot;commandType&quot;: &quot;takeoff&quot;,
&quot;commandContent&quot;: &quot;{\&quot;method\&quot;:\&quot;takeoff\&quot;,\&quot;data\&quot;:{\&quot;altitude\&quot;:50}}&quot;,
&quot;data&quot;: &quot;&quot;
}
}
}</code></pre>