UNPKG

node-insim

Version:

An InSim library for NodeJS with TypeScript support

40 lines (39 loc) 1.43 kB
import { Struct } from '../base'; import type { StructData } from '../types'; export declare class CarContact extends Struct { PLID: number; /** Like Info byte in {@link CompCar} (CCI_BLUE / CCI_YELLOW / CCI_LAG) */ Info: CarContactFlags | 0; private readonly Sp2; /** Front wheel steer in degrees (right positive) */ Steer: number; /** High 4 bits: throttle / low 4 bits: brake (0 to 15) */ ThrBrk: number; /** High 4 bits: clutch / low 4 bits: handbrake (0 to 15) */ CluHan: number; /** High 4 bits: gear (15=R) / low 4 bits: spare */ GearSp: number; /** m/s */ Speed: number; /** Car's motion if Speed > 0: 0 = world y direction, 128 = 180 deg */ Direction: number; /** Direction of forward axis: 0 = world y direction, 128 = 180 deg */ Heading: number; /** m/s^2 longitudinal acceleration (forward positive) */ AccelF: number; /** m/s^2 lateral acceleration (right positive) */ AccelR: number; /** Position (1 metre = 16) */ X: number; /** Position (1 metre = 16) */ Y: number; constructor(data?: StructData<CarContact>); } export declare enum CarContactFlags { /** This car is in the way of a driver who is a lap ahead */ CCI_BLUE = 1, /** This car is slow or stopped and in a dangerous place */ CCI_YELLOW = 2, /** This car is lagging (missing or delayed position packets) */ CCI_LAG = 32 }