Welcome to the brand new Codemasters Forums! Be sure to check the FAQ and Forum Rules before you get started.

D-Box and UDP Telemetry Information

HooHoo Member, Codemasters admin
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”.

«13456

Comments

  • HooHoo Member, Codemasters admin


    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
     };

  • HooHoo Member, Codemasters admin

    Track and Team IDs

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

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

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

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

  • baxbax Member Unleaded
    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?
  • kevinkirkkevinkirk Member Petrol Head
    thank you                                                                           
    Xbox one, controller
  • EnsiFerrumEnsiFerrum Member Pit Crew
    edited September 2016
    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
    Post edited by EnsiFerrum on
    "I find your lack of communications disturbing" - Lord Darth Vader to Codemasters Community Manager
    Body is n characters too short. <- THIS IS RIDICULOUS!!
    Once with professionals ...

    Sys-Spec:
     Intel Core i7-6700K / 32GB RAM / ASUS Stryx GTX 1080 A8G / Creative Soundblaster Z
     Fanatec CSL Elite / Fanatec CSL Wheel P1/ Fanatec CSW Formula Carbon /
     Fanatec CSP v3 / Fanatec ClubSport Handbrake /
     Thrustmaster TH8A /
     TrackIR
     Windows Version 1703 (Build 16288.1000)
  • oscarolimoscarolim Member Unleaded
    Thank you for this. Time to get to work this weekend :)
  • oscarolimoscarolim Member Unleaded
    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
  • FRACTUREDFRACTURED Member, Drivers Champion
    WHY IS THIS NOT STICKIED

    cheers.

    • Body is 9 screen tears too short.
    You remember when you first came to my office? I asked you, "Do you want to be an eagle, or do you want to be a **** bird?" And you said "I want to be an eagle".
    You got to be what you say you're going to be, which you aren't.
    You got to do what you say you're going to do, which you haven't.
  • Joseph783339Joseph783339 Member New Car Smell
    how do you find the port address for your receiving device after you have located the ip address?
  • BoothJoeBoothJoe Member New Car Smell
    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. 
  • RPD3RPD3 Member New Car Smell
    For consoles (PS4) is it just the default?
  • HooHoo Member, Codemasters admin

    @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.

  • EnsiFerrumEnsiFerrum Member Pit Crew
    edited September 2016
    @Hoo
    THX
                                                                                                                    
    Post edited by Lozzy on
    "I find your lack of communications disturbing" - Lord Darth Vader to Codemasters Community Manager
    Body is n characters too short. <- THIS IS RIDICULOUS!!
    Once with professionals ...

    Sys-Spec:
     Intel Core i7-6700K / 32GB RAM / ASUS Stryx GTX 1080 A8G / Creative Soundblaster Z
     Fanatec CSL Elite / Fanatec CSL Wheel P1/ Fanatec CSW Formula Carbon /
     Fanatec CSP v3 / Fanatec ClubSport Handbrake /
     Thrustmaster TH8A /
     TrackIR
     Windows Version 1703 (Build 16288.1000)
  • MichelatNLMichelatNL Member New Car Smell
    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?
    PS4 | Thrustmaster T300 RS (Ferrari F1 Wheel | T3PA Pedals) | Playseat Challenge | Project Cars | F1 2016 | Assetto Corsa | https://www.youtube.com/michel--nl
  • oscarolimoscarolim Member Unleaded
    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).
  • oscarolimoscarolim Member Unleaded
    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.
  • TARJAMTARJAM Member Wheel Nut
    What about tyre and brakes wear and temperature, wing status, fuel mix, car infront and car behind wheel type .. 
  • Paradise2007Paradise2007 Member New Car Smell
    is there any way can make telemetry application to work on mac book air
  • baxbax Member Unleaded
    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
  • oscarolimoscarolim Member Unleaded
    is there any way can make telemetry application to work on mac book air
    Unfortunately not at the moment :(
«13456
Sign In or Register to comment.