Jump to content
DiRT Rally 2.0 - New Player Guide Read more... ×

Bannish

Members
  • Content Count

    26
  • Joined

  • Last visited

Community Reputation

3 New Car Smell

Gaming Setup

  • Platforms
    Steam
    Android
  • Peripherals
    Controller
    Steering Wheel
    Keyboard
  • Steering Wheel
    Logitech Driving Force GT

Social Media

  1. Bannish

    F1 2019 UDP Specification

    No problem, I am always glad when I can help 🙂
  2. Bannish

    F1 2019 UDP Specification

    my guess would be, that you counted uint m_frameIdentifier as 1 byte, but it is in fact 4 bytes 😉
  3. Bannish

    F1 2019 UDP Specification

    trackLengh is in fact a 2 byte data. your problem is your Header size. The Header struct has 23 bytes in total. struct PacketHeader { uint16 m_packetFormat; // 2 bytes uint8 m_gameMajorVersion; // 1 byte uint8 m_gameMinorVersion; // 1 byte uint8 m_packetVersion; // 1 byte uint8 m_packetId; // 1 byte uint64 m_sessionUID; // 8 bytes float m_sessionTime; // 4 bytes uint m_frameIdentifier; // 4 bytes (a normal int or uint are always 32 bits 😉 ) uint8 m_playerCarIndex; // 1 byte }; // Total 23 bytes Adding these 3 bytes to the size you calculated, we have 149 bytes in total for the package 😉
  4. Bannish

    F1 2019 UDP Specification

    So, m_totalLaps is a 1 byte whole number. in C# it would correspond to the "byte" data type. notice, that it's an unsigned type 😉 about your packet size, you must have an calculation error somewhere. the MarshalZone struct has a size of 5, and the array has a size of 21, so you have 105 bytes there alone. the rest of the session struct, i counted 44 bytes, so with my math, the 149 bytes are correct 😉 maybe you forgot to add the additional bytes of the header struct 😉 Edit, just for clarification struct MarshalZone // 5 bytes in total { float m_zoneStart; // 4 bytes int8 m_zoneFlag; // 1 byte }; struct PacketSessionData { PacketHeader m_header; // 23 bytes uint8 m_weather; // 1 byte - 24 total int8 m_trackTemperature; // 1 byte - 25 total int8 m_airTemperature; // 1 byte - 26 total uint8 m_totalLaps; // 1 byte - 27 total uint16 m_trackLength; // 2 bytes - 29 total uint8 m_sessionType; // 1 byte - 30 total int8 m_trackId; // 1 byte - 31 total uint8 m_formula; // 1 byte - 32 total uint16 m_sessionTimeLeft; // 2 bytes - 34 total uint16 m_sessionDuration; // 2 bytes - 36 total uint8 m_pitSpeedLimit; // 1 byte - 37 total uint8 m_gamePaused; // 1 byte - 38 total uint8 m_isSpectating; // 1 byte - 39 total uint8 m_spectatorCarIndex; // 1 byte - 40 total uint8 m_sliProNativeSupport; // 1 byte - 41 total uint8 m_numMarshalZones; // 1 byte - 42 total MarshalZone m_marshalZones[21]; // 5 bytes * 21 = 105 bytes - 147 total uint8 m_safetyCarStatus; // 1 byte - 148 total uint8 m_networkGame; // 1 byte - 149 total
  5. Bannish

    F1 2019 UDP Specification

    you are my hero: i hadn't noticed, that i forgot to add the sequential StructLayout to those structs. after adding them, these are my outputs for the first lap on paul ricard on rain 23:18:10,974 [F1Telemetry.DataCollector] [15] INFO - 121,696 - method SelectEventType - line 161 23:18:10,975 [F1Telemetry.DataCollector] [15] INFO - 02:01.696 - method SelectEventType - line 162 thank you again, it works like a charm now. sometimes i am so blind when i work with my own code 😂
  6. Bannish

    F1 2019 UDP Specification

    you guys are both right in that, that a float would be enough. i just saw, that i did forget to remove that cast, but when i last checked, that cast did not make a difference. case "ftlp": log.Info("Fastest Lap"); log.Info(evnt.m_eventDetails.ftlp.vehicleIdx); TimeSpan laptime = TimeSpan.FromSeconds(evnt.m_eventDetails.ftlp.lapTime); log.Info(evnt.m_eventDetails.ftlp.lapTime); log.Info(laptime.ToString("mm':'ss'.'fff")); these are the outputs without the cast to doulbe (first and second round on paul ricard, one round withflashback, the second without) 22:17:01,649 [F1Telemetry.DataCollector] [4] INFO - System.Byte[] - method SelectPacket - line 128 22:17:01,649 [F1Telemetry.DataCollector] [4] INFO - Fastest Lap - method SelectEventType - line 158 22:17:01,650 [F1Telemetry.DataCollector] [4] INFO - 19 - method SelectEventType - line 159 22:17:01,669 [F1Telemetry.DataCollector] [4] INFO - 9,24857E-44 - method SelectEventType - line 161 22:17:01,677 [F1Telemetry.DataCollector] [4] INFO - 00:00.000 - method SelectEventType - line 162 22:18:55,861 [F1Telemetry.DataCollector] [5] INFO - System.Byte[] - method SelectPacket - line 128 22:18:55,862 [F1Telemetry.DataCollector] [5] INFO - Fastest Lap - method SelectEventType - line 158 22:18:55,863 [F1Telemetry.DataCollector] [5] INFO - 19 - method SelectEventType - line 159 22:18:55,864 [F1Telemetry.DataCollector] [5] INFO - 9,24857E-44 - method SelectEventType - line 161 22:18:55,868 [F1Telemetry.DataCollector] [5] INFO - 00:00.000 - method SelectEventType - line 162 I would like to note the "9,24857E-44" unformated output. i think, that this number is a bit small, don't you think too? i have a feeling, that i made a mistake in there. this is the code of my EventDataPacket [StructLayout(LayoutKind.Sequential, Pack = 1)] public struct PacketEventData { public PacketHeader m_header; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] public byte[] m_eventStringCode; public EventDataDetails m_eventDetails; } [StructLayout(LayoutKind.Explicit, Pack = 1)] public struct EventDataDetails { [FieldOffset(0)] public FastestLap ftlp; [FieldOffset(0)] public Retirement rtmt; [FieldOffset(0)] public TeamMateInPits tmpt; [FieldOffset(0)] public RaceWinner rcwn; } public struct FastestLap { public byte vehicleIdx; // Vehicle index of car achieving fastest lap public float lapTime; // Lap time is in seconds } public struct Retirement { public byte vehicleIdx; // Vehicle index of car retiring } public struct TeamMateInPits { public byte vehicleIdx; // Vehicle index of team mate } public struct RaceWinner { public byte vehicleIdx; // Vehicle index of the race winner } sorry for the long post guys. but i hope, that you can make some sense out of this
  7. Ok, so i just saw, that the game has an update on PC. i am now running version 1.07 and i am able to join online sessions again in DX11 and DX12 still works. so my issues are fixed. Thanks Codies
  8. Bannish

    F1 2019 UDP Specification

    Hello Guys, I just tried to catch the Event Packets and it seems, i did a good job with that. every event is recognized, but i have a problem with the "fastest lap" event. I am writing my program in c#. for the lap time, i am using the TimeSpan datatype and this is how i try to debug the info right now (using log4net) case "ftlp": log.Info("Fastest Lap"); log.Info(evnt.m_eventDetails.ftlp.vehicleIdx); TimeSpan laptime = TimeSpan.FromSeconds((double)evnt.m_eventDetails.ftlp.lapTime); log.Info(evnt.m_eventDetails.ftlp.lapTime); log.Info(laptime.ToString("mm':'ss'.'fff")); break; <...> This is the log output i am getting from this: 00:01:14,891 [F1Telemetry.DataCollector] [9] INFO - Fastest Lap - method SelectEventType - line 158 00:01:14,891 [F1Telemetry.DataCollector] [9] INFO - 17 - method SelectEventType - line 159 00:01:14,891 [F1Telemetry.DataCollector] [9] INFO - 9,24857E-44 - method SelectEventType - line 161 00:01:14,891 [F1Telemetry.DataCollector] [9] INFO - 00:00:00 - method SelectEventType - line 162 Even when i try to leave the formatting in the ToString method empty, i am still getting the 00:00:00 reading. I have a feeling, that I am missing something very obvious.
  9. Bannish

    F1 2019 UDP Specification

    Maybe i am missing your point, but your aproach about the packet size couldn't have worked last year as well, since Lap Data and Car Setups had the same size last year as well. I am checking the packets, by taking the first few bytes, the first 21 to be precise, and convert them to the PacketHeader struct. this way, i can use the m_packetId to check, which packet i am receiving. and why can't you check packet id 6? car telemetry is always the same structure edit: by the way, is there a way to set the sorting in topics to "sort by date" to default?
  10. It has been Several days since the first post of most of us. I'd say, that most of us shut down ther PC, when they go to sleep/work/etc. I personally do that and I tried MP every day since my original post and it still says, that i am banned under DX11, but i could play under DX12, if it wasn't so unstable on my system. tl,dr: No, Rebooting does not fix the issue!
  11. Can't confirm that. I just tried DX12 mode and it works for me. DX11 i still get the message
  12. I am playing in DX 11 Mode. Also added that Info to my last post
  13. Steam Name: Bannish (https://steamcommunity.com/id/bannishzertak/) ID:76561197982161101 Pictures: See below Running UDP: No File Verification said no errors. DX Mode: DX11 i get these messages, DX12 Works
  14. Having the same issue also. even in Steam Game Version v1.06
  15. Bannish

    F1 2019 UDP Specification

    This might be a nooby question, but I am writing a Telemetry app in c# and afaik, there is no "union" type. What do I have to do in C# to get this to work? Edit: After some searching, I found out that people say to use the Explicit LayoutKind. so now i wanted to know, if this would work, or if I can make this easier [StructLayout(LayoutKind.Explicit, Pack = 1)] public struct EventDataDetails { [FieldOffset(0)] public FastestLap ftlp; [FieldOffset(0)] public Retirement rtmt; [FieldOffset(0)] public TeamMateInPits tmpt; [FieldOffset(0)] public RaceWinner rcwn; } public struct FastestLap { byte vehicleIdx; // Vehicle index of car achieving fastest lap float lapTime; // Lap time is in seconds } public struct Retirement { byte vehicleIdx; // Vehicle index of car retiring } public struct TeamMateInPits { byte vehicleIdx; // Vehicle index of team mate } public struct RaceWinner { byte vehicleIdx; // Vehicle index of the race winner }
×