Files
Cue-View/plugins/posistagenet/template.ejs
T
2023-09-14 22:49:07 -05:00

95 lines
2.3 KiB
Plaintext

<header>
<h1><%= listName%></h1>
</header>
<div>
<% Object.keys(data).forEach((address) => {
const instanceData = data[address]
%>
<h2>Server: <%= instanceData.system_name ? instanceData.system_name : ''%> (<%= address %>)</h2>
<h3>Tracker Count: <%= Object.keys(instanceData.trackers).length %></h3>
<table>
<tr>
<th></th>
<th></th>
<th colspan="3">POS</th>
<th colspan="3">SPEED</th>
<th colspan="3">ORI</th>
<th></th>
<th colspan="3">ACCEL</th>
<th colspan="3">TRGTPOS</th>
</tr>
<tr>
<th>ID</th>
<th>Name</th>
<th>x</th>
<th>y</th>
<th>z</th>
<th>x</th>
<th>y</th>
<th>z</th>
<th>x</th>
<th>y</th>
<th>z</th>
<th>validity</th>
<th>x</th>
<th>y</th>
<th>z</th>
<th>x</th>
<th>y</th>
<th>z</th>
<th>tracker_timestamp</th>
</tr>
<% Object.entries(instanceData.trackers).forEach(([trackerId,trackerData]) => {
%>
<tr>
<td><%= trackerId %></td>
<td><%= trackerData.tracker_name.tracker_name %></td>
<!-- pos -->
<td><%= trackerData.pos?.pos_x?.toFixed(2) %></td>
<td><%= trackerData.pos?.pos_y?.toFixed(2) %></td>
<td><%= trackerData.pos?.pos_z?.toFixed(2) %></td>
<!-- speed -->
<td><%= trackerData.speed?.speed_x?.toFixed(2) %></td>
<td><%= trackerData.speed?.speed_y?.toFixed(2) %></td>
<td><%= trackerData.speed?.speed_z?.toFixed(2) %></td>
<!-- ori -->
<td><%= trackerData.ori?.ori_x?.toFixed(2) %></td>
<td><%= trackerData.ori?.ori_y?.toFixed(2) %></td>
<td><%= trackerData.ori?.ori_z?.toFixed(2) %></td>
<td><%= trackerData.status?.validity?.toFixed(2) %></td>
<!-- accel -->
<td><%= trackerData.accel?.accel_x?.toFixed(2) %></td>
<td><%= trackerData.accel?.accel_y?.toFixed(2) %></td>
<td><%= trackerData.accel?.accel_z?.toFixed(2) %></td>
<!-- trgtpos -->
<td><%= trackerData.trgtpos?.trgtpos_x?.toFixed(2) %></td>
<td><%= trackerData.trgtpos?.trgtpos_y?.toFixed(2) %></td>
<td><%= trackerData.trgtpos?.trgtpos_z?.toFixed(2) %></td>
<!-- pos -->
<td><%= trackerData.timestamp?.tracker_timestamp %></td>
</tr>
<% }); %>
</table>
<%
});
%>
</div>