Jump to content Jump to content

F1 2019 UDP Specification


Recommended Posts

  • Codemasters Staff
On 2/14/2020 at 12:53 AM, LonelyRacer said:

@Hoo  @Faya

When testing new version of my Telemetry tool + the 1.21 version, I found out, that the G-forces are not working correctly, i.e. values remain 0 most of the time and there are just occasional blips in the data. This happens in all Telemetry frequencies, but is extra bad on the lower ones (20Hz and 30Hz). See the image:

v121_gLat_bad.png.27becd08f7e6fe6393802b0c195c23bb.png

This same bug was in F1 2018 and is now back. I don't know, in which version it came back. One of the older versions it was ok (the last good fastest lap file is dated Nov 2, 2019).

You can see from one of the saved old laps in the image below, how the data should look.v1x_gLat.png.f28e20816924f6a9b1211e063219ee82.png

Hi @LonelyRacer, we think we've worked out what the issue is here. It seems to relate to how / when the telemetry system acquires updates from the physics system, particularly when the frame rate and telemetry update rate are not in sync. I'm not sure when we might be able to get a fix out for this, but you may be able to smooth this out by adjusting your frame rate and UDP update rates. 

Link to post
Share on other sites
21 hours ago, Hoo said:

Hi @LonelyRacer, we think we've worked out what the issue is here. It seems to relate to how / when the telemetry system acquires updates from the physics system, particularly when the frame rate and telemetry update rate are not in sync. I'm not sure when we might be able to get a fix out for this, but you may be able to smooth this out by adjusting your frame rate and UDP update rates. 

Hi @Hoo,

Thank you for the update.

My normal gaming setup gives me on the benchmark average 167 FPS (min 125, max 208) and I run the Telemetry typically on 60hz. My users are running in all 30hz, 30Hz and 60Hz modes with varying FPS (from consoles to PC).

I haven't heard comments from my users about the G-force values, so my guess is that those on consoles don't notice this, only the higher end gaming PCs will see the issue and typicall people use the saved Telemetry data to analyze offline key inputs vs laptime and/or use the live data/race history to work their race strategies, and none of these need "smooth" Gforce data.

I tried to limit the FPS etc with not much success. Only when I enabled the VSYNC, I started getting better data, but still there were occasional dips in the data. For some reason the game is not playable with VSYNC, as I get constant minifreezes, so I cannot use it.

Cheers

Link to post
Share on other sites

Soory everyone but i have a dummy question.

i'm trying to use telemetry in Cloud Env. (AWS). everything arrives with all the data but How can i use  data from my vehicle and not for other ?

in other word is there a why to filter telemetry or motion or car setup data in order to have a console with my driver?

 

thanks a lot

Link to post
Share on other sites

hey giuseppeb,

in the header you have this field:

 uint8     m_playerCarIndex;

Use it for finding your car.

If your programming language starts indexing with 1, e.g. lua (and not 0 as most languages) you will have to add 1 to it first. 

Edited by moole1337
Link to post
Share on other sites
2 hours ago, moole1337 said:

hey giuseppeb,

in the header you have this field:


 uint8     m_playerCarIndex;

Use it for finding your car.

If your programming language starts indexing with 1, e.g. lua (and not 0 as most languages) you will have to add 1 to it first. 

Thanks but i have always a fixed number 19 . My question is for example in telemetry i receive all cars information, is itpossible to filter only for my car ? (player on xbox for exmple) , and like this for motion or event ?

 

Link to post
Share on other sites
  • 4 weeks later...
  • 3 weeks later...

Hello

I try to just read the data with my mac, app terminal and a PHP code. (i don't know code in C#)

this is my code :
 

error_reporting(~E_WARNING);
if(!($sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP))) {
   $errorcode = socket_last_error();
   $errormsg = socket_strerror($errorcode);
   die("Couldn't create socket: [$errorcode] $errormsg \n");
}
echo "Socket created \n";
if( !socket_bind($sock, "0.0.0.0" , 20777)) {
   $errorcode = socket_last_error();
   $errormsg = socket_strerror($errorcode);
   die("Could not bind socket : [$errorcode] $errormsg \n");
}
echo "Socket bind OK \n";
while(1) {
   echo "\n Waiting for data ... \n";
   //Receive some data
   $r = socket_recvfrom($sock, $buf, 10000, 0, $remote_ip, $remote_port);
   echo "\n$remote_ip : $remote_port -- \n" .$buf;
}
socket_close($sock);

 

and this is the result i get :

 

 Waiting for data ... 

