node-insim
Version:
An InSim library for NodeJS with TypeScript support
125 lines (124 loc) • 4.82 kB
JavaScript
;
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __read = (this && this.__read) || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
};
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.OutSimWheel = void 0;
var decorators_1 = require("../decorators");
var packets_1 = require("../packets");
var OutSimWheel = /** @class */ (function (_super) {
__extends(OutSimWheel, _super);
function OutSimWheel() {
var _this = _super.apply(this, __spreadArray([], __read(arguments), false)) || this;
/** compression from unloaded */
_this.SuspDeflect = 0;
/** including Ackermann and toe */
_this.Steer = 0;
/** force right */
_this.XForce = 0;
/** force forward */
_this.YForce = 0;
/** perpendicular to surface */
_this.VerticalLoad = 0;
/** radians/s */
_this.AngVel = 0;
/** radians a-c viewed from rear */
_this.LeanRelToRoad = 0;
/** degrees C */
_this.AirTemp = 0;
/** (0 to 255 - see below) */
_this.SlipFraction = 0;
/** touching ground */
_this.Touching = 0;
_this.Sp3 = 0;
/** slip ratio */
_this.SlipRatio = 0;
/** tangent of slip angle */
_this.TanSlipAngle = 0;
return _this;
}
__decorate([
(0, decorators_1.float)()
], OutSimWheel.prototype, "SuspDeflect", void 0);
__decorate([
(0, decorators_1.float)()
], OutSimWheel.prototype, "Steer", void 0);
__decorate([
(0, decorators_1.float)()
], OutSimWheel.prototype, "XForce", void 0);
__decorate([
(0, decorators_1.float)()
], OutSimWheel.prototype, "YForce", void 0);
__decorate([
(0, decorators_1.float)()
], OutSimWheel.prototype, "VerticalLoad", void 0);
__decorate([
(0, decorators_1.float)()
], OutSimWheel.prototype, "AngVel", void 0);
__decorate([
(0, decorators_1.float)()
], OutSimWheel.prototype, "LeanRelToRoad", void 0);
__decorate([
(0, decorators_1.byte)()
], OutSimWheel.prototype, "AirTemp", void 0);
__decorate([
(0, decorators_1.byte)()
], OutSimWheel.prototype, "SlipFraction", void 0);
__decorate([
(0, decorators_1.byte)()
], OutSimWheel.prototype, "Touching", void 0);
__decorate([
(0, decorators_1.byte)()
], OutSimWheel.prototype, "Sp3", void 0);
__decorate([
(0, decorators_1.float)()
], OutSimWheel.prototype, "SlipRatio", void 0);
__decorate([
(0, decorators_1.float)()
], OutSimWheel.prototype, "TanSlipAngle", void 0);
return OutSimWheel;
}(packets_1.Struct));
exports.OutSimWheel = OutSimWheel;