Jump to content
Want to report an issue? Have a bug to report? Please look here first!!!! Read more... ×

Archived

This topic is now archived and is closed to further replies.

F1 2017 D-Box and UDP Output Specification

Recommended Posts

@Hoo - Do you think we might be able to get a forum section dedicated to 3rd party apps using your telemetry api?

I was thinking that a category called "F1 Games - Companion Apps"
Inside that you could have a stickied "readme first" that clearly informs everyone that the 3rd party apps listed are not made by Codemasters and that any support queries relating to those apps must be directed to the developer of the app.
Each app developer could have 1 thread inside this category specifically for their app, where they can detail what their app does, provide some screenshots and provide support for their apps via questions posted by users into that thread. 

Cheers
Craig
Great idea!

Share this post


Link to post
Share on other sites
When testing my Telemetry App, I found some bugs in the UDP feed.
First shameless promo, my tool is at: http://www.racedepartment.com/downloads/telemetry-application.16862/
Hoo said:
v1.3 is the day 1 patch version. Users installing from a disc will have v1.0 which will use the previous specification.
This is with v1.3
  1.  In time trial, the 1980 Era TeamID is always 1. In race the Era 1980 TeamID works.
  2.  The Gforce latitudinal and longitudinal values are very shaky, going to 0 and staying there few packets and then go to the real value for one packet before returing back to 0. In F1 2016 is was still more "stable". See the pictures below.
This is the output from F1 2017 V1.3. You see, that the value always goes back to 0, instead of small "adjustment".

This is the output you get from the F1 2016. You can see, that in the data the values don't go to zero, but change a bit.


Cheers.




Share this post


Link to post
Share on other sites
When testing my Telemetry App, I found some bugs in the UDP feed.
First shameless promo, my tool is at: http://www.racedepartment.com/downloads/telemetry-application.16862/
Hoo said:
v1.3 is the day 1 patch version. Users installing from a disc will have v1.0 which will use the previous specification.
This is with v1.3
  1.  In time trial, the 1980 Era TeamID is always 1. In race the Era 1980 TeamID works.
  2.  The Gforce latitudinal and longitudinal values are very shaky, going to 0 and staying there few packets and then go to the real value for one packet before returing back to 0. In F1 2016 is was still more "stable". See the pictures below.
@Hoo On the subject of bugs, I'm advised the UDP broadcast method no longer works on PC following the v1.3 update.

Share this post


Link to post
Share on other sites

westie13 said:

Hello All

Is there an app for IOS we can use ?

Thanks

There are only a couple I'm aware of but there may be others: 'Race Dash for F1 games' (developed by me) and 'RS Dash' (developed by cjorgens79 also active on this thread). 

Share this post


