<!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="uav_mapping.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;
|
}
|
|
/* 状态指示器 */
|
.status-bar {
|
position: absolute;
|
top: 20px;
|
left: 20px;
|
display: flex;
|
gap: 10px;
|
z-index: 1000;
|
}
|
|
/* 播放按钮组 */
|
.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) {
|
.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>
|
|
</body>
|
</html>
|