Telemetry in Raspberry PI - read telemetry via Python

Discussion in 'Automobilista 2 - Help & Support' started by 2dots, Aug 29, 2025 at 5:03 PM.

Tags:
  1. 2dots

    2dots New Member

    Joined:
    Jan 3, 2024
    Messages:
    2
    Likes Received:
    1
    Hello, as a side project I'm trying to build my own hardware dashboard to display speed, rpms, laps and other useful information with Raspberry Pi and some digital displays.

    I am currently working on a Python script (I decided that this would be the fastest way) that reads telemetry data via UDP. When processing the packets, I tried to base my work on the information contained in the “SharedMemory.h” file, but it had nothing to do with the order of the received data. I have already managed to read the speed, but I am having trouble detecting where the rest of the data is.
    Code:
    # speed in m/s
    speed = struct.unpack_from("<f", data, 0x078)[0]
    
    Can anyone help me identify where the individual data starts? Or the best idea will be to switch to c++ ;)
     
  2. CorvusCorax

    CorvusCorax Active Member AMS2 Club Member

    Joined:
    Oct 23, 2016
    Messages:
    209
    Likes Received:
    87
    The shared memory struct and the UDP packet formats are completely different, UDP is far more complicated as there are different payloads that can be sent with different frequencies.

    Your best bet – if you want to continue with UDP – would probably be to find an existing implementation to modify. Look for any for Project CARS 2, as I believe the UDP format is either substantially or entirely the same. Alternatively documentation for the Project CARS 2 UDP packets.

    Sadly the Slightly Mad Studios / Project CARS websites that had example code to download are long since gone.
     
    • Like Like x 1
  3. 2dots

    2dots New Member

    Joined:
    Jan 3, 2024
    Messages:
    2
    Likes Received:
    1
    • Like Like x 1

Share This Page