192.168.1.46 : 60913 -- 
??
  C(3?A>??E>??E??=CB?-@??;D??)@?&!??
                                    ?<@0W?~v?>TꜼ@?s??s?	G<????=??$?>???>??@?]?????@?????+@'?)@Y?+@Ĥ)@??L6P???7?@i????~н???E??P?HP?H A?B@pQ?ApQ?ApQ?ApQ?A?A?A?A?A??9??E???B?TF`?EA?B?u?<?c<?t??9??;dddd<%?????=CB?-@??;D???B(3?A???B>??Edo&???	=@n
                                                                                                   ?C???B???B :?e???·?E@???C?	?EfBKZ<@^	?Cp?Bp?B`|?g???? K@?5?Cĉ?Eg?}??8O@6??C;J?Eg%??½?P@_??C?	?Eg
p?®XT@?5?CeʣEg??}sT@&D뉣E<?T¤X@?aD-J?Egk?O?6?Y@*?D?	?Eg	ˊ&±T\@;'D;ʢEg!<!??]@??D???EgT??dkg<??<?/??,??;??)@S??Cj???*?B"??˕y=WH?;Ab7?
 Waiting for data ... 

192.168.1.46 : 60913 -- 
?

 C???A;??E;??Etz=C??-@??;DN?&@Z???=@}S?U?>?????s?4?s??<????,??=5	>?Yl>W
???X@????&&C@R(@??&@?V(@N?&@??L6P???7?@?6?ƽн????E??P?HP?H A?B@pQ?ApQ?ApQ?ApQ?A?A?A?A?A??9??E???B?TF`?EA?B?q:tܬ???Io?dddd<%???tz=C??-@??;D???B???A???B;??Edo&???	=@n
                 ?C???B???B :?e???·?E@???C?	?EfBK?°Z<@^	?Cp?Bp?B`|?g???? K@?5?Cĉ?Eg?}??8O@6??C;J?Eg%??½?P@_??C?	?Eg
pXT@?5?CeʣEg??}sT@&DE<?T¤X@?aD-J?Egk?O?6?Y@*?D?	?Eg	ˊ&±T\@;'D;ʢEg!<!??]@??D???Eg3???0j<???<??꼘?3<P?&@73????C?W??Ԭ?C?*?????;?T?<
 Waiting for data ... 

Do you know what i am doing bad ?

 

Thanks by advance

 

Link to post
Share on other sites

I try to make a decode with a php fonction for little Endian. without any success. 😕

What a read about little endian and what i get, it's not really the same. So it's why i came here to ask what i am doing bad

Edited by ThibaudPHP
Link to post
Share on other sites
58 minutes ago, ThibaudPHP said:

i try all LE encoding possible. utf16-le, utf32, ucs-2, ucs-4. with this fonction mb_convert_encoding($buf, 'UTF-8', 'UTF-16LE');

@Hoo Do you know what i miss ?

Well, I could give you all the fish, but then you would not learn how to catch the fish.

I assume most people don't answer these questions here, as they have learned the stuff by error and trial with plenty of sweat. E.g. with F1 2012 there was no data structure available. You had to first look at the feed, use Wireshark or similar to check the byte arrays sent by the game. And when you got the numbers sorted out, you had to try to understand, what each value was for. And only then could you start building your app/tool.

But now it is much easier, but I still prefer that people have to learn the stuff at least on some level ...

Here is my help.

On the fist page of this thread there is description of the different packets. Each packet has a header

struct PacketHeader
{
    uint16    m_packetFormat;         // 2019

So you might want to first learn, what is uint16 and what it means. Then you need to find a way to convert the uint16 to a a value via PHP. Luckily for you, you know that the first uint16 must return 2019. When you get this far, i.e you get the 2019, then you can dive into getting other fields from the header. And then use the header data to see, which packets you are receiving from the game and keep going on parsing the packets. When you get that far, you can start thinking what you will do with the data.

Happy learning.

  • Agree 1
Link to post
Share on other sites

Hello guys.

Have you already receive a nationality with 87 ?
I read on the forum someone who complain about Event packet. I don't receive Lot of them. FTLP, RTMT, DRSE, DRSE, CHQF, RCWN. I can be in spectator or in race. they never came 😕

For the nickname, if someone put his telemetry public, why don't share this nickname ? He is already okay to share data.

 

In unranked lobby, i am more participant in the packet than cars in race. It's keep people who was before on the lobby and who earned point ??


Thanks

Edited by ThibaudPHP
Link to post
Share on other sites
  • 2 weeks later...

Hello,

I don't have a lot of answer 😞 I am a fisher now. I know use all the stuff like you.

I have new problem. I just want to know if you already have the same issue with datapacket 6

23418 -- Tour 3 -- 4.0037984848022s -- 343.3017578125m -- 322km/h -- Throttle : 1 -- Steer : 0.002777099609375 -- Brake : 1.52587890625E-5 -- Clutch : 0 -- Gear : 8 -- EngineRPM : 11030

(i have this value when my pedal is not press by my foot)


23432 -- Lap 3 -- 4.3207778930664s -- 370.748046875m -- 293km/h -- Throttle : 3.0517585400958E-6 -- Steer : 0.01666259765625 -- Brake : 0.892333984375 -- Clutch : 0 -- Gear : 7 -- EngineRPM : 11200
 

(i have this value when i break)

What i miss to have this sort of data ? I must have for both between 0 and 1.  Do you have the same issue ?

Take care and thanks

Link to post
Share on other sites
On 3/17/2020 at 11:16 AM, giuseppeb said:

Thanks but i have always a fixed number 19 . My question is for example in telemetry i receive all cars information, is itpossible to filter only for my car ? (player on xbox for exmple) , and like this for motion or event ?

 

@giuseppeb You've no choice but to receive all the data that's sent in the packet. It's up to pick out what you want i.e. from position 19 in the array.

Edited by EdStarsBoss
Link to post
Share on other sites
  • 2 weeks later...
On 5/12/2020 at 2:02 PM, ThibaudPHP said:

Hello guys.

Have you already receive a nationality with 87 ?
I read on the forum someone who complain about Event packet. I don't receive Lot of them. FTLP, RTMT, DRSE, DRSE, CHQF, RCWN. I can be in spectator or in race. they never came 😕

For the nickname, if someone put his telemetry public, why don't share this nickname ? He is already okay to share data.

 

In unranked lobby, i am more participant in the packet than cars in race. It's keep people who was before on the lobby and who earned point ??


Thanks

I know this is an old post but nationality 87 is Barbados (ISO Numeric Code 052)

Also it seems you do not get event packets unless you are a participant of the race. You will get DRSE, DRSD, SSTA and SEND, but that's it.

Edited by gparent
  • Like 1
Link to post
Share on other sites
  • BarryBL unpinned this topic

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