Jump to content Jump to content

F1 2021 UDP Specification


BarryBL
 Share

Recommended Posts

On 7/15/2021 at 12:26 PM, Lopensky said:

Ok thanks! So I'm probably missing something within the released game packets' format, I'll check it out and let you know what the problem was, just for completeness. ☺️

@Lopensky Did you figure this one out? I have the same issue, suspecting that I'm not handling the float data-type correctly (programming an Arduino board to parse the udp-packets)

Link to comment
Share on other sites

Hello,
I have a couple of issues:

1) is the number of "warnings" in lap data available only for the current player / public telemetry? 
2) I have a strange behaviour with "revLightsBitValue" of "CarTelemetryData". It works different depending on the session type (Time Trial / GP mode). Actually I see that also the lights in the game work different depending on the session type, but again different from what I read from revLightsBitValue. I'm now using  "revLightsPercent" to be more consistent. Does anyone played with it?

Edited by emln22
Link to comment
Share on other sites

17 hours ago, emln22 said:

1) is the number of "warnings" in lap data available only for the current player / public telemetry? 

I think this may be a bug in the data still? Back a few pages they had confirmed that most warning types are not being tracked - never saw anyone that it was confirmed fixed and I am seeing the same thing in my application as well.

Link to comment
Share on other sites

  • Codemasters Staff
5 hours ago, Rawrocopter said:

@Hoo can you confirm whether or not warnings are working properly in the LapData packet? I saw it was confirmed as a bug 4 or 5 months ago.

Unfortunately these are not working at the moment. The bug is on the team's backlog, but not sure when they can get to it.

Link to comment
Share on other sites

@Hoo Can you confirm that there are no Session packets (packetId 1) sent prior to "race start"?

I was trying to make an external monitor show basics about the race (track, driver details , grid position etc) while just sitting in the car, BEFORE startlights come on, but it seems I only have a few splitseconds where this information is available, as I have to actually start the race before the first packet (apart from packet Id 3) are even sent.

