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
  • 2 weeks later...

Hi,

Just got interesting data from a user on PS4 (F12020, version 1.19), where the game is not sending the Motion packets at all. Other data comes as it should.

Has anyone encountered this? What could be the reason for it?

@Hoo Is this missing Motion packets on F12020 PS4 version 1.19 something that should be checked.

Cheers

Edited by LonelyRacer
Added plural, as there are no Motion packets sent.
Link to post
Share on other sites

In some of the various apps out there, they display a track map of the circuit. How have people created the map ?

I have captured maps simply by driving the centre line but that's a painful process to do to generate the display maps..... how have other people done this ?

Link to post
Share on other sites
2 minutes ago, AndyHamp said:

In some of the various apps out there, they display a track map of the circuit. How have people created the map ?

I have captured maps simply by driving the centre line but that's a painful process to do to generate the display maps..... how have other people done this ?

For F1 games there is not other way, and same applies to most games. In the old F1 games you could take some of the data from the track definition files, but not anymore. If one could "knife open" the resource files, one might be able to construct the track maps that way, but I don't know it if is worth the effort.

So yes, doing a proper track map with boundaries, outer and inner limit, centerline + racingline + pitlane takes on normal track about 12 laps of slow driving, so you can look at about 30 minutes per track. And then you have games, like PC2, where there are 150+ tracks,  so it takes plenty of time to create high quality track maps.

I know some tools use the real-life maps, where you just then have to orient the map + see how the game's coordinates map on the  real map. In the literature for real life situations they often say, drive round the track limit on a cart/golf cart with GPS receiver and create that way the map, if there is no proper map available.

And some tools skip the pre-creation of trackmap and just generate it from the first lap driven using coordinates or the acceleration data. But then you cannot compare driving lines vs. the real lap boundaries, but that is the price you pay for not having a proper track map.

Cheers

  • Like 1
Link to post
Share on other sites
Posted (edited)
19 minutes ago, AndyHamp said:

In some of the various apps out there, they display a track map of the circuit. How have people created the map ?

I have captured maps simply by driving the centre line but that's a painful process to do to generate the display maps..... how have other people done this ?

Really depends on what you are planning to do. If all you want is move a circle around the track to show where the car is along the track, then the racing line generated from any lap should be sufficient in my opinion. There is actually an open source repository of maps that you can use for that (see https://github.com/f1laps/f1-track-vectors).

If you want to be "pixel perfect" then you would need to do something similar to what @LonelyRacer suggested above and somehow extract the data from the game files, this might land you in difficult waters though relating to the licensing of that data I guess.

Edited by cgfdoo
  • Like 1
Link to post
Share on other sites
23 hours ago, cgfdoo said:

Really depends on what you are planning to do. If all you want is move a circle around the track to show where the car is along the track, then the racing line generated from any lap should be sufficient in my opinion. There is actually an open source repository of maps that you can use for that (see https://github.com/f1laps/f1-track-vectors).

If you want to be "pixel perfect" then you would need to do something similar to what @LonelyRacer suggested above and somehow extract the data from the game files, this might land you in difficult waters though relating to the licensing of that data I guess.

That github looks interesting, especially as i was looking at generating a svg from the data points via D3 anyway. I guess the hard part with that is translating the x,y,z in the data stream to the svg... going to have to think about that one !

Link to post
Share on other sites
Posted (edited)

Hello, i have a question aboput motion data
 

    float         m_yaw;                      // Yaw angle in radians
    float         m_pitch;                    // Pitch angle in radians
    float         m_roll;                     // Roll angle in radians

i see m_yaw are heading of the car reference to the world, m_roll are angle of the car in roll axis reference to the world, but why m_pitch not angle of the car in pitch axis?

i have test this using Belgium map, Time Trial mode, for all F1 2020, F1 2019, F1 2018

Here is an example, F1 2020, in this test Image 1, we see the road are going down, pitch value are negative, and this Image 2 pitch value become positive i just go forward a bit in the same spot.

There is another spot in this map Image 3, when i going up, the pitch value are negative, but if i turn back (mean i will going down), pitch value are still negative. 

Am i read the value in the wrong way or maybe miss something?

 

Thanks for your help.

Edited by fs0
Link to post
Share on other sites

Hello, 

I based the recording state of my app on wether or not I am receiving packets. The problem is that when I pause the game, it stops sending packets, just like you are quitting the session. I've tried to use m_gamePaused from the session message but it always seems to give me 0, when I pause the game, it never sends a session message with m_gamePaused = 1 . It just stops sending packets, so I can't tell if the game is just paused or not.  

Did I miss something? 

Thank you very much. 

Wolfgang

Link to post
Share on other sites
22 hours ago, RFloww said:

Hello, 

I based the recording state of my app on wether or not I am receiving packets. The problem is that when I pause the game, it stops sending packets, just like you are quitting the session. I've tried to use m_gamePaused from the session message but it always seems to give me 0, when I pause the game, it never sends a session message with m_gamePaused = 1 . It just stops sending packets, so I can't tell if the game is just paused or not.  

Did I miss something? 

Thank you very much. 

Wolfgang

I haven't tried it but it could be that field only works for multiplayer. Because there even if you pause everything around you continues to run. Regarding your app, why not checking for SSTA and SEND events? If I'm not mistaken all valuable data is between those + classification packet at the end.

Link to post
Share on other sites
On 6/28/2021 at 8:17 PM, LonelyRacer said:

Hi,

Just got interesting data from a user on PS4 (F12020, version 1.19), where the game is not sending the Motion packets at all. Other data comes as it should.

Has anyone encountered this? What could be the reason for it?

@Hoo Is this missing Motion packets on F12020 PS4 version 1.19 something that should be checked.

Cheers

@Hoo

Got another user, where on PS4 (F1 2020, version 1.19) there is no motion packets sent. Is this intentional or is there some setting, which has to be enable to allow the motion packets to be sent. The issue is that the motion packet has the coordinates, so the track maps won't work.

Cheers

Link to post
Share on other sites
  • Codemasters Staff
27 minutes ago, LonelyRacer said:

@Hoo

Got another user, where on PS4 (F1 2020, version 1.19) there is no motion packets sent. Is this intentional or is there some setting, which has to be enable to allow the motion packets to be sent. The issue is that the motion packet has the coordinates, so the track maps won't work.

Cheers

The only situation I'm aware of that has this behaviour is if you are the second player in a splitscreen game - we only send motion data for the first player. There is possibly a bug caused by playing another session after splitscreen, or if switching players/profiles within the game, where the game might be getting the first/second player mixed up, but we'd need more info in order to investigate (i.e. the full set of steps that the player has taken since launching the game to repeat this problem).  

Link to post
Share on other sites
On 6/18/2021 at 4:09 PM, Hoo said:

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. 

@Hoo Any update on the UDP spec ? getting very close to release date now ....

  • Like 3
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...