node-insim
Version:
An InSim library for NodeJS with TypeScript support
64 lines (63 loc) • 2.24 kB
TypeScript
import { Struct } from '../packets';
/**
* OutSim - MOTION SIMULATOR SUPPORT AND TELEMETRY OUTPUT
*
* The user's car in multiplayer or the viewed car in single player or single player
* replay can output data to an external program while in VIEW_DRIVER or VIEW_CUSTOM.
*
* This can be controlled by 6 lines in the cfg.txt file:
*
* OutSim Mode 0 : 0 = off / 1 = driving / 2 = driving + replay
* OutSim Delay 1 : minimum delay between packets (100ths of a sec)
* OutSim IP 0.0.0.0 : IP address to send the UDP packet
* OutSim Port 0 : IP port
* OutSim ID 0 : if not zero, adds an identifier to the packet
* OutSim Opts 0 : see docs\OutSimPack.txt for the available options
*
* If OutSim Opts is zero, each update sends the following UDP packet.
*
* NOTE 1) X and Y axes are on the ground, Z is up.
*
* NOTE 2) Motion simulators can be dangerous. The Live for Speed developers do
* not support any motion systems in particular and cannot accept responsibility
* for injuries or deaths connected with the use of such machinery.
*/
export declare class OutSimPack extends Struct {
static readonly MIN_SIZE = 64;
static readonly MAX_SIZE = 68;
/** Time in milliseconds (to check order) */
Time: number;
/** Angular velocity vector - X axis */
AngVelX: number;
/** Angular velocity vector - Y axis */
AngVelY: number;
/** Angular velocity vector - Z axis */
AngVelZ: number;
/** Anticlockwise from above (Z) */
Heading: number;
/** Anticlockwise from above (Z) */
Pitch: number;
/** Anticlockwise from above (Z) */
Roll: number;
/** Acceleration - X axis */
AccelX: number;
/** Acceleration - Y axis */
AccelY: number;
/** Acceleration - Z axis */
AccelZ: number;
/** Velocity - X axis */
VelX: number;
/** Velocity - Y axis */
VelY: number;
/** Velocity - Z axis */
VelZ: number;
/** Position - X axis (1 m = 65536) */
PosX: number;
/** Position - Y axis (1 m = 65536) */
PosY: number;
/** Position - Z axis (1 m = 65536) */
PosZ: number;
/** Optional - only if OutSim ID is specified */
ID: number;
unpack(buffer: Uint8Array<ArrayBuffer>): this;
}