UNPKG

node-insim

Version:

An InSim library for NodeJS with TypeScript support

51 lines (50 loc) 1.58 kB
import { Struct } from '../packets'; import { OutSimInputs } from './OutSimInputs'; import { OutSimMain } from './OutSimMain'; import { OutSimWheel } from './OutSimWheel'; /** * An extended and modular version of the {@link OutSimPack} packet. * * To receive this packet, set "OutSim Opts" integer in cfg.txt to a value greater than 0. * * OutSim Opts is hexadecimal - for all fields set OutSim Opts to 1ff. * * The resulting UDP packet size is 280. */ export declare class OutSimPack2 extends Struct { /** Header of packet. Should be 'LFST' if OSOpts contains OSO_HEADER flag */ Header: string; /** OutSim ID from cfg.txt */ ID: number; /** time in milliseconds (to check order) */ Time: number; /** Vehicle position and velocity part */ OSMain: OutSimMain; /** Vehicle inputs part */ OSInputs: OutSimInputs; /** 0=R, 1=N, 2=first gear */ Gear: number; /** spare */ readonly Sp1 = 0; /** spare */ readonly Sp2 = 0; /** spare */ readonly Sp3 = 0; /** radians/s */ EngineAngVel: number; /** Nm : output torque for throttle 1.0 */ MaxTorqueAtVel: number; /** m - travelled by car */ CurrentLapDist: number; /** m - track ruler measurement */ IndexedDistance: number; /** Wheels data */ OSWheels: OutSimWheel[]; /** Nm : steering torque on front wheels (proportional to force feedback) */ SteerTorque: number; /** spare */ readonly Spare = 0; private readonly OSOpts; constructor(outSimOpts: number); getValidPropertyNames(): string[]; }