// This Source Code Form is subject to the terms of the Mozilla Public
// License, v2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/
// TODO: Use protobuf types
export function deserializeIMUData(topic, data, receiveTime) {
    const messages = data.map((packet) => ({
        timestamp: receiveTime,
        acc: {
            x: packet.acc[0],
            y: packet.acc[1],
            z: packet.acc[2],
        },
        gyro: {
            x: packet.gyro[0],
            y: packet.gyro[1],
            z: packet.gyro[2],
        },
    }));
    return messages.map((message) => ({
        topic,
        receiveTime,
        message,
        // eslint-disable-next-line no-warning-comments
        sizeInBytes: 0, // TODO(milan.medvec)
        schemaName: "foxglove.Vector3",
    }));
}
//# sourceMappingURL=imu.js.map