Can you confirm this (so I'll just need to scrap my idea), or am I missing something?

Link to comment
Share on other sites

On 2/27/2022 at 7:46 PM, Lawranio said:

Hello everyone.

I am able to send data to another network, to my friend's computer for example, or only to computers in the same network?

If so, do i need any extra settings?

You can send data to  ONE IP in the internet, or to any host in your subnet (broadcast).

 

Link to comment
Share on other sites

Sharing a builder-project from my racing setup: A "marshall board" using the telemetry data from F1 2021 to show lights out, current position and other info during the race - plus a couple of easter eggs 🙂 . Using a ESP32 Thing with built in wireless capabilities, powering a 64x64 LED panel. All the flickering is just from the video-capture, in reality the panel is completely steady.

 

  • Like 1
Link to comment
Share on other sites

On 7/8/2021 at 7:38 AM, BarryBL said:

Here is the latest specification for the UDP telemetry system for F1 2021. Please note that we've opted for posting a document with this info rather than adding this into the forum as this is easier to work with. The spec should be downloaded from here:

 

Below is a summary of the various updates and bug fixes added to this year's game. A big thanks to everyone who has contributed suggestions and reported bugs with system over the past year, plus an extra shout out to the beta group who helped test this out ahead of release.  

 Fixed Pre-Release

  • Add number of warnings in a lap into LapData packet => We have added the number of warnings a driver has to the lap data
  • Add a means of detecting when a stop-go penalty has been served => We have added an event which fires when stop go and drive through penalties have been served
  • Add a way of indicating when a player is in a paused state => This will trigger after 3 seconds of being paused in an online race
  • Add a means of detecting frames being replayed due to flashbacks => We have added a new flashback event that gives enough info to work this out
  • Update UDP to include new Unreliable Weather Forecasts feature => Done
  • Add engine wear/damage to the telemetry output => Done
  • Add info to show which rev lights are illuminated => Done
  • Add new damage parts to the data => Added floor, diffuser and sidepod damage
  • Add the driver number to UDP output within the lobby => Done
  • Tyre wear values should be floats not ints => Done
  • Driver IDs are now conflicting => We have added a new network Id so that we don't need to offset by 100 now
  • Traction Control is only showing values of 0 or 2 => This was working, but not shown in the docs. These have been update now
  • Time for ghost cars are not displayed in telemetry output => Re-enabled now
  • No enum value 0 => We have now made the values 255 for invalid items
  • Provide information about all assists used => We have added Steering, Braking, Gearbox, Pit, Pit Release, ERS & DRS
  • Add AI difficulty information => Done
  • Add identifier to link all sessions within a race weekend => Done
  • Add identifier to link all sessions within a career season => Done
  • Add an identifier to link restarts of the same (offline) session => Done
  • Add lap and sector info for the previous lap => We have added a new Session History packet which gives a list of all the laps in the session
  • Add info for pit stop strategy / windows => Pit window and rejoin position info added to the data
  • Show number of pit stops taken => Done
  • Show tyres used in session history => We have added a new Session History packet which gives a list of all the tyre stints in the session
  • Add data to show status of start light sequence => We have added "Start lights" and "Lights out" events to the UDP
  • Set m_tyreAgeLaps as public => We have removed the tyres age from the restricted list
  • Add the PIT stop time => We have added pit timings for all vehicles
  • Add number of warnings in a lap into LapData packet => We have added the number of warnings a driver has to the lap data
  • Add a means of detecting when a stop-go penalty has been served => We have added an event which fires when stop go and drive through penalties have been served
  • Add a way of indicating when a player is in a paused state => This will trigger after 3 seconds of being paused in an online race
  • Add a means of detecting frames being replayed due to flashbacks => We have added a new flashback event that gives enough info to work this out
  • Add DRL assist info into SessionData packet => this has now been added
  • Convert all time-based units to the same type and unit => time-based units will use milliseconds as ints where possible (note the a few of these still work in seconds and total lap time is a double). Please let us know if there are any issues or changes needed to this.
  • Wear data is not updating in solo play => we tested this one and think it should be working as expected. Let us know if you are still having issues
  • Add an invalid lap flag to LapHistoryData => added the invalid lap, together with the sector validity as well which gives a bit more information.
  • m_buttonStatus bits for L2 and R2 are over-written if using steering wheel
  • Send PacketCarTelemetryData and m_buttonStatus data after race has ended
  • Unable to retrieve LapHistoryData for the final lap

Fixed in Future Patch Release (date tbc)

  • Add extra byte to indicate if this is the final packet in a batch => we didn’t want to change the packet structure at this stage, so instead have made a change so that the final session history packets are sent AFTER the final classification packet, so if you watch for the session ended packet. This change is expected in a future patch of the game.
  • Incorrect number of laps reported in Final Classification info => fixed and due for release in a future patch
  • m_resultStatus shows as "active" after the race has finished
  • LapHistoryData is not sent for an active car following retirement of another car => we will now update this data for all cars, even if they are retired

Still Open

  • Session History info from previous session is sent following a restart
  • Refresh rate requires "hz" suffix
  • Some values not updating on the correct frame when crossing lap boundary
  • No way of linking player data using m_name => This is an old request. We are working with our legal teams to find a way of providing this functionality in the future

Won’t Fix

  • Sum of sector times don't match total lap time in SessionHistory data => we believe this is a result of rounding / precision issues. The current UDP data for SessionHistory matches our in-game lap time UI output, so we will leave this as it is for the time being. We have a task on our backlog to investigate these precision issues in the future.
  • Add lap tyre info into the final classification packet for the best lap => would require a change to the format which we don’t want to do now, so we’ll look at this for a future project
  • Consider moving assistOn packets to the PacketLobbyInfoData => this is not really possible to support due to how the network game works. If you see any instances of assist restrictions not working then please let us know.
  • Add time delta to car in front and behind => This is an old request. As previously stated, players have enough data to produce their own delta time system so we will not be implementing this
  • Inlap times are not displayed in the telemetry output => We are unable to accommodate this request the behaviour is based on how the game handles inlaps and outlaps. We can't provide the requested functionality without re-writing much of the game logic in this area (which we aren't able to do).
  • Driver number does not update when taking control of a vehicle => We are unable to fix this as driver customisations are handled when first launching a session and do not get updated when players drop into a race mid-session.
  • Increment laps to accommodate outlaps and inlaps => We are unable to accommodate this request the behaviour is based on how the game handles inlaps and outlaps. We can't provide the requested functionality without re-writing much of the game logic in this area (which we aren't able to do).
  • Increase the number of buttons sent in m_buttonStatus to 32 => We aren't able to accommodate this request. It would require us to expose axes, of which there are many and they would be different on the many wheels we support, so this would be too large a task to look at now.

Data_Output_from_F1_2021#51a.docx 105.42 kB · 343 downloads

