Skip to content

Telemetry

ghiboz edited this page Apr 14, 2018 · 4 revisions

gRally telemetry interface

here is the typo struct exported in the shared memory called gRally_T

struct InfoWheel 
{
    float mPressure;            // bar
    float mTreadTemperature[3]; // Celsius e/c/i
    float mCoreTemperature;     // Celsius
    float mWetRate;             // 0.0 ~ 1.0 dry = 0, wet = 1
};

struct gRally_Telemetry
{
    float mYaw;             // Yaw rad
    float mPitch;           // Pitch rad
    float mRoll;            // Roll rad
    float mLongAccel;       // Longitudinal acceleration m/s^2
    float mLatAccel;        // Lateral acceleration m/s^2
    float mVertAccel;       // Vertical acceleration m/s^2
    float mVelocityX;       // X velocity, m/s
    float mVelocityY;       // Y velocity, m/s
    float mVelocityZ;       // Z velocity, m/s
    float mYawRate;         // Yaw rate rad/s
    float mPitchRate;       // Pitch rate rad/s
    float mRollRate;        // Roll rate rad/s

    float mEngineRPM;       // Engine RPM
    float mCarSpeed;        // meters per second

    float mGear;            // gear number = reverse, 0 = neutral, 1 = first gear..
    float mRedLine;         // redline start rpm
    float mMaxEngineRPM;    // Max engine rpm
    float mMaxGear;         // max gears of current car
    float mFrontBrakeBias;  // front brake bias 0.0 ~ 1.0
    float mRearBrakeBias;   // rear brake bias 0.0 ~ 1.0

    float mCogX;            // X car COG position
    float mCogY;            // Y car COG position UP
    float mCogZ;            // Z car COG position

    InfoWheel mWheel[4];    // see the wheels info struct

    float mThrottle;        // throttle 0.0 ~ 1.0
    float mBrake;           // brake 0.0 ~ 1.0
    float mHandBrake;       // Handbrake 0.0 ~ 1.0
    float mClutch;          // clutch 0.0 ~ 1.0
    float mSteer;           // steer -1.0 ~ 1.0

    float mAmbientTemp;     // temperature Celsius
    float mTrackTemp;       // temperature Celsius
    float mWetRate          // global wet rate: 0.0 ~ 1.0 dry = 0, wet = 1

    float mCloudCoverage;   // 0.0 ~ 1.0 clear = 0, cloudy = 1
    float mTrackSize;       // track lenght meters
    float mDistDone;        // distance done meters
    float mCountdown;       // 5 to 0, -1 before the start
    float mHeadLights;      // is headlights on? 0 or 1
    float mIsOnTrack;       // paused 0 or 1
    float mTimeElapsed;     // Seconds.  -1.0 = none    global elapsed time or session elapsed time 
    float mCurSector;       // sector number 0 to 3 (-1 before the start)
    float mStageDone;       // 0 running, 1 stage done
}

basically is a float array: here is the tabular representation

# value desc
0 mYawRate Yaw rad
1 mPitchRate Pitch rad
2 mRollRate Roll rad
3 mLongAccel Longitudinal acceleration m/s^2
4 mLatAccel Lateral acceleration m/s^2
5 mVertAccel Vertical acceleration m/s^2
6 mVelocityX X velocity, m/s
7 mVelocityY Y velocity, m/s
8 mVelocityZ Z velocity, m/s
9 mYawRate Yaw rate rad/s
10 mPitchRate Pitch rate rad/s
11 mRollRate Roll rate rad/s
12 mEngineRPM Engine RPM
13 mCarSpeed meters per second
14 mGear gear number = reverse, 0 = neutral, 1 = first gear..
15 mRedLine redline start rpm
16 mMaxEngineRPM Max engine rpm
17 mMaxGear max gears of current car
18 mFrontBrakeBias front brake bias 0.0 ~ 1.0
19 mRearBrakeBias rear brake bias 0.0 ~ 1.0
20 mCogX X car COG position
21 mCogY Y car COG position (UP)
22 mCogZ Z car COG position
23 FL_mPressure Tyre FL bar
24 FL_mTreadTemp_e Tyre FL Celsius
25 FL_mTreadTemp_c Tyre FL Celsius
26 FL_mTreadTemp_i Tyre FL Celsius
27 FL_mCoreTemp Tyre FL Celsius
28 FL_mWetRate Tyre FL 0.0 ~ 1.0 dry = 0, wet = 1
29 FR_mPressure Tyre FR bar
30 FR_mTreadTemp_e Tyre FR Celsius
31 FR_mTreadTemp_c Tyre FR Celsius
32 FR_mTreadTemp_i Tyre FR Celsius
33 FR_mCoreTemp Tyre FR Celsius
34 FR_mWetRate Tyre FR 0.0 ~ 1.0 dry = 0, wet = 1
35 RL_mPressure Tyre RL bar
36 RL_mTreadTemp_e Tyre RL Celsius
37 RL_mTreadTemp_c Tyre RL Celsius
38 RL_mTreadTemp_i Tyre RL Celsius
39 RL_mCoreTemp Tyre RL Celsius
40 RL_mWetRate Tyre RL 0.0 ~ 1.0 dry = 0, wet = 1
41 RR_mPressure Tyre RR bar
42 RR_mTreadTemp_e Tyre RR Celsius
43 RR_mTreadTemp_c Tyre RR Celsius
44 RR_mTreadTemp_i Tyre RR Celsius
45 RR_mCoreTemp Tyre RR Celsius
46 RR_mWetRate Tyre RR 0.0 ~ 1.0 dry = 0, wet = 1
47 mThrottle throttle 0.0 ~ 1.0
48 mBrake brake 0.0 ~ 1.0
49 mHandBrake Handbrake 0.0 ~ 1.0
50 mClutch clutch 0.0 ~ 1.0
51 mSteer steer -1.0 ~ 1.0
52 mAmbientTemp temperature (Celsius)
53 mTrackTemp temperature (Celsius)
54 mWetRate global wet rate: 0.0 ~ 1.0 dry = 0, wet = 1
55 mCloudCoverage 0.0 ~ 1.0 clear = 0, cloudy = 1
56 mTrackSize track lenght meters
57 mDistDone distance done meters
58 mCountdown 5 to 0, -1 before the start
59 mHeadLights is headlights on? 0 or 1
60 mIsOnTrack paused 0 or 1
61 mTimeElapsed Seconds. -1.0 = none global elapsed time or session elapsed time
62 mCurSector sector number 0 to 3 (-1 before the start)
63 mStageDone 0 running, 1 stage done

Clone this wiki locally