一些技术路线测试,增加git,方便代码还原
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>无人机飞行轨迹回放系统</title>
    <!-- CesiumJS -->
    <script src="https://cesium.com/downloads/cesiumjs/releases/1.131/Build/Cesium/Cesium.js"></script>
    <link href="https://cesium.com/downloads/cesiumjs/releases/1.131/Build/Cesium/Widgets/widgets.css" rel="stylesheet">
    
    <!-- 轨迹回放系统 -->
    <script src="trajectory-playback.js"></script>
    
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
 
        html, body {
            width: 100%;
            height: 100%;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            overflow: hidden;
            background: #000;
        }
 
        /* Cesium地图容器 - 全屏铺底 */
        #cesiumContainer {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 1;
        }
 
        /* 播放控制面板 */
        .playback-controls {
            position: absolute;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(0, 0, 0, 0.9);
            backdrop-filter: blur(10px);
            border-radius: 20px;
            padding: 20px;
            z-index: 1000;
            display: flex;
            flex-direction: column;
            gap: 15px;
            min-width: 600px;
            border: 2px solid rgba(255, 255, 255, 0.2);
        }
 
        /* 播放按钮组 */
        .play-buttons {
            display: flex;
            gap: 10px;
            justify-content: center;
            align-items: center;
        }
 
        .play-btn {
            width: 50px;
            height: 50px;
            border: none;
            border-radius: 50%;
            background: linear-gradient(135deg, #3498db, #2980b9);
            color: white;
            font-size: 20px;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
        }
 
        .play-btn:hover {
            transform: scale(1.1);
            box-shadow: 0 4px 15px rgba(52, 152, 219, 0.5);
        }
 
        .play-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none !important;
        }
 
        .play-btn.active {
            background: linear-gradient(135deg, #27ae60, #229954);
        }
 
        /* 进度条容器 */
        .progress-container {
            display: flex;
            align-items: center;
            gap: 15px;
            color: white;
        }
 
        .progress-bar {
            flex: 1;
            height: 8px;
            background: rgba(255, 255, 255, 0.3);
            border-radius: 4px;
            position: relative;
            cursor: pointer;
        }
 
        .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, #3498db, #27ae60);
            border-radius: 4px;
            width: 0%;
            transition: width 0.1s ease;
        }
 
        .progress-handle {
            position: absolute;
            top: 50%;
            transform: translate(-50%, -50%);
            width: 16px;
            height: 16px;
            background: white;
            border-radius: 50%;
            cursor: pointer;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
            left: 0%;
        }
 
        /* 时间显示 */
        .time-display {
            font-size: 14px;
            color: rgba(255, 255, 255, 0.8);
            min-width: 120px;
            text-align: center;
        }
 
        /* 速度控制 */
        .speed-control {
            display: flex;
            align-items: center;
            gap: 10px;
            color: white;
            font-size: 14px;
        }
 
        .speed-select {
            background: rgba(255, 255, 255, 0.2);
            border: 1px solid rgba(255, 255, 255, 0.3);
            border-radius: 6px;
            color: white;
            padding: 5px 10px;
            outline: none;
        }
 
        /* 信息面板 */
        .info-panel {
            position: absolute;
            top: 20px;
            right: 20px;
            width: 350px;
            background: rgba(0, 0, 0, 0.9);
            backdrop-filter: blur(10px);
            border-radius: 15px;
            padding: 20px;
            color: white;
            z-index: 1000;
            border: 2px solid rgba(255, 255, 255, 0.2);
        }
 
        .info-title {
            font-size: 18px;
            font-weight: 600;
            margin-bottom: 15px;
            text-align: center;
            color: #3498db;
        }
 
        .info-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
            margin-bottom: 15px;
        }
 
        .info-item {
            text-align: center;
        }
 
        .info-label {
            font-size: 11px;
            color: rgba(255, 255, 255, 0.6);
            margin-bottom: 4px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
 
        .info-value {
            font-size: 14px;
            font-weight: 600;
            color: white;
        }
 
        /* 视频预览 */
        .video-preview {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 10px;
            padding: 10px;
            text-align: center;
            min-height: 150px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            border: 1px solid rgba(255, 255, 255, 0.2);
        }
 
        .video-frame {
            max-width: 100%;
            max-height: 120px;
            border-radius: 6px;
            object-fit: cover;
        }
 
        .video-placeholder {
            color: rgba(255, 255, 255, 0.6);
            font-size: 12px;
        }
 
        /* 状态指示器 */
        .status-bar {
            position: absolute;
            top: 20px;
            left: 20px;
            display: flex;
            gap: 10px;
            z-index: 1000;
        }
 
        .status-item {
            background: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(10px);
            border-radius: 15px;
            padding: 8px 15px;
            color: white;
            font-size: 13px;
            border: 1px solid rgba(255, 255, 255, 0.2);
        }
 
        /* 加载动画 */
        .loading {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            z-index: 2000;
            text-align: center;
            color: white;
        }
 
        .loading-spinner {
            width: 40px;
            height: 40px;
            border: 4px solid rgba(255, 255, 255, 0.3);
            border-radius: 50%;
            border-top-color: #3498db;
            animation: spin 1s ease-in-out infinite;
            margin: 0 auto 20px;
        }
 
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
 
 
 
        /* 响应式设计 */
        @media (max-width: 768px) {
            .playback-controls {
                min-width: 90%;
                left: 5%;
                transform: none;
            }
            
            .info-panel {
                width: 280px;
                top: 10px;
                right: 10px;
                padding: 15px;
            }
        }
    </style>
</head>
<body>
    <!-- 加载提示 -->
    <div class="loading" id="loadingIndicator">
        <div class="loading-spinner"></div>
        <div>正在加载飞行轨迹数据...</div>
    </div>
 
    <!-- Cesium地图容器 -->
    <div id="cesiumContainer"></div>
 
    <!-- 状态栏 -->
    <div class="status-bar">
        <div class="status-item" id="statusDisplay">
            📊 准备加载轨迹数据
        </div>
    </div>
 
 
 
    <!-- 信息面板 -->
    <div class="info-panel">
        <div class="info-title">🚁 飞行数据</div>
        
        <div class="info-grid">
            <div class="info-item">
                <div class="info-label">纬度</div>
                <div class="info-value" id="latitude">-</div>
            </div>
            <div class="info-item">
                <div class="info-label">经度</div>
                <div class="info-value" id="longitude">-</div>
            </div>
            <div class="info-item">
                <div class="info-label">海拔</div>
                <div class="info-value" id="altitude">-</div>
            </div>
            <div class="info-item">
                <div class="info-label">航向角</div>
                <div class="info-value" id="heading">-</div>
            </div>
            <div class="info-item">
                <div class="info-label">俯仰角</div>
                <div class="info-value" id="pitch">-</div>
            </div>
            <div class="info-item">
                <div class="info-label">横滚角</div>
                <div class="info-value" id="roll">-</div>
            </div>
            <div class="info-item">
                <div class="info-label">云台俯仰</div>
                <div class="info-value" id="gimbalPitch">-</div>
            </div>
            <div class="info-item">
                <div class="info-label">云台偏航</div>
                <div class="info-value" id="gimbalYaw">-</div>
            </div>
            <div class="info-item">
                <div class="info-label">云台横滚</div>
                <div class="info-value" id="gimbalRoll">-</div>
            </div>
        </div>
 
        <div class="video-preview">
            <div class="video-placeholder" id="videoPlaceholder">
                <div>📹 视频帧预览</div>
                <div style="font-size: 10px; margin-top: 5px;">等待播放...</div>
            </div>
            <img class="video-frame" id="videoFrame" style="display: none;" alt="当前视频帧">
        </div>
    </div>
 
    <!-- 播放控制面板 -->
    <div class="playback-controls">
        <div class="play-buttons">
            <button class="play-btn" id="prevBtn" onclick="previousFrame()" title="上一帧">⏮</button>
            <button class="play-btn" id="playBtn" onclick="togglePlayback()" title="播放/暂停">▶</button>
            <button class="play-btn" id="nextBtn" onclick="nextFrame()" title="下一帧">⏭</button>
        </div>
        
        <div class="progress-container">
            <div class="time-display" id="timeDisplay">0 / 0</div>
            <div class="progress-bar" id="progressBar" onclick="seekToPosition(event)">
                <div class="progress-fill" id="progressFill"></div>
                <div class="progress-handle" id="progressHandle"></div>
            </div>
            <div class="speed-control">
                <span>速度:</span>
                <select class="speed-select" id="speedSelect" onchange="changePlaybackSpeed()">
                    <option value="0.5">0.5x</option>
                    <option value="1" selected>1x</option>
                    <option value="2">2x</option>
                    <option value="4">4x</option>
                    <option value="8">8x</option>
                </select>
            </div>
        </div>
    </div>
</body>
</html>