@foxglove/velodyne-cloud
Version:
TypeScript library for converting Velodyne LIDAR packet data to point clouds
43 lines • 1.72 kB
JavaScript
;
// 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/
Object.defineProperty(exports, "__esModule", { value: true });
exports.packetRate = void 0;
const VelodyneTypes_1 = require("./VelodyneTypes");
/**
* Returns the number of packets required to represent a full 360 degree scan
* for a given LIDAR hardware model
* @param model LIDAR hardware model
* @returns Number of packets required to represent a full 360 degree scan
*/
function packetRate(model) {
switch (model) {
case VelodyneTypes_1.Model.VLP16:
case VelodyneTypes_1.Model.VLP16HiRes:
return 754;
case VelodyneTypes_1.Model.VLP32C:
return 1507;
case VelodyneTypes_1.Model.HDL32E:
return 1808;
case VelodyneTypes_1.Model.HDL64E:
return 2600;
case VelodyneTypes_1.Model.HDL64E_S21:
// generates 1333312 points per second
// 1 packet holds 384 points
return 1333312 / 384;
case VelodyneTypes_1.Model.HDL64E_S3:
// generates 2222220 points per second (half for strongest and half for lastest)
// 1 packet holds 384 points
return 2222220 / 384;
case VelodyneTypes_1.Model.VLS128:
// 3 firing cycles in a data packet
// 3 x 53.3 μs = 0.1599 ms is the accumulation delay per packet
// 1 packet/0.1599 ms = 6253.9 packets/second
return 6253.9;
default:
return 2600;
}
}
exports.packetRate = packetRate;
//# sourceMappingURL=packetRate.js.map