Telemetry Data / Shared Memory

Discussion in 'Automobilista 2 - Help & Support' started by Kewi, Apr 29, 2024.

  1. Kewi

    Kewi New Member

    Joined:
    Apr 29, 2024
    Messages:
    3
    Likes Received:
    0
    I am developing a UI on a display showcasing information about the cars velocity, fuel level, etc. Im using UDP to get all the telemetry data from AM2. Is there an open source for the data of information with the positions and length of bytes or is it possible to get access to this information? Currently im "trail and erroring" through 1367 bytes to figure out how to get usable information.
     
  2. Racinglegend1234

    Racinglegend1234 AMS2 wiki founder AMS2 Club Member

    Joined:
    Jul 28, 2022
    Messages:
    5,711
    Likes Received:
    1,985
    @GeekyDeaks might be able to help
     
  3. CorvusCorax

    CorvusCorax Active Member AMS2 Club Member

    Joined:
    Oct 23, 2016
    Messages:
    159
    Likes Received:
    69
    Once upon a time sample code and header files were available on the Project CARS site, sadly those are now long gone.

    For shared memory one can find an example in the game's directory, under Support\SharedMemory\AMS2_SharedMemoryExampleApp.

    For UDP there's this C++ header file, from "SMS_UDP_Definitions_v2_Patch5". Whether that was the latest revision of the UDP defintions released I cannot say: SMS_UDP_Definitions.hpp from SMS_UDP_Definitions_v2_Patch5 - Pastebin.com

    Suggestion for any Reiza devs who might read this: Perhaps a UDP example could be included in the support directory too? There isn't really an "official" source for this information anymore.
     
  4. Kewi

    Kewi New Member

    Joined:
    Apr 29, 2024
    Messages:
    3
    Likes Received:
    0
    Hey, I found a similar file in github and i tried calling out the specific byte in pos and size but the output I got after unpacking were not correct unfortunatly. pcars2-udp/SMS_UDP_Definitions.hpp at master · saildeep/pcars2-udp . Could be so easy if pcars2 worked the same as AM2 :D
     
  5. CorvusCorax

    CorvusCorax Active Member AMS2 Club Member

    Joined:
    Oct 23, 2016
    Messages:
    159
    Likes Received:
    69
    I also found that and checked it against the patch 5 file to see if I could just give you that URL. It differs though, I think it is an earlier version - there are some additional lines in the patch 5 one if you do a side by side comparison.

    I believe that the UDP support in AMS2 is currently exactly the same as it was in PCARS2 as of the final PCARS2 patch. I don't have any hands on experience of the UDP stuff though, I tinkered with the shared memory some many many years ago, but never the UDP.
     
  6. Kewi

    Kewi New Member

    Joined:
    Apr 29, 2024
    Messages:
    3
    Likes Received:
    0
    I checked wether the UDP of AMS2 and the file PCars2 work the same but unfortunatly I dont get usable results. I tried to take variables from the shared memory of AMS2 but I have no idea how to use .hpp.
     
  7. RnageyRover

    RnageyRover Member AMS2 Club Member

    Joined:
    Aug 8, 2022
    Messages:
    60
    Likes Received:
    68
  8. RnageyRover

    RnageyRover Member AMS2 Club Member

    Joined:
    Aug 8, 2022
    Messages:
    60
    Likes Received:
    68

    Attached Files:

    • Useful Useful x 1

Share This Page