Module pyinsim :: Class OutSimPack
[hide private]
[frames] | no frames]

Class OutSimPack

source code

External Motion simulator support

The user's car in multiplayer or the viewed car in single player or single player replay can output information to a motion system while viewed from an internal view.

This can be controlled by 5 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
Instance Methods [hide private]
 
__init__(self, Time=0, AngVel=[0.0, 0.0, 0.0], Heading=0.0, Pitch=0.0, Roll=0.0, Accel=[0.0, 0.0, 0.0], Vel=[0.0, 0.0, 0.0], Pos=[0, 0, 0], ID=0)
Initailise the packet.
source code
 
unpack(self, data)
Unpack the packet data from a binary formatted string.
source code
Method Details [hide private]

__init__(self, Time=0, AngVel=[0.0, 0.0, 0.0], Heading=0.0, Pitch=0.0, Roll=0.0, Accel=[0.0, 0.0, 0.0], Vel=[0.0, 0.0, 0.0], Pos=[0, 0, 0], ID=0)
(Constructor)

source code 

Initailise the packet.

Parameters:
  • Time - time in milliseconds (to check order)
  • AngVel - 3 floats, angular velocity vector
  • Heading - anticlockwise from above (Z)
  • Pitch - anticlockwise from right (X)
  • Roll - anticlockwise from front (Y)
  • Accel - 3 floats X, Y, Z
  • Vel - 3 floats X, Y, Z
  • Pos - 3 ints X, Y, Z (1m = 65536)
  • ID - optional: only if OutSim ID is specified

unpack(self, data)

source code 

Unpack the packet data from a binary formatted string.

Parameters:
  • data (string) - The packet data as a binary formatted string.