Results 1 to 7 of 7

Thread: UDP Streaming data analysis

  1. #1
    Rookie
    Join Date
    Oct 2016
    Posts
    2
    Platform
    PC

    Talking UDP Streaming data analysis

    Hello,everyone! I have a probelm about UDP streaming data analysis .
    I can get 1367 bytes of data through the UDP broadcast transmission. But I don't know how to parse the data.For example:I konw "sWorldVelocity[3]" statrts from 160th byte to 171th byte.I have gotten 12 bytes Hex data. But I don't know how to calculate the sWorldVelocity[0],sWorldVelocity[1] and sWorldVelocity[2].Can you provide some relevant documentation or examples? Thanks you very much!

  2. #2
    Moderator Bealdor's Avatar
    Join Date
    Apr 2012
    Location
    Leipzig
    Posts
    9,664
    Platform
    PC
    Moved to Third Party Apps & API Discussion subforum.

    Please check out this sticky thread for more info.
    Main Rig: CPU I7 10700KF@Stock + UV | GPU ASUS TUF RTX3080 Gaming OC 10GB 1920MHz@900mV | RAM G.Skill Ripjaws 32GB DDR4 3200Mhz | MB MSI Z490 Gaming Edge WiFi | SSD 1 1000GB Patriot VPN100 M.2 PCIe 3.0 x4 NVME | SSD 2 1000GB Samsung 860-EVO | O.S. Win 10 Pro 64bit | Monitor Iiyama 34" Ultrawide Curved 3440x1440 | Wheel Fanatec CSW 2.5 + Clubsport Formula V2 + CSL Elite Steering Wheel WRC | Pedals Fanatec CSL Elite LC
    Second Rig: CPU I7 4790K@Stock | GPU Nvidia GTX 1060 6GB | RAM 16GB DDR3 1866Mhz | MB Gigabyte GA-Z97X Gaming 3 | SSD Samsung 850 EVO 120GB | HDD Seagate SATA 1TB | O.S. Win 10 Pro 64bit | Wheel Logitech G27

    STEAM ID: Bealdor

    The forum search is a powerful tool, if you know how to use it...

    Please check out our Project CARS 2 FAQ and Tips

    PCARS 1 Known Issues threads: PC / PS4 / XB1

  3. #3
    Rookie
    Join Date
    Oct 2016
    Posts
    2
    Platform
    PC
    Thank you for your replying.I have read this passage,but I still don't know how to parse the data.

  4. #4
    GT5 Pilot mr_belowski's Avatar
    Join Date
    May 2015
    Posts
    1,492
    Platform
    PC
    you have to convert the raw binary data into the relevant types - e.g. 4 contiguous bytes into a float type. How you do this will depend on what language you're using. C# provides a handy 'struct' type which maps the binary data to usable types - my Crew Chief application is open source so you can see how this works here: https://github.com/mrbelowski/CrewCh...yDataStruct.cs

    This is the struct onto which the binary data (byte array) are mapped, so you get lots of already-created floats and things.

    If you're using Java you have to do all the conversions manually. My Android app does this, and uses lots of little utility methods like

    private float getFloat(byte[] data, int offset) {
    return ByteBuffer.wrap(data, offset, 4).order(BYTE_ORDER).getFloat();
    }

    Basically I have to iterate over the byte array that's come from the UDP packet and call methods like this to convert one or more bytes to their proper native types. I'm happy to share the Java class with all this in if you want it, but obviously it's no use if you're not using Java
    Crew Chief details here http://forum.projectcarsgame.com/sho...r-for-PC-users
    Website, download link and forum: http://thecrewchief.org
    Or make a donation, if you think the chief needs to drink more beer:
    https://www.paypal.com/cgi-bin/websc...=LW33XFXP4DPZE

  5. #5
    WMD Member John Hargreaves's Avatar
    Join Date
    Oct 2011
    Location
    Yorkshire
    Posts
    3,433
    Platform
    PC
    You want to discuss UDP or something more general?

    There is an FAQ at the top of the page
    i5-12600K/MSI RTX 3080/Win11 64bit/64Gb RAM/Asus Xonar DX+Beyer Dynamic DT990 Pro headphones/LG 34" UM65 @2560x1080/HP Reverb G2/Fanatec CSL wheel + Clubsport V3 pedals/DSD P2 button box

    WMD1 + WMD2 Member

  6. #6
    WMD Member MaximusN's Avatar
    Join Date
    Oct 2011
    Location
    The Netherlands, close enough to enjoy the sounds of the TT-circuit
    Posts
    3,018
    Platform
    PC
    Quote Originally Posted by John Hargreaves View Post
    You want to discuss UDP or something more general?

    There is an FAQ at the top of the page
    It's just one of those bots asking the same question in the first post and then offering help/adding details on a subject not in anyway related to this forum(like bike chainring ratios) in the next ones. I think it either tries to subtly work up the post count to post malicious links or bait you into contacting it via it's social links.
    "What we tweeted was a factual description of events. No need to speculate on this"
    DD1, Fanatec Universal Hub, SQ V1.5 Shifter, CS Handbrake V1.5 , V3 pedals, 3090 iChill x4, 3900X, Samsung 49" G9/Vive, Denon AVC-X3700H

    /// MaximusDoriftus(Steam)
    The following user likes this Post: John Hargreaves


  7. #7
    WMD Member John Hargreaves's Avatar
    Join Date
    Oct 2011
    Location
    Yorkshire
    Posts
    3,433
    Platform
    PC
    Oh boy, so it was an evil bot?
    i5-12600K/MSI RTX 3080/Win11 64bit/64Gb RAM/Asus Xonar DX+Beyer Dynamic DT990 Pro headphones/LG 34" UM65 @2560x1080/HP Reverb G2/Fanatec CSL wheel + Clubsport V3 pedals/DSD P2 button box

    WMD1 + WMD2 Member

Similar Threads

  1. pCARS Profiler (Telemetry & Analysis) [PC ONLY] [v1.6]
    By R74NN in forum Third-Party Apps & API Discussion
    Replies: 313
    Last Post: 18-07-2021, 10:56
  2. Looking for input for analysis of cpu limiting
    By kidcurry in forum PC - Technical Help & Support
    Replies: 0
    Last Post: 11-06-2016, 20:21
  3. VRHIVE app streaming data to laptop questons.
    By kevin kirk in forum General Discussion
    Replies: 4
    Last Post: 14-05-2016, 15:23
  4. Telemetry Analysis: How to..
    By jimmyb_84 in forum The Garage - Car Setup Talk
    Replies: 64
    Last Post: 16-09-2015, 07:45
  5. Motec analysis from garage (MUST HAVE)
    By AB_Attack in forum Feature Suggestions
    Replies: 3
    Last Post: 08-06-2015, 17:09

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •