Add client-side support for type 3 bundles (final data)

This commit is contained in:
D. Berge
2025-08-08 12:20:04 +02:00
parent f5ad9d7182
commit 134e3bce4e
3 changed files with 33 additions and 0 deletions

View File

@@ -81,8 +81,20 @@ class DougalSequenceLayer extends ScatterplotLayer {
nofire: d.value20.value[index] >> 4, nofire: d.value20.value[index] >> 4,
autofire: d.value20.value[index] & 0xf autofire: d.value20.value[index] & 0xf
}; };
} else if (d.udv == 3) {
info.object = {
udv: d.udv,
i: d.value0.value[index],
j: d.value1.value[index],
ts: Number(d.value2.value[index]),
εi: d.value3.value[index] / 100,
εj: d.value4.value[index] / 100,
co_i: d.value5.value[index] / 100,
co_j: d.value6.value[index] / 100,
}
} else { } else {
console.warn(`Unknown udv value ${d.udv}. No picking info`); console.warn(`Unknown udv value ${d.udv}. No picking info`);
info.object = {};
} }
console.log(`Picked sequence ${info.object.i}, point ${info.object.j}, udv ${info.object.udv}`); console.log(`Picked sequence ${info.object.i}, point ${info.object.j}, udv ${info.object.udv}`);
} else { } else {

View File

@@ -472,6 +472,18 @@ export default {
}); });
}, },
finalSequencesPointsLayer (options = {}) {
return new DougalSequenceLayer({
id: 'seqfp',
data: this.makeDataFromBinary(this.sequenceBinaryDataFinal),
getRadius: 2,
getFillColor: [220, 120, 0, 200],
pickable: true,
...options
});
},
heatmapLayer(options = {}) { heatmapLayer(options = {}) {
const { positions, values } = this.sequenceBinaryData; const { positions, values } = this.sequenceBinaryData;
if (!positions?.length || !values?.length) { if (!positions?.length || !values?.length) {

View File

@@ -139,6 +139,15 @@ export default {
html += `F: ${p.fill} ms ±${p.fill_σ} ms (R=${p.fill_R})<br/>\n`; html += `F: ${p.fill} ms ±${p.fill_σ} ms (R=${p.fill_R})<br/>\n`;
html += `W: ${p.delay} ms ±${p.delay_σ} ms (R=${p.delay_R})<br/>\n`; html += `W: ${p.delay} ms ±${p.delay_σ} ms (R=${p.delay_R})<br/>\n`;
return {html, style: this.tooltipDefaultStyle};
} else if (p.udv == 3) {
// A final points record
html += `S${p.i.toString().padStart(3, "0")} ${p.j} (final)</br>\n`;
html += `<small>${new Date(Number(p.ts)).toISOString()}</small><br/>\n`;
html += `Δi: ${p.εj.toFixed(2)} m / Δj: ${p.εi.toFixed(2)} m (finalpreplot)<br/>\n`;
html += `δi: ${p.co_j.toFixed(2)} m / δj: ${p.co_i.toFixed(2)} m (finalraw)<br/>\n`;
return {html, style: this.tooltipDefaultStyle}; return {html, style: this.tooltipDefaultStyle};
} }
} }