@openhps/core
Version:
Open Hybrid Positioning System - Core component
18 lines • 872 B
JavaScript
import { __decorate, __metadata } from "tslib";
import { SerializableObject, SerializableMember } from '../decorators';
import { LinearVelocityUnit } from '../../utils';
import { SensorValue } from './SensorValue';
/**
* @category Sensor Value
*/
let LinearVelocity = class LinearVelocity extends SensorValue {
constructor(x, y, z, unit = LinearVelocityUnit.METER_PER_SECOND) {
super(x, y, z, unit, LinearVelocityUnit.METER_PER_SECOND);
}
static fromArray(array, unit = LinearVelocityUnit.METER_PER_SECOND) {
return new this(array[0], array[1], array[2], unit);
}
};
__decorate([SerializableMember(), __metadata("design:type", LinearVelocityUnit)], LinearVelocity.prototype, "unit", void 0);
LinearVelocity = __decorate([SerializableObject(), __metadata("design:paramtypes", [Number, Number, Number, Object])], LinearVelocity);
export { LinearVelocity };