layout tracker fields differently

This commit is contained in:
2023-09-13 15:44:16 -05:00
parent c610b4e858
commit 5b163bf120
3 changed files with 39 additions and 12 deletions
+9 -5
View File
@@ -47,11 +47,15 @@ class Decoder {
if (this.data.trackers[tracker.id] === undefined) {
this.data.trackers[tracker.id] = {};
}
tracker.fields?.forEach((field) => {
Object.entries(field).forEach(([key, value]) => {
this.data.trackers[tracker.id][key] = value;
});
});
this.data.trackers[tracker.id] = {
pos: tracker.pos,
speed: tracker.speed,
ori: tracker.ori,
status: tracker.status,
accel: tracker.accel,
trgtpos: tracker.trgtpos,
timestamp: tracker.timestamp,
};
});
}
});