Files
cosma-nav/viz/static/trajectory.html

84 lines
3.3 KiB
HTML

<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<title>COSMA NAV — Trajectory Viewer</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: #06060f; color: #ccc; font-family: 'Courier New', monospace;
display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
#viewer { position: relative; flex: 0 0 62vh; }
#viewer canvas { display: block; width: 100% !important; height: 100% !important; }
#legend {
position: absolute; top: 14px; left: 14px;
background: rgba(4,4,16,0.88); padding: 12px 16px;
border-radius: 8px; border: 1px solid #223;
font-size: 11px; min-width: 170px; backdrop-filter: blur(4px); z-index: 10;
}
#legend h3 { color: #8af; margin-bottom: 8px; font-size: 12px; letter-spacing: 1px; }
#legend label { display: flex; align-items: center; gap: 7px; cursor: pointer; margin: 4px 0; user-select: none; }
.swatch { width: 9px; height: 9px; border-radius: 2px; flex-shrink: 0; }
#status {
position: absolute; top: 14px; right: 14px;
background: rgba(4,4,16,0.88); padding: 6px 12px;
border-radius: 6px; font-size: 10px; color: #67d;
backdrop-filter: blur(4px); border: 1px solid #223; z-index: 10;
}
#info {
position: absolute; bottom: 8px; left: 14px;
background: rgba(4,4,16,0.75); padding: 5px 10px;
border-radius: 5px; font-size: 10px; color: #89a; z-index: 10;
}
#chart-panel {
flex: 1; background: #08080f; border-top: 1px solid #1a1a2e;
padding: 10px 16px 8px; display: flex; flex-direction: column;
}
#chart-title {
font-size: 10px; color: #556; letter-spacing: 1px; text-transform: uppercase;
margin-bottom: 6px;
}
#depth-chart { flex: 1; width: 100%; }
</style>
</head>
<body>
<div id="viewer">
<div id="legend">
<h3>COSMA NAV</h3>
<label><input type="checkbox" checked data-layer="usv_gps">
<span class="swatch" style="background:#3a9fff"></span>USV GPS</label>
<label><input type="checkbox" checked data-layer="auv_usbl">
<span class="swatch" style="background:#44ffaa"></span>AUV (USBL)</label>
<label><input type="checkbox" checked data-layer="fused">
<span class="swatch" style="background:#ffffff"></span>Fused world</label>
<label><input type="checkbox" checked data-layer="lingbot_local">
<span class="swatch" style="background:#ffd700"></span>lingbot local</label>
<label><input type="checkbox" checked data-layer="frustums">
<span class="swatch" style="background:#ffd70066"></span>Frustums</label>
<label><input type="checkbox" checked data-layer="ply">
<span class="swatch" style="background:#556"></span>Point cloud</label>
</div>
<div id="status">Loading&hellip;</div>
<div id="info">Orbit: drag &middot; Zoom: scroll &middot; Pan: right-drag</div>
</div>
<div id="chart-panel">
<div id="chart-title">AUV — Depth &amp; Altitude Profile</div>
<canvas id="depth-chart"></canvas>
</div>
<script type="importmap">
{"imports":{
"three":"https://cdn.jsdelivr.net/npm/three@0.160/build/three.module.js",
"three/addons/":"https://cdn.jsdelivr.net/npm/three@0.160/examples/jsm/"
}}
</script>
<script src="https://cdn.jsdelivr.net/npm/chart.js@4.4/dist/chart.umd.min.js"></script>
<script type="module" src="/static/js/scene.js"></script>
</body>
</html>