Jump to content
  • 0
Sign in to follow this  

D-Box and UDP Telemetry Information

Question

Overview

The F1 series of games support output of game data to external devices such as D-BOX, other motion platforms, steering wheels and LED devices that are connected to your PC or console. The purpose of this document is to summarise the data that is outputted so that developers of supporting hardware or software are able to configure these to work with the F1 game correctly.

If the information you require is not contained in this document then please contact custservice@codemasters.com, specifying the information you require and a member of the dev team will respond to your query as soon as possible.



D-BOX Output

D-Box output is currently supported on the PC platform. To tell the game to interact with a connected D-BOX motion platform, users should edit the games’ configuration XML file. The file is located here (after an initial boot of the game):

      ...\Documents\My Games\<game_folder>\hardwaresettings\hardware_settings_config.xml

You should see the tag:

     <motion>
       <dbox enabled="false" />
       ...
     </motion>

Set the “enabled” value to “true” to allow the game to output to your D-BOX motion platform.



Enabling the UDP Telemetry Output

PC users need to update the game’s configuration XML file to enabler UDP output. The file is located here (after an initial boot of the game):

      ...\Documents\My Games\<game_folder>\hardwaresettings\hardware_settings_config.xml

You should see the tag:

     <motion>
       ...
       <udp0 enabled="false" ip="127.0.0.1" port="20777" />
       <udp1 enabled="false" ip="127.0.0.1" port="20777" />
       <udp2 enabled="false" ip="127.0.0.1" port="20777" />
       <udp3 enabled="false" ip="127.0.0.1" port="20777" /> 
        ...
     </motion>

Set the “enabled” value to “true” to allow the game to output to data via UDP for the selected UDP channel and set the IP address and port to where you want the packets to be sent.

The PC supports the outputting of up to 4 UDP channels to allow multiple applications to receive the UDP information. Please enable and configure the IP and port information for each channel as required.

N.B. For F1 2015, you do not need the number after the udp XML tag.


In F1 2016, UDP telemetry output can also be transmitted from PS4 and Xbox One. To enable this, enter the options menu from the main menu (triangle / Y), then enter the settings menu - the UDP option will be at the bottom of the list. From there you will be able to enable / disable the UDP output, configure the IP address and port for the receiving application and toggle broadcast mode. Broadcast mode transmits the data across the console’s subnet to allow multiple devices on the same subnet to be able to receive this information.



LED devices

The F1 game has native support for some of the basic features supported by some external LED devices, such as the Leo Bodnar SLI Pro and the Fanatec steering wheels. To avoid conflicts between Codemasters’ implementation and any third-party device managers on the PC platform it may be necessary to disable the native support. This is done using the following led_display flags in the hardware_settings_config.xml. The file is located here (after an initial boot of the game):

...\Documents\My Games\<game_folder>\hardwaresettings\hardware_settings_config.xml

The flags to enabled/disable LED output are:

<led_display fanatecNativeSupport="true" sliProNativeSupport="true" />

The sliProNativeSupport flag controls the output to SLI Pro devices. The fanatecNativeSupport flag controls the output to Fanatec (and some related) steering wheel LEDs. Set the values for any of these to “false” to disable them and avoid conflicts with your own device manager.

Please note there is an additional flag to manually control the LED brightness on the SLI Pro:

<led_display forceBrightness="127" />

This option (using value in the range 0-255) will also be disabled when setting the nativeSupport flag to “false”.

Share this post


Link to post
Share on other sites

Recommended Posts

  • 0


UDP Packet Structure
The data is sent as raw data in the UDP packet, converted to a char array. To decode this into something usable it should be a case of casting the packet data back to the UDPPacket struct (or another structure with the same layout). The layout of the UDP data is as follows:


