UDP Output Setup
UDP Output Setup
UDP Output Setup
June 6, 2017
Contents
1 Overview 2
2 D-BOX 3
2.1 Config Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3 UDP 4
3.1 Config Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
4 Custom UDP 5
4.1 Config Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
4.2 XML Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
4.3 Available Channels . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
5 Fanatec 13
5.1 Config Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1
1 Overview
Most of Codemasters racing titles export telemetry data from the players vehi-
cle in order to support 3rd party motion platforms, telemetry applications and
steering devices. Over the years, the number of export formats has grown. This
document aims to describe the legacy data formats exported from games such
as DiRT Rally and Grid 2.
There have also been additions for DiRT 4 which should open up the telemetry
export for a wider range of 3rd party applications, which will be outlined later.
2
2 D-BOX
To enable exporting to D-BOX, simply set enabled to true in the dbox XML tag.
<dbox enabled="true" />
Ensure you have the latest motion codes from D-BOX. Motion codes and drivers
can be downloaded at their website at
http://www.d-box.com/corporate-page/downloads/
3
3 UDP
UDP data is probably the primary way of getting telemetry data from the game,
and almost certainly the least understood.
<motion_platform>
<udp enabled="true" extradata="0" ip="...." port="20777" delay="1" />
<udp enabled="true" extradata="0" ip="...." port="20888" delay="1" />
<udp enabled="true" extradata="2" ip="...." port="20999" delay="1" />
</motion_platform>
enabled
Set to true to enable the UDP export to this IP/port, false otherwise.
extradata
ip
port
delay
4
4 Custom UDP
To improve the flexibility of the system, custom UDP data packets can now be
defined, enabling 3rd parties to be more selective about the telemetry channels
they are interested in. The behaviour is exactly the same as the legacy UDP
options, and examples of how to replicate the legacy UDP data packets with
the new system can be found at the end of this document.
As with UDP, multiple ports can be exported to by adding more custom udp tags
to the settings.
enabled
Set to true to enable the UDP export to this IP/port, false otherwise.
filename
The XML filename within the motionplatforms folder which contains the net-
work packet format.
ip
port
delay
5
4.2 XML Layout
<custom_udp>
<uint32 channel="...." scale="...." />
<int32 channel="...." scale="...." />
<float channel="...." scale="...." />
<fourcc text="...." />
</custom_udp>
where the type tags uint32, int32, float, and fourcc are the only supported
types, which represent 32 bit unsigned integers, 32 bit signed integers, 32 bit float-
ing point numbers, and 4 byte strings respectively. All exported data types are
currently 4 bytes in size, and up to 100 telemetry channels are supported per
packet.
Numeric types must specify a channel which must match one of the supported
channels below.
An optional scale modifier can be specified, and will typically be used for chang-
ing units or types.
The fourcc data must define a 4-character string in the text attribute.
In alphabetical order, here is a list of all the available telemetry channels that
can be exported from the game. Channels that are not supported by a game
will return zero.
abs
acceleration x
acceleration y
acceleration z
6
angular velocity x
angular velocity y
angular velocity z
brake input
Returns the level of brake input applied through the controller. A value
between 0 and 1.
brake temp bl
brake temp br
brake temp fl
brake temp fr
clutch input
Returns the level of clutch input applied through the controller. A value
between 0 and 1.
drs
engine rate
forward dir x
forward dir y
forward dir z
fuel capacity
fuel in tank
7
gear
gforce lateral
gforce longitudinal
gforce vertical
idle rpm
in pits
kers level
lap distance
lap time
lap
left dir x
left dir y
left dir z
8
local velocity x
local velocity y
local velocity z
Returns the x, y or z component of the linear velocity of the car in car local
space (in metres).
max gears
max rpm
paused
pitch
pitch velocity
pitch acceleration
position x
position y
position z
Returns the x, y or z component of the world space position of the car (in
metres).
race position
race sector
9
roll
roll velocity
roll acceleration
sector time 1
sector time 2
speed
steering input
Returns the level of steering input applied through the controller. A value
between -1 and 1.
suspension position bl
suspension position br
suspension position fl
suspension position fr
Returns the vertical position of the wheel from rest (in car space), measured
in metres.
suspension velocity bl
suspension velocity br
suspension velocity fl
suspension velocity fr
Returns the vertical velocity of the wheel from rest (in car space), measured
in m/s.
suspension acceleration bl
suspension acceleration br
suspension acceleration fl
suspension acceleration fr
Returns the vertical acceleration of the wheel from rest (in car space), mea-
sured in m/s2 .
10
throttle input
Returns the level of throttle input applied through the controller. A value
between 0 and 1.
total distance
total laps
total time
Returns the amount of time since the race session begun, in seconds.
track length
traction control
tyre pressure bl
tyre pressure br
tyre pressure fl
tyre pressure fr
velocity x
velocity y
velocity z
Returns the speed of the contact patch of the specified wheel, in me-
tres/second.
11
yaw
yaw velocity
yaw acceleration
12
5 Fanatec
Included in the motion platform system is the Fanatec wheel and pedal exten-
sions, which allow you to control vibration to pedals and LED displays.
enabled
pedalVibrationScale
An optional scalar for the rumble motors in the pedals, currently set to rum-
ble when anti-lock brakes kick in. A value between 0 and 1.
wheelVibrationScale
An optional scalar for the rumble motors in the wheel (separate to regu-
lar force feedback motors). Currently set to rumble at high RPM. A value
between 0 and 1.
ledTrueForGearsFalseForSpeed
Set to true if you wish the LED display on the wheel to show you the current
gear, false if you would prefer to see the transmission speed of the vehicle.
The units of speed will be either km/h or mph, depending on the in-game
setting for the OSD.
13
6 Appendix 1: Custom UDP for UDP mode 0
<custom_udp>
<uint32 channel="total_time" scale="1000.0" />
<float channel="angular_velocity_x" scale="-1.0" />
<float channel="angular_velocity_z" scale="1.0" />
<float channel="angular_velocity_y" scale="1.0" />
<float channel="yaw" scale="1.0" />
<float channel="pitch" scale="1.0" />
<float channel="roll" scale="1.0" />
<float channel="acceleration_x" scale="-1.0" />
<float channel="acceleration_z" scale="1.0" />
<float channel="acceleration_y" scale="1.0" />
<float channel="velocity_x" scale="-1.0" />
<float channel="velocity_z" scale="1.0" />
<float channel="velocity_y" scale="1.0" />
<int32 channel="position_x" scale="-65535.0" />
<int32 channel="position_z" scale="65535.0" />
<int32 channel="position_y" scale="65535.0" />
<fourcc text="ToCA" />
</custom_udp>
14
7 Appendix 1: Custom UDP for UDP mode 1
<custom_udp>
<float channel="total_time" scale="1.0" />
<float channel="lap_time" scale="1.0" />
<float channel="lap_distance" scale="1.0" />
<float channel="total_distance" scale="1.0" />
<float channel="position_x" scale="1.0" />
<float channel="position_y" scale="1.0" />
<float channel="position_z" scale="1.0" />
<float channel="speed" scale="1.0" />
<float channel="velocity_x" scale="1.0" />
<float channel="velocity_y" scale="1.0" />
<float channel="velocity_z" scale="1.0" />
<float channel="left_dir_x" scale="-1.0" />
<float channel="left_dir_y" scale="-1.0" />
<float channel="left_dir_z" scale="-1.0" />
<float channel="forward_dir_x" scale="1.0" />
<float channel="forward_dir_y" scale="1.0" />
<float channel="forward_dir_z" scale="1.0" />
<float channel="suspension_position_bl" scale="1000.0" />
<float channel="suspension_position_br" scale="1000.0" />
<float channel="suspension_position_fl" scale="1000.0" />
<float channel="suspension_position_fr" scale="1000.0" />
<float channel="suspension_velocity_bl" scale="1000.0" />
<float channel="suspension_velocity_br" scale="1000.0" />
<float channel="suspension_velocity_fl" scale="1000.0" />
<float channel="suspension_velocity_fr" scale="1000.0" />
<float channel="wheel_patch_speed_bl" scale="1.0" />
<float channel="wheel_patch_speed_br" scale="1.0" />
<float channel="wheel_patch_speed_fl" scale="1.0" />
<float channel="wheel_patch_speed_fr" scale="1.0" />
<float channel="throttle_input" scale="1.0" />
<float channel="steering_input" scale="1.0" />
<float channel="brake_input" scale="1.0" />
<float channel="clutch_input" scale="1.0" />
<float channel="gear" scale="1.0" />
<float channel="gforce_lateral" scale="1.0" />
<float channel="gforce_longitudinal" scale="1.0" />
<float channel="lap" scale="1.0" />
<float channel="engine_rate" scale="1.0" />
</custom_udp>
15
8 Appendix 1: Custom UDP for UDP mode 2
<custom_udp>
<float channel="total_time" scale="1.0" />
<float channel="lap_time" scale="1.0" />
<float channel="lap_distance" scale="1.0" />
<float channel="total_distance" scale="1.0" />
<float channel="position_x" scale="1.0" />
<float channel="position_y" scale="1.0" />
<float channel="position_z" scale="1.0" />
<float channel="speed" scale="1.0" />
<float channel="velocity_x" scale="1.0" />
<float channel="velocity_y" scale="1.0" />
<float channel="velocity_z" scale="1.0" />
<float channel="left_dir_x" scale="-1.0" />
<float channel="left_dir_y" scale="-1.0" />
<float channel="left_dir_z" scale="-1.0" />
<float channel="forward_dir_x" scale="1.0" />
<float channel="forward_dir_y" scale="1.0" />
<float channel="forward_dir_z" scale="1.0" />
<float channel="suspension_position_bl" scale="1000.0" />
<float channel="suspension_position_br" scale="1000.0" />
<float channel="suspension_position_fl" scale="1000.0" />
<float channel="suspension_position_fr" scale="1000.0" />
<float channel="suspension_velocity_bl" scale="1000.0" />
<float channel="suspension_velocity_br" scale="1000.0" />
<float channel="suspension_velocity_fl" scale="1000.0" />
<float channel="suspension_velocity_fr" scale="1000.0" />
<float channel="wheel_patch_speed_bl" scale="1.0" />
<float channel="wheel_patch_speed_br" scale="1.0" />
<float channel="wheel_patch_speed_fl" scale="1.0" />
<float channel="wheel_patch_speed_fr" scale="1.0" />
<float channel="throttle_input" scale="1.0" />
<float channel="steering_input" scale="1.0" />
<float channel="brake_input" scale="1.0" />
<float channel="clutch_input" scale="1.0" />
<float channel="gear" scale="1.0" />
<float channel="gforce_lateral" scale="1.0" />
<float channel="gforce_longitudinal" scale="1.0" />
<float channel="lap" scale="1.0" />
<float channel="engine_rate" scale="1.0" />
<float channel="native_sli_support" scale="1.0" />
<float channel="race_position" scale="1.0" />
<float channel="kers_level" scale="1.0" />
<float channel="kers_level_max" scale="1.0" />
<float channel="drs" scale="1.0" />
<float channel="traction_control" scale="1.0" />
<float channel="abs" scale="1.0" />
<float channel="fuel_in_tank" scale="1.0" />
<float channel="fuel_capacity" scale="1.0" />
<float channel="in_pits" scale="1.0" />
<float channel="race_sector" scale="1.0" />
<float channel="sector_time_1" scale="1.0" />
16
<float channel="sector_time_2" scale="1.0" />
<float channel="brake_temp_bl" scale="1.0" />
<float channel="brake_temp_br" scale="1.0" />
<float channel="brake_temp_fl" scale="1.0" />
<float channel="brake_temp_fr" scale="1.0" />
<float channel="tyre_pressure_bl" scale="1.0" />
<float channel="tyre_pressure_br" scale="1.0" />
<float channel="tyre_pressure_fl" scale="1.0" />
<float channel="tyre_pressure_fr" scale="1.0" />
<float channel="laps_completed" scale="1.0" />
<float channel="total_laps" scale="1.0" />
<float channel="track_length" scale="1.0" />
<float channel="last_lap_time" scale="1.0" />
</custom_udp>
17
9 Appendix 1: Custom UDP for UDP mode 3
<custom_udp>
<float channel="total_time" scale="1.0" />
<float channel="lap_time" scale="1.0" />
<float channel="lap_distance" scale="1.0" />
<float channel="total_distance" scale="1.0" />
<float channel="position_x" scale="1.0" />
<float channel="position_y" scale="1.0" />
<float channel="position_z" scale="1.0" />
<float channel="speed" scale="1.0" />
<float channel="velocity_x" scale="1.0" />
<float channel="velocity_y" scale="1.0" />
<float channel="velocity_z" scale="1.0" />
<float channel="left_dir_x" scale="-1.0" />
<float channel="left_dir_y" scale="-1.0" />
<float channel="left_dir_z" scale="-1.0" />
<float channel="forward_dir_x" scale="1.0" />
<float channel="forward_dir_y" scale="1.0" />
<float channel="forward_dir_z" scale="1.0" />
<float channel="suspension_position_bl" scale="1000.0" />
<float channel="suspension_position_br" scale="1000.0" />
<float channel="suspension_position_fl" scale="1000.0" />
<float channel="suspension_position_fr" scale="1000.0" />
<float channel="suspension_velocity_bl" scale="1000.0" />
<float channel="suspension_velocity_br" scale="1000.0" />
<float channel="suspension_velocity_fl" scale="1000.0" />
<float channel="suspension_velocity_fr" scale="1000.0" />
<float channel="wheel_patch_speed_bl" scale="1.0" />
<float channel="wheel_patch_speed_br" scale="1.0" />
<float channel="wheel_patch_speed_fl" scale="1.0" />
<float channel="wheel_patch_speed_fr" scale="1.0" />
<float channel="throttle_input" scale="1.0" />
<float channel="steering_input" scale="1.0" />
<float channel="brake_input" scale="1.0" />
<float channel="clutch_input" scale="1.0" />
<float channel="gear" scale="1.0" />
<float channel="gforce_lateral" scale="1.0" />
<float channel="gforce_longitudinal" scale="1.0" />
<float channel="lap" scale="1.0" />
<float channel="engine_rate" scale="1.0" />
<float channel="native_sli_support" scale="1.0" />
<float channel="race_position" scale="1.0" />
<float channel="kers_level" scale="1.0" />
<float channel="kers_level_max" scale="1.0" />
<float channel="drs" scale="1.0" />
<float channel="traction_control" scale="1.0" />
<float channel="abs" scale="1.0" />
<float channel="fuel_in_tank" scale="1.0" />
<float channel="fuel_capacity" scale="1.0" />
<float channel="in_pits" scale="1.0" />
<float channel="race_sector" scale="1.0" />
<float channel="sector_time_1" scale="1.0" />
18
<float channel="sector_time_2" scale="1.0" />
<float channel="brake_temp_bl" scale="1.0" />
<float channel="brake_temp_br" scale="1.0" />
<float channel="brake_temp_fl" scale="1.0" />
<float channel="brake_temp_fr" scale="1.0" />
<float channel="tyre_pressure_bl" scale="1.0" />
<float channel="tyre_pressure_br" scale="1.0" />
<float channel="tyre_pressure_fl" scale="1.0" />
<float channel="tyre_pressure_fr" scale="1.0" />
<float channel="laps_completed" scale="1.0" />
<float channel="total_laps" scale="1.0" />
<float channel="track_length" scale="1.0" />
<float channel="last_lap_time" scale="1.0" />
<float channel="max_rpm" scale="1.0" />
<float channel="idle_rpm" scale="1.0" />
<float channel="max_gears" scale="1.0" />
</custom_udp>
19