Link to post
Share on other sites
On Xbox, for broadcast to work I must first set an IP (I can set my router's IP) and then choose broadcast.

Share this post


Link to post
Share on other sites
When testing my Telemetry App, I found some bugs in the UDP feed.
First shameless promo, my tool is at: http://www.racedepartment.com/downloads/telemetry-application.16862/
Hoo said:
v1.3 is the day 1 patch version. Users installing from a disc will have v1.0 which will use the previous specification.
This is with v1.3
  1.  In time trial, the 1980 Era TeamID is always 1. In race the Era 1980 TeamID works.
  2.  The Gforce latitudinal and longitudinal values are very shaky, going to 0 and staying there few packets and then go to the real value for one packet before returing back to 0. In F1 2016 is was still more "stable". See the pictures below.
@Hoo On the subject of bugs, I'm advised the UDP broadcast method no longer works on PC following the v1.3 update.
I use PC and it was working fine for me the other day when i tried it with v1.3...

Share this post


Link to post
Share on other sites
I use PC and it was working fine for me the other day when i tried it with v1.3...
Hmm interesting. Could be an anomaly of their setup I guess, just strange that it was working and then after the patch it wasn’t.

Share this post


Link to post
Share on other sites
oscarolim said:
On Xbox, for broadcast to work I must first set an IP (I can set my router's IP) and then choose broadcast.
That isn’t how broadcast should work though, there should be no need to set any IP as it should send to the subnet’s broadcast address.

Share this post


Link to post
Share on other sites
oscarolim said:
On Xbox, for broadcast to work I must first set an IP (I can set my router's IP) and then choose broadcast.
That isn’t how broadcast should work though, there should be no need to set any IP as it should send to the subnet’s broadcast address.

If they are using a subnet specific broadcast, rather than just a global broadcast, if he has multiple adapters it could be picking the wrong one for building the subnet broadcast address. Specifying an IP might make their logic base the subnet broadcast on that address rather than some detected address from available adapters.

Share this post


Link to post
Share on other sites
When testing my Telemetry App, I found some bugs in the UDP feed.
First shameless promo, my tool is at: http://www.racedepartment.com/downloads/telemetry-application.16862/
Hoo said:
v1.3 is the day 1 patch version. Users installing from a disc will have v1.0 which will use the previous specification.
This is with v1.3
  1.  In time trial, the 1980 Era TeamID is always 1. In race the Era 1980 TeamID works.
  2.  The Gforce latitudinal and longitudinal values are very shaky, going to 0 and staying there few packets and then go to the real value for one packet before returing back to 0. In F1 2016 is was still more "stable". See the pictures below.
This is the output from F1 2017 V1.3. You see, that the value always goes back to 0, instead of small "adjustment".

This is the output you get from the F1 2016. You can see, that in the data the values don't go to zero, but change a bit.


Cheers.




I can also confirm that on my own app I'm seeing gforce values are mostly 0, for both lat and lon. When they do update, it seems to be in the only around a pitstop (entering or leaving pit box). I'm on Xbox One.

Share this post


Link to post
Share on other sites
When testing my Telemetry App, I found some bugs in the UDP feed.
First shameless promo, my tool is at: http://www.racedepartment.com/downloads/telemetry-application.16862/
Hoo said:
v1.3 is the day 1 patch version. Users installing from a disc will have v1.0 which will use the previous specification.
This is with v1.3
  1.  In time trial, the 1980 Era TeamID is always 1. In race the Era 1980 TeamID works.
  2.  The Gforce latitudinal and longitudinal values are very shaky, going to 0 and staying there few packets and then go to the real value for one packet before returing back to 0. In F1 2016 is was still more "stable". See the pictures below.
This is the output from F1 2017 V1.3. You see, that the value always goes back to 0, instead of small "adjustment".

This is the output you get from the F1 2016. You can see, that in the data the values don't go to zero, but change a bit.


Cheers.




I also confirm that on my app (I'm PC), I noticed following behavior:
sendRate=20: almost all gforce values are 0, only when speed is very low (standing)
sendRate=60: we have gforce values, but still 1 or two values per second are 0.

Here is some gforce_lon data for full acceleration and full breaking: Under steady acceleration the values are jumping between 1g and 2g...it's worse while breaking.


Share this post


Link to post
Share on other sites
oscarolim said:
On Xbox, for broadcast to work I must first set an IP (I can set my router's IP) and then choose broadcast.
That isn’t how broadcast should work though, there should be no need to set any IP as it should send to the subnet’s broadcast address.
I know, which means it is a bug.

Share this post


Link to post
Share on other sites

Hello @Hoo I know everyone is busy taking care of game play bugs but just wondering if it could be made so UDP data doesn't stop if you go to pause menu.

Example in a online practice lobby in F1 2016 the data continued to be output even when the car is on track under AI control which made it really great for testing and moving things around a SLIMax VDASH-EMU display. In 2017 this doesn't happen as soon as you go into pause menu and let the AI take over all data stops. This even has the effect of stopping the Elapsed Time clock in SLIMax VDASH-EMU for the length of time it is paused.

Not a show stopper as such but would be great if UDP could be sent all the time.


Thank you

Share this post


Link to post
Share on other sites
Hoo said:
To summarise some of the above info, we've made the following changes already in our latest 2017 code:
  • Pit limiter speed is now shown in mph. If anyone is converting into km/h then this will need updating.
  • Packing is now enabled. I've updated the UDP info on the first page to show this.
I've got the following items on the backlog for further discussion:
  • Add support for showing penalties
  • Add support for showing car setups
  • Add support for showing revs as a % of max revs
  • Add player names. Unfortunately, sending out any unencrytped personal information from the game is not permitted. We are unable to do this directly from the UDP stream in this way, so this might need some more thought to give the desired result.
  • Continue running telemetry data after the race ends. Presumably this is for recording output for MP races. This is difficult as the output stream is also used by steering wheels and motion platforms and the intention is always to stop outputting to them when the player is no longer driving the car. We need to consider this one more carefully to see if both uses for the data can be accommodated.
  • EDIT: Option for a unique session ID to help correlate telemetry results


@Hoo Really appreciate your efforts in trying to make telemetry more accessible to users. I have made a telemetry app for my personal use. I only mostly do time trials with different setups and would really love to have a CarSetupData object added to telemetry so I can compare which aspects of the setup vastly affect lap times. 

Share this post


Link to post
Share on other sites
Spotted an issue with m_time

As I understood, this is the number of seconds passed in the current session, However, looking at a data log from an online race, it was only going up by about 0.3 per second.
In the absence of a session ID field I've been using a calculated session start time to group data streams and this throws my numbers off. Any idea what's caused this?

EDIT:  On further checks, it looks like it m_time increases by around 1/60th per packet. A hangover from the telemetry sending a packet each frame perhaps?

Share this post


Link to post
Share on other sites

Okay so someone else has noticed too this is good, well bad but good.

Noticed this in SLIMax VDASH-EMU when setting up a template to work with 2017, as has @zappadoc but not to the same extent I have, weird.

Just sitting in the pits from start of a practice session, which allows the current lap time to continue to count up, elapsed time will lag behind by about 3 seconds every 10 second and 3 minutes after 10.

When same template used on 2016 both clocks stay pretty much in sync.

Share this post


Link to post
Share on other sites
I have come across some bugs with the telemetry
1. Time remaining for "one shot qualifying" (confirmed) and "Time trail" (so ive been told) is a very large number "3.402823E+38"

2. Sector number appears to get frozen on real players in a MP session which are being simulated during network connection issues? In race i did (which i have the telemetry recorded for analysis) one of the players was stuck with "Sector = 2" for three whole laps (lap number was increasing, sector never changed). I suspect the player might have been having connection difficulties and their telemetry may be being simulated? if this is the case then it may be a bug that the simulated player is not updating the sector field in the telemetry. This causes major headaches trying to process the timing data if the sector number is not ticking over correctly.

3. Player positions get messed up after the session has finished. In the same race mentioned above, the player (data screenshots below) crossed the line in 13th position, however after crossing the line they suddenly jumped up to p2, then p1. The other players all got shifted +1 in their positions in the data being received. So the real race winner was suddenly p2, p2 was p3, p3 was p4 etc. 
You can see from the screenshots below that Track Position goes from 13 at the end of the final lap (5 of 5), then drops to 2 and then 1 for the remainder of the telemetry packets being sent. The second screenshot below is the results from the game itself. The data is for the player shown in P13 in the second shot "Mortician" (Fernando Alonso), so clearly P1 is the wrong value in the telemetry as the race was won by dancslaslzo14 (Lewis Hamilton). 

The player "Mortician" who incorrectly moved from p13 to p1 in the telemetry post race is the only driver who has a time penalty, perhaps that is related to the reason why their position got screwed up in the telemetry output? Just a thought.

Share this post


Link to post
Share on other sites
Hey guys,
My name is Mark and I'm from Germany. I'm not a programmer and you can call me an absolute newbie when it comes to java, c++ or whatever. My job is to programm industrial computers like Siemens S7-1500. So i just had the idea to connect a PS4 Formula 1 game to a Siemens S7-1500. The difference here is 1. Big/Little Endian (in the pic you can see that i changed the variables) and 2. the different variables between Siemens-structure and yours (especially times and positions!).

So my question is: can someone explain me how you guys "interpret" your time variables? like "m_time" maybe. How is it send, which order? Is there one Byte for the secons and the other Byte for the minutes? To explain you my problem i can give you a picture from my screen (end of this post). As you can see i just see the Bits/Bytes/Words in my Real-variable "m_time".

Next question is : Why do the world position variables not "standing still" when i don't move the car? I have Real-variables and it seems like they are dancing. How do i have to interpret them or calculate them to something usefull?

Thanks everyone who can help! Hope i can take revenge sometimes!

here is the pic: http://666kb.com/i/dmbcsa5tr2gokrgg0.jpg

Share this post


Link to post
Share on other sites
eXe131091 said:
Hey guys,
My name is Mark and I'm from Germany. I'm not a programmer and you can call me an absolute newbie when it comes to java, c++ or whatever. My job is to programm industrial computers like Siemens S7-1500. So i just had the idea to connect a PS4 Formula 1 game to a Siemens S7-1500. The difference here is 1. Big/Little Endian (in the pic you can see that i changed the variables) and 2. the different variables between Siemens-structure and yours (especially times and positions!).

So my question is: can someone explain me how you guys "interpret" your time variables? like "m_time" maybe. How is it send, which order? Is there one Byte for the secons and the other Byte for the minutes? To explain you my problem i can give you a picture from my screen (end of this post). As you can see i just see the Bits/Bytes/Words in my Real-variable "m_time".

Next question is : Why do the world position variables not "standing still" when i don't move the car? I have Real-variables and it seems like they are dancing. How do i have to interpret them or calculate them to something usefull?

Thanks everyone who can help! Hope i can take revenge sometimes!

here is the pic: http://666kb.com/i/dmbcsa5tr2gokrgg0.jpg

Hi Mark,

If you have no way to convert bytes directly to a struct, you will need to write a function to extract the value of the floats from the raw byte data. The following is a lua example of getting the float value from 4 bytes. Re your byte order, you can easily handle that by just swapping the order you load the bytes into data1, data2, data3 and data4. The keyword "local" below is how you declare local inline variables in lua. The % is a mod statement, mFloor is a math.floor function (or truncate if you want to think of it that way) and mLdexp is the equiviant of the ldexp function in c. If you can replicate this in your system, you should have no problem parsing the telemetry data. Once you extract a variable like time into a float, the float represent the time in seconds. So a value of 1.5 is 1 second and 500 milliseconds.

local function getfloat()
        -- extract 4 bytes of data into the variables data1, data2, data3 and data4
        local data1, data2, data3, data4 = rawData:byte(rawOffs+1, rawOffs+4)
        rawOffs = rawOffs + 4

        local sign = 1
        local mantissa = data3 % 128
        mantissa = mantissa * 256 + data2
        mantissa = mantissa * 256 + data1

        if data4 > 127 then
            sign = -1 
        end

        local exponent = (data4 % 128) * 2 +
                          mFloor(data3 / 128)

        if exponent == 0 then 
            return 0 
        end

        mantissa = (mLdexp(mantissa, -23) + 1) * sign

        return mLdexp(mantissa, exponent - 127)
end

Re your question about world positions, they dont change at all while in your pit box. The will start changing the moment you choose to drive out of the pits (under ai control) and obviously once you are in control of the vehicle. If you are seeing weird values then you are probably not processing the data correctly. Dont forget the packet size is always 1237 bytes (for F1 2017 patch v1.3+, you can check this on the main menu of the game). If your packet size is out, you will be getting all sort of random values. There is no structure packing either, so you dont need to align to 32 bit boundaries. 

Share this post


Link to post
Share on other sites
Hey,
Thanks for you answer!
Maybe I don't get it but the float value I'm receiving is something like you said. It's like "1.5" but(!) I have to multiplize it with 5 to get the correct seconds in session. Like when I'm m_time=5.7486 secons in session my real session time is 5.7486*5 = 28.743 (example). I recognized this "failure" when i was stopping the time in session with my mobile ;D.

Like you said world positions change when I leave the box. I think it's the same thing like the m_time. My values are "dancing" until i change them into the right order. But what does a "position" stand for and what can i do with it? First it's just a value for me..but is it something like meters or how do i have to interpret it?

The receiving bytes is 1237 so i think this is correct. I think i'm able to calculate everything with a real physical unit (and %, too), but the rest is just a "value"?

If you want pictures i can show you.
Thanks a lot!
Mark


Share this post


Link to post
Share on other sites
eXe131091 said:
Hey,
Thanks for you answer!
Maybe I don't get it but the float value I'm receiving is something like you said. It's like "1.5" but(!) I have to multiplize it with 5 to get the correct seconds in session. Like when I'm m_time=5.7486 secons in session my real session time is 5.7486*5 = 28.743 (example). I recognized this "failure" when i was stopping the time in session with my mobile ;D.

Like you said world positions change when I leave the box. I think it's the same thing like the m_time. My values are "dancing" until i change them into the right order. But what does a "position" stand for and what can i do with it? First it's just a value for me..but is it something like meters or how do i have to interpret it?

The receiving bytes is 1237 so i think this is correct. I think i'm able to calculate everything with a real physical unit (and %, too), but the rest is just a "value"?

If you want pictures i can show you.
Thanks a lot!
Mark


Perhaps try a different field than m_time, i dont use this field myself and i believe some others have reported issues with it updating intermittantly. Instead try looking at the m_session_time_left which was added for patch v1.3. I used this value myself and know it works fine (except in time trial or one shot qual where it just gives a massive number). Test against a quick race, any car/track, set prac to 30 mins and then try and read this value, i know in this situation it works correctly and it will be a way to test your decoder.  Most of the telemetry is floats, so even things like RPM, throttle position etc are easy enough to test with as well.

Share this post


Link to post
Share on other sites
Slowish said:
Is there a way to provide Engine RPM in % for LED RPM light arrays?

I use SimDash with both a DLC-247 and ProRace2 LED displays but, have to assign actual RPM values for each LED and make custom profiles for each car in Dirt4. With all other titles, RPM% automatically provides relevant RPM values for any car using a single SimDash profile.
I am using a Monstadash (DLC-247) and the Engine RPM% was supposed to have been implemeted according to the first page of this thread, yet its still not working.. I have made a profile to use %RPM for my LED's but im getting nothing via my dash. so once i checked the telemetry the game is not sending a percentage value for RPM whatsoever.

is Percentage RPM now supported or not?

Also can someone please also explain how were now supposed to use more than 1 UDP device?,F1 2016 gave you options to add up to 4 UDP devices with seperate ports.  Now if i try to run my MonstaDash LED which reads from port 20777 and then run a android app such as RS Dash it will try to read from the same port and all it creates is huge lag obviously as multiple devices cant share the same port number

Whos bright idea was to remove the multiple udp port option by adding broadcast mode instead? Ive tried using broadcast mode and all i get is my Monstdash light array working and the RS Dash android app is lagging like hell because its trying to use the same port!

Their advise is to use broadcast mode so it can use multiple devices on the same subnet! WRONG!!!!!! maybe for multiple versions of the same app perhaps, but not seperate devices. Each device needs their own port number and you've removed that option!

Come on guys fix this udp issue please|!!!

UPDATE** Ive now found how to get around the single port limitation by using Codemasters Proxy Server (CMPS) from EKSimracing.. Works poerfectly for adding multiple devices via the proxy server.. so issue resolved thanks

Share this post


Link to post
Share on other sites
Found another issue.
As a test in our league I've asked one of the streamers to set the telemetry up to see if the spectate mode sends data correctly.
I am receiving data from him but all the fields are coming across as 0. There's no car data for the cars that are actually in the race. He started off in one of the spectate slots

Share this post


Link to post
Share on other sites

×