struct UDPPacket
{
    float m_time;
    float m_lapTime;
    float m_lapDistance;
    float m_totalDistance;
    float m_x;      // World space position
    float m_y;      // World space position
    float m_z;      // World space position
    float m_speed;
    float m_xv;      // Velocity in world space
    float m_yv;      // Velocity in world space
    float m_zv;      // Velocity in world space
    float m_xr;      // World space right direction
    float m_yr;      // World space right direction
    float m_zr;      // World space right direction
    float m_xd;      // World space forward direction
    float m_yd;      // World space forward direction
    float m_zd;      // World space forward direction
    float m_susp_pos_bl;
    float m_susp_pos_br;
    float m_susp_pos_fl;
    float m_susp_pos_fr;
    float m_susp_vel_bl;
    float m_susp_vel_br;
    float m_susp_vel_fl;
    float m_susp_vel_fr;
    float m_wheel_speed_bl;
    float m_wheel_speed_br;
    float m_wheel_speed_fl;
    float m_wheel_speed_fr;
    float m_throttle;
    float m_steer;
    float m_brake;
    float m_clutch;
    float m_gear;
    float m_gforce_lat;
    float m_gforce_lon;
    float m_lap;
    float m_engineRate;
    float m_sli_pro_native_support; // SLI Pro support
    float m_car_position;   // car race position
    float m_kers_level;    // kers energy left
    float m_kers_max_level;   // kers maximum energy
    float m_drs;     // 0 = off, 1 = on
    float m_traction_control;  // 0 (off) - 2 (high)
    float m_anti_lock_brakes;  // 0 (off) - 1 (on)
    float m_fuel_in_tank;   // current fuel mass
    float m_fuel_capacity;   // fuel capacity
    float m_in_pits;    // 0 = none, 1 = pitting, 2 = in pit area
    float m_sector;     // 0 = sector1, 1 = sector2; 2 = sector3
    float m_sector1_time;   // time of sector1 (or 0)
    float m_sector2_time;   // time of sector2 (or 0)
    float m_brakes_temp[4];   // brakes temperature (centigrade)
    float m_wheels_pressure[4];  // wheels pressure PSI
    float m_team_info;    // team ID
    float m_total_laps;    // total number of laps in this race
    float m_track_size;    // track size meters
    float m_last_lap_time;   // last lap time
    float m_max_rpm;    // cars max RPM, at which point the rev limiter will kick in
    float m_idle_rpm;    // cars idle RPM
    float m_max_gears;    // maximum number of gears
    float m_sessionType;   // 0 = unknown, 1 = practice, 2 = qualifying, 3 = race
    float m_drsAllowed;    // 0 = not allowed, 1 = allowed, -1 = invalid / unknown
    float m_track_number;   // -1 for unknown, 0-21 for tracks
    float m_vehicleFIAFlags;  // -1 = invalid/unknown, 0 = none, 1 = green, 2 = blue, 3 = yellow, 4 = red
 };

Share this post


Link to post
Share on other sites
  • 0

Track and Team IDs

Here are the values used for the m_team_info and m_track_number parameters:

Team IDTeam
0Redbull
1Ferrari
2McLaren
3Lotus
4Mercedes
5Sauber
6Force India
7Williams
8Toro Rosso
9Caterham
10Marussia
11Haas
12Manor

Track IDTrack
0Melbourne
1Sepang
2Shanghai
3Sakhir (Bahrain)
4Catalunya
5Monaco
6Montreal
7Silverstone
8Hockenheim
9Hungaroring
10Spa
11Monza
12Singapore
13Suzuka
14Abu Dhabi
15Texas
16Brazil
17Austria
18Sochi
19Mexico
20(unused)
21Baku (Azerbaijan)

(apologies for the formatting - not sure how to get tables in here properly)

Share this post


Link to post
Share on other sites
  • 0
which one is RENAULT ? (3 or 9)
SO... no data about other drivers names or race positions.... is there a chance to ask something more via UDP?

Share this post


Link to post
Share on other sites
  • 0
thank you                                                                           

Share this post


Link to post
Share on other sites
  • 0
Thanks a lot @Hoo
Just two questions:
I see some inconsequence in the data structure! m_susp_pos, m_susp_vel and m_wheel_speed have their own float variable for each Corner of the car.
m_brakes_temp and m_wheels_pressure are Arrays of float.
I would always prefer an Array with similar data over n variables with similar data! Is this just because the Code has been growing over the years?
And in These Arrays, which index is FL, FR, RL, RR?

