randyzwitch Posted March 5, 2019 Share Posted March 5, 2019 I'm trying to use the data from the carsmotion packet to plot where the car is during a lap. From the commercial dashboard products I've seen, the track behavior seems smooth and well-defined, but from my packets, the motion of the car implies that the tracks are intersecting at certain points. The attached picture demonstrates what I'm observing. This is on the 60-hz setting. Is it assumed that I should be smoothing/sampling the data somehow, or applying some sort of 'snapping' function to take the data from the packet and force it onto the track boundaries? Similarly, are there track boundaries (x,y,z values) we can use as a base image to understand how the track boundaries are defined in the game? Link to comment Share on other sites More sharing options...
DaveyGravy Posted March 8, 2019 Share Posted March 8, 2019 On 3/5/2019 at 1:50 PM, randyzwitch said: I'm trying to use the data from the carsmotion packet to plot where the car is during a lap. From the commercial dashboard products I've seen, the track behavior seems smooth and well-defined, but from my packets, the motion of the car implies that the tracks are intersecting at certain points. The attached picture demonstrates what I'm observing. This is on the 60-hz setting. Is it assumed that I should be smoothing/sampling the data somehow, or applying some sort of 'snapping' function to take the data from the packet and force it onto the track boundaries? Similarly, are there track boundaries (x,y,z values) we can use as a base image to understand how the track boundaries are defined in the game? I haven’t actually used this data in my app yet for mapping, but I have played around with it previously. From memory you need to use x and z to get a birdseye view of the track if that’s what you're after. I just dumped the data for these into Excel and drew a graph and it looked like the track in question. Link to comment Share on other sites More sharing options...
randyzwitch Posted March 8, 2019 Share Posted March 8, 2019 That did it, thanks (different track, but no crossover)! Link to comment Share on other sites More sharing options...
cjorgens79 Posted March 11, 2019 Share Posted March 11, 2019 Hi @Hoo There is an issue with the F1 2018 telemetry data with the race position fields getting scrambled right at the very end of a multi player session. As apps like mine quite heavily rely on the data from the telemetry, it is causing a number of issues for users who are seeing messed up positions in my online portal which they use to review sessions post race. I had one of my users record the raw telemetry data for me and can clearly see the positions of players getting jumbled as soon as the final player crossed the finish line. As its right at the end of the session, it only seems to be sending out a fairly small number of packets in this state before the telemetry stops altogether, but its enough for the app to be affected by it. I have also seen this happen at the end of qualifying sessions too, so i think its just something that is occuring right at the final moments before the session ends completely. I can provide the raw UDP stream recording if you like, or if you need me to provide further info in order to track this down, please let me know what you need. Thanks, Craig Link to comment Share on other sites More sharing options...
Bannish Posted March 12, 2019 Share Posted March 12, 2019 Hey guys, just a quick question, and it might be a pretty stupid one, but I just went over the Package explainations again and saw something, that made me scratch my head uint8 m_drsAllowed; // 0 = not allowed, 1 = allowed, -1 = unknown as far as i understand unsigned integers, they should not be able to be "-1" or is there a special case in c/c++, where that can happen? personally i code in c#, so i use the "byte" type for the uint8, and they warn me, that byte can't be "-1" Link to comment Share on other sites More sharing options...
cjorgens79 Posted March 13, 2019 Share Posted March 13, 2019 18 hours ago, Bannish said: Hey guys, just a quick question, and it might be a pretty stupid one, but I just went over the Package explainations again and saw something, that made me scratch my head uint8 m_drsAllowed; // 0 = not allowed, 1 = allowed, -1 = unknown as far as i understand unsigned integers, they should not be able to be "-1" or is there a special case in c/c++, where that can happen? personally i code in c#, so i use the "byte" type for the uint8, and they warn me, that byte can't be "-1" Its probably just a bad comment, the value would likely always just be 0 or 1. However if i am wrong then and they do set it to -1 in the underlying structure at some point, then if you read that field as UInt8 (byte in c#) you will get the value of 255 instead of -1. You can however just read it as Int8 (sbyte in c#) and it will work correctly. Link to comment Share on other sites More sharing options...
Oasis81 Posted March 18, 2019 Share Posted March 18, 2019 HI All how did you managed the laptime on the q3? i've create a simple classification same as tv show with the laptime and delta in realtime for the qualify. in the q3 (also in the othre Q but in Q3 has more evidence), the game stops to send the data before the lastest lap, because when the time of the session is finished, some cars are yet on their flying lap. so, after the session, my timedata are old and different than the game time data. is there a way to fix this or not? 2nd request: currentlaptime starts at the start session time, so if you are in the box the currentlaptime is running. obviously , when you cross the start line after the outlap the count is resetted. but how i can check with precision when i cross the start line? i've tried with currentlaptime = 0 but doesn't works tried with trackdistance == 0 but doesn't works only if i use the signal > 0 works. is there a way to check it with precision? thanks in advance Link to comment Share on other sites More sharing options...
cjorgens79 Posted March 19, 2019 Share Posted March 19, 2019 21 hours ago, Oasis81 said: HI All how did you managed the laptime on the q3? i've create a simple classification same as tv show with the laptime and delta in realtime for the qualify. in the q3 (also in the othre Q but in Q3 has more evidence), the game stops to send the data before the lastest lap, because when the time of the session is finished, some cars are yet on their flying lap. so, after the session, my timedata are old and different than the game time data. is there a way to fix this or not? 2nd request: currentlaptime starts at the start session time, so if you are in the box the currentlaptime is running. obviously , when you cross the start line after the outlap the count is resetted. but how i can check with precision when i cross the start line? i've tried with currentlaptime = 0 but doesn't works tried with trackdistance == 0 but doesn't works only if i use the signal > 0 works. is there a way to check it with precision? In single player, the telemetry stops the moment you cross the finish line, so its not possible to get accurate readings for any opponents behind you in the session. This is a known limitation of the game unfortunately. In multiplayer sessions the telemetry continues until the overall session ends, so you can do it for that. As for detecting the start in your second question, the only real way I can think of would be to detect when the currentlaptime goes backwards to a zero/near zero value. Need to check its near zero to avoid issues with flashbacks, although its not foolproof as a flashback could technically result in that too under the right circumstances. Link to comment Share on other sites More sharing options...
Oasis81 Posted March 19, 2019 Share Posted March 19, 2019 ok, i understood the first point.. it's a bit annoying but ok for precision: the telemetry stops after the timer is gone to 0. because the problem still also if i stay all the Q in the garage. so for the game the 00:00 time equals the finish line for the player. for the second point.. your suggestion is interesting i can check in the code with if 0 < currentlaptime < 10.. with a some arrangements, it could works... my problem is only the visbility of the text of the laptime. i'll check better this evening. thanks edit: thanks cjorgens79, works perfectly. image before start line, current laptime and after sector with delta. thanks a lot Link to comment Share on other sites More sharing options...
cgfdoo Posted March 24, 2019 Share Posted March 24, 2019 @Hoo: since this will probably not make it into F1 2018 it would be great if the Event packet can be extended in F1 2019 to include a "Lap Restarted" event. I am working on a platform where players can send their Time Trial lap times + full telemetry to a website and I currently have to write code to detect lap restarts. It works most of the time but can be a bit flaky in certain edge cases. Such an event would make that a lot easier. Link to comment Share on other sites More sharing options...
OlliePugh Posted March 26, 2019 Share Posted March 26, 2019 You mention in the participants packet that on pc it will give the users steam id but unfortunately I seem to only be receiving the users steam name, not their ID, is there any way to get the users steam id? Link to comment Share on other sites More sharing options...
mavness Posted March 31, 2019 Share Posted March 31, 2019 I am having an issue where motion telemetry stops outputting when the vehicle is in motion, but at idle the data comes through correctly. I am using a PC with UDP enabled, and everything else comes over completely fine, except for motion data. It has the motion data when the car is not moving (you can feel the small vibration of the seat and the G plotter wiggles), but the second the car moves, the g force lat/long/vert of each vehicle goes to 0 and all the rest of the data comes through fine. Then if you stop the car, the motion data comes through again. And all the while the car is in motion, the gear shifts are registering, speed, engine RPM, etc etc. Really only the X Y and Z local accelerations are not showing in the per car motion data packets. One of the PCs I am using it works fine on, the other (which is newer and has much less on it) is the one having the issue. They are both gaming computer home built with no bloatware. I have tried 2 different programs and they are both showing the same result of no motion data once moving. I have already uninstalled the game, tried just deleting the configs and launching the game again and then using in game settings to enable telemetry, ive tried patching, manually, and googled about everything I could think on this topic and now I am all out of ideas! Link to comment Share on other sites More sharing options...
KerberosJoy Posted April 1, 2019 Share Posted April 1, 2019 Hello, looking in various posts about formula and UDP i see that in modifications of the hardware_settings_config.xml , various fields which aren't presend at original file like sendRate added. Can i have a full list of the possible additional fiels? Thangs in advance. Link to comment Share on other sites More sharing options...
tourismgeek Posted April 6, 2019 Share Posted April 6, 2019 On 3/8/2019 at 8:22 AM, DaveyGravy said: I haven’t actually used this data in my app yet for mapping, but I have played around with it previously. From memory you need to use x and z to get a birdseye view of the track if that’s what you're after. I just dumped the data for these into Excel and drew a graph and it looked like the track in question. This is great help, thanks! @DaveyGravy @randyzwitch do you guys happen to know whether the x, z coordinates for F1 circuits available somewhere to use when plotting the data on top of it. It can probably be figured out from the telemetry data but I am assuming this should be something already available. Link to comment Share on other sites More sharing options...
tourismgeek Posted April 6, 2019 Share Posted April 6, 2019 On 8/30/2018 at 2:18 AM, HassanKLD said: Hello! Firstly thanks for posting this @Hoo. I'm currently creating something for myself, but found the forum a little tedious to keep coming back to for the info, so I created a quick reference doc for myself. Others might find it useful. Link here. It's not fully complete I still need to port of the full appendices. @Hoo If you or anyone at Codemasters would like to take ownership of this I'm more than happy to. It's just a github repo, and the docs are written in Markdown and auto generated. Ok so on the actual UDP spec side, I picked up a few things and just wanted to clarify/point few things out. the buffer size for Motion packet is 1341 Bytes, after accounting for everything in the structs I get a total of 1221 Bytes. Is this correct? If so whats in the remaining 120 Bytes? anything useful or can it be simply ignored. The m_eventStringCode in the PacketEventData Struct are mentioned to be UInt8[4], but in the table below it shows code as 'SSTA' and 'SEND'. is the UInt8 an error as they should be Chars I agree with @trenamax to move the m_drsAllowed to the carTelemetryPacket I would really like to have the track limits in the data stream, maybe m_trackLimitLeft and m_tackLimitRight maybe on the MotionData Packet. Edit: thinking more about this, I think it would be useful to get the world x,y, z of the left and right limit thanks! Hass Quote I would really like to have the track limits in the data stream, maybe m_trackLimitLeft and m_tackLimitRight maybe on the MotionData Packet. Edit: thinking more about this, I think it would be useful to get the world x,y, z of the left and right limit This would really be useful! I am current unsure where to get the x, y, z coordinates for the track limits. Link to comment Share on other sites More sharing options...
ElectricTurtle Posted April 6, 2019 Share Posted April 6, 2019 Hey All. The 2018 spec looks pretty nice. Lots of useful data. This may be a stupid question, but what units are all of the spatial information (car location, speed, etc.) in? Is the unit system the same as the F1 2017 UDP specification? Apologies if this question has already been asked and answered. Link to comment Share on other sites More sharing options...
ElectricTurtle Posted April 6, 2019 Share Posted April 6, 2019 A suggestion for @Hoo and the Codemasters dev team. Rather than laying out a custom byte structure for the UDP spec and creating a programming headache for how to bring that data into a particular application's memory, have you considered using Google's Protobuf library? https://developers.google.com/protocol-buffers/ This is exactly the kind of problem it was intended to solve. Rather than laying out the UDP packets in a custom byte-packing, the Codemasters team could just define what data is available in a .proto specification and then just publish that specification. This would make listening to the UDP in any programming language supported by the protobuf team (which at this stage is pretty much every language with any significant user base) dead simple, just use protobuf's freely available tools to auto-generate the proper data bindings for your language of choice and the problem of converting UDP bytes to a useful object in-memory is solved auto-magically. Link to comment Share on other sites More sharing options...
tourismgeek Posted April 6, 2019 Share Posted April 6, 2019 12 minutes ago, ElectricTurtle said: Hey All. The 2018 spec looks pretty nice. Lots of useful data. This may be a stupid question, but what units are all of the spatial information (car location, speed, etc.) in? Is the unit system the same as the F1 2017 UDP specification? Apologies if this question has already been asked and answered. As you can see below, car speed is in Kph, which comes as part of CarTelemetryData On 8/23/2018 at 7:01 PM, Hoo said: uint16 m_speed; // Speed of car in kilometres per hour I am also still trying to figure out the car location on the rack as well but this is helpful to give some hints: Link to comment Share on other sites More sharing options...
tourismgeek Posted April 6, 2019 Share Posted April 6, 2019 Just now, ElectricTurtle said: Rather than laying out a custom byte structure for the UDP spec and creating a programming headache for how to bring that data into a particular application's memory, have you considered using Google's Protobuf library? https://developers.google.com/protocol-buffers/ 💯Huge +1 for this one! Link to comment Share on other sites More sharing options...
peppeFarAway Posted April 9, 2019 Share Posted April 9, 2019 Hi @Hoo and everyone, I am working with F1 2018 on PS4. I am trying to get the telemetry and lap time data of the Ghost car in Time Trial mode. However, m_currentLapTime and all the CarTelemetryData are 0.0 Also the m_numCars is 1, but in the Participants I can see the names of the other Ghost cars (my best lap and my opponent). Data received during a race are fine. I think my problem is related to this https://forums.codemasters.com/topic/30601-f1-2018-udp-specification/?do=findComment&comment=386981 Thank you in advance Link to comment Share on other sites More sharing options...
AlexTT Posted April 18, 2019 Share Posted April 18, 2019 On 2/28/2019 at 12:53 PM, timmhc said: Hi Codemaster and others is i possible to include Fueldelta (remaning fuel laps) i see it in the game on screen, but realy want this on my simhub external dash. I have tryede many solutions to calculate this but i i very diffiicult / Thanks Tim Good one! How does CM calculate both numbers regarding fuel/laps? i have tried to figure this out also, but all my calculations never come to what is on screen self. How do I get the same values as whats on my screen for how many laps fuel is in the car and the delta fuel? @Hoo Link to comment Share on other sites More sharing options...
navarreitor Posted May 3, 2019 Share Posted May 3, 2019 @Hoo, I was on the presentation of F1 2019 in Hamburg and I can see in the menus that there's 2019 UDP specification. The menu was inactive, so I can't check but I figure the game includes 2018 and Legacy also. Can you tell us something about? When can you tell us all about 2019 specification? I ask for being included in the beta mainly for this...not lucky 😞 Link to comment Share on other sites More sharing options...
Moderator UP100 Posted May 3, 2019 Moderator Share Posted May 3, 2019 3 minutes ago, navarreitor said: @Hoo, I was on the presentation of F1 2019 in Hamburg and I can see in the menus that there's 2019 UDP specification. The menu was inactive, so I can't check but I figure the game includes 2018 and Legacy also. Can you tell us something about? When can you tell us all about 2019 specification? I ask for being included in the beta mainly for this...not lucky 😞 I'd guess they will show the specifications to the beta people first, but hopefully you can get the information before the launch at least 🙂 Link to comment Share on other sites More sharing options...
dwin20 Posted May 19, 2019 Share Posted May 19, 2019 Any updates for the 2019 specification? Link to comment Share on other sites More sharing options...
GioProductions Posted May 19, 2019 Share Posted May 19, 2019 I hope that the real Fuel telemetry data (Fuel left at the end of the race) will be included in the F1 2019 game. This is sadly not the case in 2018 game Link to comment Share on other sites More sharing options...
alp1983 Posted May 22, 2019 Share Posted May 22, 2019 Hi All Looking at the byte count on the structs (as per the first post) it would seem the packet size is greater than the sum of its parts? The session packet for example is 147 bytes but the content is approx 44? -a Link to comment Share on other sites More sharing options...
DaveyGravy Posted May 22, 2019 Share Posted May 22, 2019 1 hour ago, alp1983 said: Hi All Looking at the byte count on the structs (as per the first post) it would seem the packet size is greater than the sum of its parts? The session packet for example is 147 bytes but the content is approx 44? -a Did you count MarshalZone 21 times as this is 5 bytes each straightaway? 147 seems correct by my counting. D Link to comment Share on other sites More sharing options...
alp1983 Posted May 23, 2019 Share Posted May 23, 2019 On 5/22/2019 at 9:07 AM, DaveyGravy said: Did you count MarshalZone 21 times as this is 5 bytes each straightaway? 147 seems correct by my counting. D Genius! Thank you 👍 No I hadn’t ! Link to comment Share on other sites More sharing options...
LsHallo Posted June 11, 2019 Share Posted June 11, 2019 Will the UDP Spec change significantly in 2019? I'm working on a application and I don't want to do it all again in 20 days. Thanks in advance. Link to comment Share on other sites More sharing options...
cjorgens79 Posted June 12, 2019 Share Posted June 12, 2019 14 hours ago, LsHallo said: Will the UDP Spec change significantly in 2019? I'm working on a application and I don't want to do it all again in 20 days. Thanks in advance. Nope, the new protocol just some additional fields, the overall structure is very similar Link to comment Share on other sites More sharing options...
navarreitor Posted June 18, 2019 Share Posted June 18, 2019 On 6/12/2019 at 11:48 AM, cjorgens79 said: Nope, the new protocol just some additional fields, the overall structure is very similar Great but would be great to use our dash since day 1 and sure must be some changes. For instance, tyres compounds, and I use this info in a dash for commentators. Please, let us know the structure @Hoo Link to comment Share on other sites More sharing options...
Codemasters Staff Hoo Posted June 21, 2019 Author Codemasters Staff Share Posted June 21, 2019 The 2019 spec is up here: Link to comment Share on other sites More sharing options...
Taiecosell Posted June 25, 2019 Share Posted June 25, 2019 Hi, I am very new, so apologies in advance. I have been trying to get a sim dash running on my iphone. I have tried at least three types and have also tried a UDP terminal, but so far no luck. The apps just sit there listening. I have forwarded ports (20777), given my Xbox a static IP and placed the IP in the DMZ, and Xbox reports the NAT as open. Xbox one and iphone are on the same WLAN. I don't know what else to try. I am in Australia using a Telstra smart modem (NBN). Does anyone have any other suggestions.? Thank you Link to comment Share on other sites More sharing options...
cjorgens79 Posted June 25, 2019 Share Posted June 25, 2019 2 hours ago, Taiecosell said: Hi, I am very new, so apologies in advance. I have been trying to get a sim dash running on my iphone. I have tried at least three types and have also tried a UDP terminal, but so far no luck. The apps just sit there listening. I have forwarded ports (20777), given my Xbox a static IP and placed the IP in the DMZ, and Xbox reports the NAT as open. Xbox one and iphone are on the same WLAN. I don't know what else to try. I am in Australia using a Telstra smart modem (NBN). Does anyone have any other suggestions.? Thank you What app are you trying to use? Your best bet would normally be to contact the app developer for assistance. Link to comment Share on other sites More sharing options...
Taiecosell Posted June 26, 2019 Share Posted June 26, 2019 Thanks CJ, I was experiencing this issue with each app I downloaded and tested, but the problem is now SOLVED 😀 It seems that when the Codies team says use the format xxx.xxx.xxx.xxx for the IP address, they are not expecting (compulsorily) 12 digits, as it was in my "old" days. So replacing 010.000.000.107 with 10.0.0.107 fixed the problem - easy. Big shout out to the SRT team who responed to my question really quickly and made the suggeston. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.