Jump to content Jump to content

F1 2020 UDP Specification


Recommended Posts

  • Codemasters Staff

 

2 hours ago, emln22 said:

Hello,

my wish list is pretty simple:

1) m_tyresAgeLaps as public, since 2020 it's shown in the spectator menu, so it would make sense to have this property public also to telemetry data. Right now it's a bit tricky to have the tyre age if you don't record since the session start or if the drivers stays with the same compound after a PIT or if a drive through is served

2) have the PIT stop time

3) during the lobby would be nice to have drivers car number

4) Not sure if it's my implementation, but I've never been able to have the SpeedTrap event usable. It gives me non consistent data during online lobbies 

thanks!

1) This should be available now.

2) Can this be calculated using the m_pitStatus flags?

3) Done.

4) We changed how this works in patch 13, so it now has an extra couple of fields on the end and should now update each time a driver passes through (previously would only update if a driver set a new speed trap record). Apologies for missing this one - it was an old change that didn't make it into the build for quite some time, so got missed. New spec for the SpeedTrap event is:

    struct
    {
        
uint8 vehicleIdx;                 // Vehicle index of the vehicle triggering speed trap
        float speed;                      // Top speed achieved in kilometres per hour
        uint8 overallFastestInSession;   // Overall fastest speed in session = 1, otherwise 0
        uint8 driverFastestInSession;    // Fastest speed for driver in session = 1, otherwise 0
    } SpeedTrap;

  • Thanks 1
  • Agree 1
Link to post
Share on other sites
Posted (edited)

Hello, for F1 2021 PS4,

do you changed the revligthpercent mode. I'm explain. If i'm at full RPM, the packet data is at 100 and when the game is flash (light OFF) the data is 0. But data rate isn't synchronized with my LED display, and flashing isn't regular that's Horrible ! And i must calculated the approximate value.

Could you maintained the data at 100  ? and  send RPM flashing information on other data line

Edited by Thierthier
Change video
Link to post
Share on other sites
  • 2 weeks later...
On 5/17/2020 at 6:18 PM, Hoo said:

uint8 m_drsAllowed; // 0 = not allowed, 1 = allowed, -1 = unknown

Hi,

This field (m_drsAllowed) type is `uint8` but -1 = unknown. There seems to be something wrong here.

Link to post
Share on other sites
  • Codemasters Staff
On 5/30/2021 at 3:39 AM, anxl said:

Hi,

This field (m_drsAllowed) type is `uint8` but -1 = unknown. There seems to be something wrong here.

Thanks for the report. I've asked for clarification over what values this should be using.

Link to post
Share on other sites
  • Codemasters Staff

 

On 5/30/2021 at 3:39 AM, anxl said:

Hi,

This field (m_drsAllowed) type is `uint8` but -1 = unknown. There seems to be something wrong here.

This looks to be left over from the legacy format. We'll update a future revision of the docs with a correct value.

  • Thanks 1
Link to post
Share on other sites
  • Codemasters Staff

For anyone who was accepted into the beta, there is a provisional thread on the UDP system here: 

 

Please note that we cannot discuss the beta outside of the private beta forum, so do not respond in this thread. Instead, please keep all discussion in the beta thread linked above. 

Once the spec has been locked down, we'll post the finalised F1 2021 UDP spec in the public forum section before launch so that everyone can access this information.

  • Like 1
  • Agree 1
Link to post
Share on other sites

I'm interested in obtaining ghost data in time trials, aka rivals. But the data comes through very strangely for this and I was hoping somebody could help explain what I'm seeing. Is there a better forum to discuss these things, e.g. a discord channel?

In the Participants packets I see myself, an AI-controlled version of myself called `"Personal Best"` then ... as many as 11 variants of the ghost adversary, each with a different `teamId`. All the `driverId` are above 100 whist also marked AI controlled (which I suspect is an indicator I can use to detect ghosts). However, in the Lap data I see `m_driverStatus = 0, m_resultStatus = 0` for everybody except the primary driver. From this I have no clear way to detect the ghosts except to assume that the first driver named "Personal Best" is my ghost and the first driver after that with a non-empty name is the adversary. I also have no way to deduplicate their lap data, which would be useful since I can persist their laps and recover them later. I also have no way to see their best lap since `m_bestLapTime` is coming through as `0.0`. Their `lapDistance` also comes through as zero which makes the data somewhat meaningless anyway for what I wanted to achieve, although I can workaround that if the x,y,z data is available, although the worldVelocity information is missing (and I'll therefore have to infer it), and so is stuff like brakes / steering / etc which would have been nice to compare against.

I also have a few other questions about this data:

Is `lapDistance` the distance travelled by the care or the distance travelled along the track. These are subtely different, imagine driving zig-zag through the track, you would trace out a much larger distance travelled than someone who follows the inside or outside of the track boundary. One could imagine it would be the distance travelled tangentially to the inside or outside track (or a line directly down the middle of the track).

Is there a way to obtain vertices that define the track surface using the same coordinates as the x,y,z world in the position packets? e.g. for overlaying my position over a view of the track.

Link to post
Share on other sites
  • 3 weeks later...
On 6/1/2021 at 1:20 PM, Hoo said:

For anyone who was accepted into the beta, there is a provisional thread on the UDP system here: 

 

Please note that we cannot discuss the beta outside of the private beta forum, so do not respond in this thread. Instead, please keep all discussion in the beta thread linked above. 

Once the spec has been locked down, we'll post the finalised F1 2021 UDP spec in the public forum section before launch so that everyone can access this information.

@Hoo Do you know when the spec might be published ? Will it defiantly be before release date ?

Link to post
Share on other sites
  • Codemasters Staff
6 minutes ago, AndyHamp said:

@Hoo Do you know when the spec might be published ? Will it defiantly be before release date ?

Almost certainly! The aim is to release this spec in about 3 weeks time. Feel free to bump this thread if you haven't had any news by then. 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...