edit: Could you make this a sticky please? Might be interesting for some People! Thanks in advance

Share this post


Link to post
Share on other sites
  • 0
If is possible to add more data, while there's quite a bit that would be useful, if I had to choose I would go with:
- invalid lap flag
- add session index for time trial
- information if is wet or dry track

Share this post


Link to post
Share on other sites
  • 0
You set the port on the receiving device to match whatever you used in the hardware_settings_config.xml file on the machine running F1 2016. By default it's 20777 but you could make that anything (reasonable) that you want. 

Share this post


Link to post
Share on other sites
  • 0

@EnsiFerrum - this UDP system is pretty old and has been added to over the years with some input from members of the sim racing community to make the info more relevant (Zappadoc deserves special mention for his persistence and support with this over the last few years). If we were to re-write this system again today it wouldn't look like this!

The tyre indexes are bl, br, fl, fr


@bax - I think the Renault took the Lotus slot at index 3.


If anyone who uses this data wants anything added to it, or thinks of ways we could generally improve this system then please let us know. We can't guarantee that we'd be able to make every change requested, but we'll certain try to improve things wherever we can.


I'll sticky this thread too.

Share this post


Link to post
Share on other sites
  • 0
@Hoo
THX
                                                                                                                

Share this post


Link to post
Share on other sites
  • 0
Hoo said:

In F1 2016, UDP telemetry output can also be transmitted from PS4 and Xbox One. To enable this, enter the options menu from the main menu (triangle / Y), then enter the settings menu - the UDP option will be at the bottom of the list. From there you will be able to enable / disable the UDP output, configure the IP address and port for the receiving application and toggle broadcast mode. Broadcast mode transmits the data across the console’s subnet to allow multiple devices on the same subnet to be able to receive this information.

So if you have the broadcast mode on, you don't have to fill in an IP address of the receiving device?

Share this post


Link to post
Share on other sites
  • 0
Hoo said:

In F1 2016, UDP telemetry output can also be transmitted from PS4 and Xbox One. To enable this, enter the options menu from the main menu (triangle / Y), then enter the settings menu - the UDP option will be at the bottom of the list. From there you will be able to enable / disable the UDP output, configure the IP address and port for the receiving application and toggle broadcast mode. Broadcast mode transmits the data across the console’s subnet to allow multiple devices on the same subnet to be able to receive this information.

So if you have the broadcast mode on, you don't have to fill in an IP address of the receiving device?
No, but you still need to put something on the game side (can be the device IP or some other IP on the same network).

Share this post


Link to post
Share on other sites
  • 0
Hoo said:

@EnsiFerrum - this UDP system is pretty old and has been added to over the years with some input from members of the sim racing community to make the info more relevant (Zappadoc deserves special mention for his persistence and support with this over the last few years). If we were to re-write this system again today it wouldn't look like this!

The tyre indexes are bl, br, fl, fr


@bax - I think the Renault took the Lotus slot at index 3.


If anyone who uses this data wants anything added to it, or thinks of ways we could generally improve this system then please let us know. We can't guarantee that we'd be able to make every change requested, but we'll certain try to improve things wherever we can.


I'll sticky this thread too.

Quite a few things I would love to have, but won't be greedy:
- Flag if a lap is invalid
- Unique ID per session (for example the timestamp of when the session started). This would help in having something unique that would tell us quickly the driver has moved to a different session
- Add an ID for TimeTrial to the m_sessionType

The 3 above would be a very good start in my opinion. Maybe also add a field (first value maybe) that would be the version of the packet, so that we can have structure updates without breaking existing apps.

For the future:
- Information about the other drivers.

Share this post


Link to post
Share on other sites
  • 0
What about tyre and brakes wear and temperature, wing status, fuel mix, car infront and car behind wheel type .. 

Share this post


Link to post
Share on other sites
  • 0
