feat: routes /map /nav — Leaflet GPS/USBL + Chart.js depth viewer

This commit is contained in:
Ubuntu
2026-04-25 16:02:01 +00:00
parent 8ef1c3d8a6
commit 276c850893
5 changed files with 253 additions and 0 deletions

36
viz/templates/map.html Normal file
View File

@@ -0,0 +1,36 @@
<!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8">
<title>COSMA NAV — Carte</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css">
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: #0d1f0d; color: #ccc; font-family: monospace; }
header { padding: 8px 16px; background: #0a140a; border-bottom: 1px solid #4ade80;
display: flex; align-items: center; gap: 16px; height: 44px; }
header h1 { color: #4ade80; font-size: 1rem; }
header a { color: #60a5fa; font-size: 0.85rem; text-decoration: none; }
header a:hover { color: #93c5fd; }
select { background: #1a2a1a; color: #ccc; border: 1px solid #4ade80;
border-radius: 3px; padding: 2px 8px; font-family: monospace; }
#map { height: calc(100vh - 44px); }
#status { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
background: rgba(0,0,0,0.7); color: #4ade80; padding: 4px 12px;
border-radius: 4px; font-size: 0.8rem; z-index: 1000; }
</style>
</head>
<body>
<header>
<h1>COSMA NAV — Carte GPS</h1>
<select id="job-select"><option value="">-- job --</option></select>
<a href="/trajectory">3D &#8599;</a>
<a href="/nav">Graphes &#8599;</a>
</header>
<div id="map"></div>
<div id="status">Chargement...</div>
<script src="/static/js/map.js"></script>
</body>
</html>

36
viz/templates/nav.html Normal file
View File

@@ -0,0 +1,36 @@
<!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8">
<title>COSMA NAV — Données nav</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.0/dist/chart.umd.min.js"></script>
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: #0d1f0d; color: #ccc; font-family: monospace; }
header { padding: 8px 16px; background: #0a140a; border-bottom: 1px solid #4ade80;
display: flex; align-items: center; gap: 16px; height: 44px; }
header h1 { color: #4ade80; font-size: 1rem; }
header a { color: #60a5fa; font-size: 0.85rem; text-decoration: none; }
select { background: #1a2a1a; color: #ccc; border: 1px solid #4ade80;
border-radius: 3px; padding: 2px 8px; font-family: monospace; }
.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 16px;
height: calc(100vh - 60px); }
.chart-box { background: #0a1a0a; border-radius: 6px; border: 1px solid #1f3a1f; padding: 8px; }
canvas { max-height: 100%; }
</style>
</head>
<body>
<header>
<h1>COSMA NAV — Navigation</h1>
<select id="job-select"><option value="">-- job --</option></select>
<a href="/map">Carte &#8599;</a>
<a href="/trajectory">3D &#8599;</a>
</header>
<div class="charts">
<div class="chart-box"><canvas id="chart-xy"></canvas></div>
<div class="chart-box"><canvas id="chart-z"></canvas></div>
</div>
<script src="/static/js/nav_charts.js"></script>
</body>
</html>