Just curious but would you consider putting the API specs going forward somewhere on a public internet like github, gitlab or bitbucket? I ask because I find it much easier to version API code this way instead of a docx format. Not sure how others feel but as a developer that builds software with your API, I would find it much easier to consume. Thank you for you consideration and thank you for making such an awesome game!

Edited by codylane482
Link to comment
Share on other sites

10 hours ago, codylane482 said:

Just curious but would you consider putting the API specs going forward somewhere on a public internet like github, gitlab or bitbucket? I ask because I find it much easier to version API code this way instead of a docx format. Not sure how others feel but as a developer against your API, I would find it much easier to consume. Thank you for you consideration and thank you for making such an awesome game!

ANYTHING would be better than a docx .... At least with previous versions as text in a post, it became searchable via Google etc

If it's a public API lets have it documented in a better way, in a better location.

  • Like 1
Link to comment
Share on other sites

17 hours ago, AndyHamp said:

ANYTHING would be better than a docx .... At least with previous versions as text in a post, it became searchable via Google etc

If it's a public API lets have it documented in a better way, in a better location.

Agree, even if was properly utf-8 encoded would be much easier to consume. It's hard to work around problems that get generated with something like docx IMHO. I hope this is taken with some consideration because I love this game and I want to make sure I can iterate faster on new releases. Thank you!

Edited by codylane482
Link to comment
Share on other sites

  • 2 weeks later...
On 3/31/2022 at 2:59 PM, Andref2015 said:

Hi, there are any possibility to know the participants name and no show "Player"? 

This has been requested many times. Unfortunately Codemasters so far has not been open to exposing the participants actual name, or Steam ID, or any other identifier. Apparently the blocker is legal / privacy. I agree though that exposing some sort of unique identifier, ideally the actual username, would be extremely valuable. 

Link to comment
Share on other sites

On 4/9/2022 at 9:15 PM, edhor1608 said:

Do the values (image) of the motion package for Jeddah, especially the worldPositions, look correct ? because I have problems to map a track map over these data...

Unbenannt.jpg

Unfortunately the game co-ordinates do not match the real world in any way 

Link to comment
Share on other sites

On 9/2/2021 at 6:31 AM, ericgvmaia said:

Another question:

In the CarDamageData, the m_rearWingDamage is ALWAYS zero! The only car that has the rear wing damage registered is the USER car.

It is always zero for every other player.

Also happening with m_floorDamage, m_diffuserDamage, m_sidepodDamage.

And yes, their telemetry is public.

m_frontLeftWingDamage and m_frontRightWingDamage are being registered correctly.

Anybody else noticed it?

Thanks!

Dear @Hoo
Since september.
We have been very patient and it's time, to show us, some love, with a fix on that.
Please
My best regards
Thibaud, a friend who want only happyness and damage data on Playstation.

Link to comment
Share on other sites

Hello,

i'm using a ESP32 with a Nextion. I have a Problem with ERS:

Reading the Value from Package Car Status:

Offset= 24 (Byte 0..23 Header)

Calculate Position: Pointer=Offset+(player*47);

      u.b[0] = packetBuffer[Pointer+29];
      u.b[1] = packetBuffer[Pointer+30];
      u.b[2] = packetBuffer[Pointer+31];
      u.b[3] = packetBuffer[Pointer+32];
      ErsStoreEnergy=u.fval;

But is always 0.0

All _fuelRemainingLaps, m_ersDeployMode are all correct. What happens??

 

Regards Sascha

 

Edited by SaschaFocus
Link to comment
Share on other sites

  • 3 weeks later...
  • Codemasters Staff

There will be a few changes to the telemetry spec in F1 22. Once this is locked down we will get it published on the shiny new EA forum. I'll link to it in this thread once it's there. 

  • Like 1
  • Thanks 3
Link to comment
Share on other sites

@HooAnd plz do the following change for the UDP 2022 Spec:

LapHistoryData data package:

uint16 is a little bit too small for m_sector(X)TimeInMS data for slow drivers, when they need more than 65,535 seconds per sector? (e.g. safety car phases)

We have then an overflow value problem.

Please spend some more bits for that.

Link to comment
Share on other sites

Hello!

I am currently working on a telemetry application for time trial laps and it seems like not all data needed is being sent via CarTelemetryPacket for rival and personal best ghosts. I am able to receive speed, brake and gear information for these two ghosts, but not throttle and steering input.

What`s wrong? Is it restricted data specially for time trial?

That app is my graduate work so quick answer is much appreciated 🙂

Link to comment
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.

 Share

×
×
  • Create New...