Hoo said:
If anyone who uses this data wants anything added to it, or thinks of ways we could generally improve this system then please let us know. We can't guarantee that we'd be able to make every change requested, but we'll certain try to improve things wherever we can.
Last year (F1 2015) I developed an Android app to overlay race infos over a live streaming. The result was not bad but... I had to insert on a Google spreadsheet all visible data  during the race... hard job :'(
Image and video hosting by TinyPic Race positions, tires used, pits where easy to fix while gaps and best/last lap times where quite impossible to use because changing too often during the race. Can you add infos about other drivers in you UDP packet? Even if rarely sent, 10 Hz is enough.

something like (sorry, not perfect syntax :# )
struct m_drivers[22]
{
string d_name;
(PSN ID)
int d_position;
int d_lapNumber;
float d_gapFrom1st; (important but computable)
float d_lapDistance;

float d_last_lap_time;
float d_best_lap_time; (not so important)

enum d_tyre; (U,X,S,M,H,I,W)
enum d_status; (RUN, PIT, DNF, DSQ)
};

Better to have, for each driver, time gap from the first driver (delay) but even with LapNumber and LapDistance it is at least possible to use timers to evaluate the gap when drivers pass the finish line (with a reasonable UDP frequency).

Thanks in advance for your attention

Share this post


Link to post
Share on other sites
  • 0
What is urgently needed:
Brake bias
Fuel setting
Differential Setting

Tyre wear
Tyre temeperatur and / or pressure
Brake Temperatur

(V)SC-Delta

Share this post


Link to post
Share on other sites
  • 0
@Hoo - I am the developer of the pCars Dash app for Project Cars. A number of my users have asked if i can interface to F1 2016, so i have created a new app based on my pCars Dash app that works with F1 2016 using the UDP feed you have documented above. This app also supports a couple of other racing titles (RaceRoom and Assetto Corsa). When using the app the user needs to click a tile to indicate which application they want to link to, for those apps i have their game logo and name, i would like to ask permission to use the F1 2016 logo as well for this interface. I would be using it on a tile that would look like this. 


If this is not acceptable, could you please provide a logo that I can use, or indicate that I should not use any logos at all for the interface to F1 2016.

Thanks,
Craig

Share this post


Link to post
Share on other sites
  • 0
@Hoo - I am the developer of the pCars Dash app for Project Cars. A number of my users have asked if i can interface to F1 2016, so i have created a new app based on my pCars Dash app that works with F1 2016 using the UDP feed you have documented above. This app also supports a couple of other racing titles (RaceRoom and Assetto Corsa). When using the app the user needs to click a tile to indicate which application they want to link to, for those apps i have their game logo and name, i would like to ask permission to use the F1 2016 logo as well for this interface. I would be using it on a tile that would look like this. 


If this is not acceptable, could you please provide a logo that I can use, or indicate that I should not use any logos at all for the interface to F1 2016.

Thanks,
Craig
Could you please give us more information, maybe doing a new threat...
...and post it here  ;)

Share this post


Link to post
Share on other sites
  • 0
JuanCarMR said:
@Hoo - I am the developer of the pCars Dash app for Project Cars. A number of my users have asked if i can interface to F1 2016, so i have created a new app based on my pCars Dash app that works with F1 2016 using the UDP feed you have documented above. This app also supports a couple of other racing titles (RaceRoom and Assetto Corsa). When using the app the user needs to click a tile to indicate which application they want to link to, for those apps i have their game logo and name, i would like to ask permission to use the F1 2016 logo as well for this interface. I would be using it on a tile that would look like this. 


If this is not acceptable, could you please provide a logo that I can use, or indicate that I should not use any logos at all for the interface to F1 2016.

Thanks,
Craig
Could you please give us more information, maybe doing a new threat...
...and post it here  ;)
If your not familiar with pCars Dash, you can see it in action with Project Cars here https://youtu.be/ttJFLBcO_I4?t=14

Its a video showing the app in action from an app review site in Germany that very recently reviewed a number of iOS telemetry apps for Project Cars, the link starts with my app, there are another 4 or 5 that get shown after mine. It provides a good look at what the app does with Project Cars. The app i have made to work with F1 2016 is very similar, it has a few less features currently due to the telemetry feed from F1 2016 having less information than the Project Cars one, but its still a reasonable representation of it.

Cheers

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×