Files
rtk-rover/web/templates/index.html
T

101 lines
3.3 KiB
HTML

<!doctype html>
<html lang="de">
<head>
<meta charset="utf-8">
<title>RTK Rover DB</title>
<meta http-equiv="refresh" content="10">
<style>
body { font-family: sans-serif; margin: 2rem; background: #f6f6f6; }
h1 { margin-top: 0; }
.card { background: white; padding: 1rem; border-radius: 10px; margin-bottom: 1rem; box-shadow: 0 1px 5px #ccc; }
table { width: 100%; border-collapse: collapse; background: white; }
th, td { padding: .45rem; border-bottom: 1px solid #ddd; font-size: .9rem; }
th { text-align: left; background: #eee; }
.fix { color: green; font-weight: bold; }
.float { color: orange; font-weight: bold; }
select, button, input { padding: .45rem; margin-right: .3rem; }
.btn-start { background: #1f8f3a; color: white; border: 0; border-radius: 6px; }
.btn-stop { background: #b3261e; color: white; border: 0; border-radius: 6px; }
.status-on { color: green; font-weight: bold; }
.status-off { color: #777; font-weight: bold; }
</style>
</head>
<body>
<h1>RTK Rover Datenbank</h1>
<div class="card">
{% if active_session %}
<div class="status-on">● Recording aktiv seit {{active_session.start_time}} | {{active_session.session_id[:8]}}</div>
{% else %}
<div class="status-off">● Recording gestoppt</div>
{% endif %}
<br>
<form method="post" action="/record/start" style="display:inline">
<button class="btn-start" type="submit">Start</button>
</form>
<form method="post" action="/record/stop" style="display:inline">
<button class="btn-stop" type="submit">Stop</button>
</form>
<form method="get" action="/" style="display:inline">
<button type="submit">Refresh</button>
</form>
</div>
<div class="card">
<form method="get">
<label>Session:</label>
<select name="session_id">
{% for s in sessions %}
<option value="{{s.session_id}}" {% if s.session_id == session_id %}selected{% endif %}>
{{s.start_time}}{% if not s.end_ts %} [aktiv]{% endif %} | {{s.note}} | {{s.session_id[:8]}}
</option>
{% endfor %}
</select>
<label>
<input type="checkbox" name="only_fix" value="1" {% if only_fix %}checked{% endif %}>
nur RTK FIX
</label>
<button type="submit">Anzeigen</button>
<a href="/export.csv?session_id={{session_id}}{% if only_fix %}&only_fix=1{% endif %}">CSV exportieren</a>
</form>
</div>
<div class="card">
<b>Punkte:</b> {{count}} |
<b>Anzeige:</b> letzte {{points|length}} |
<b>Auto-Refresh:</b> 10 s
</div>
<table>
<tr>
<th>Zeit</th>
<th>Lat</th>
<th>Lon</th>
<th>hMSL corr</th>
<th>hAcc</th>
<th>vAcc</th>
<th>RTK</th>
<th>Sats</th>
<th>Quelle</th>
</tr>
{% for p in points %}
<tr>
<td>{{p.t}}</td>
<td>{{"%.8f"|format(p.lat)}}</td>
<td>{{"%.8f"|format(p.lon)}}</td>
<td>{{"%.3f"|format(p.hmsl_corr_m)}}</td>
<td>{{"%.3f"|format(p.hacc_m)}}</td>
<td>{{"%.3f"|format(p.vacc_m)}}</td>
<td class="{% if p.carr_soln == 2 %}fix{% elif p.carr_soln == 1 %}float{% endif %}">
{% if p.carr_soln == 2 %}FIX{% elif p.carr_soln == 1 %}FLOAT{% else %}—{% endif %}
</td>
<td>{{p.num_sats}}</td>
<td>{{p.source}}</td>
</tr>
{% endfor %}
</table>
</body>
</html>