Repository navigation
CREST
yuya-taniguchi-wizapply edited this page Dec 12, 2016
·
8 revisions
http://forum.projectcarsgame.com/showthread.php?30903-HowTo-Shared-Memory-(API)-App
でリンクが張られている
https://github.com/NLxAROSA/CREST
C++のシェアードメモリサンプル
masterでは値の取得ができなかったが、1.0ブランチからなら取得できた。
そのままではビルドできないので
http://www.zlib.net
からコンパイル済みのlibを取得する。
実行すると以下のような結果が得られた。
{
"buildinfo": {
"mBuildVersionNumber": 1246,
"mVersion": 5
},
"carDamage": {
"mAeroDamage": 0,
"mCrashState": 0,
"mEngineDamage": 1.60933e-06
},
"carState": {
"mAntiLockActive": false,
"mBoostActive": true,
"mBoostAmount": 100,
"mBrake": 0,
"mCarFlags": 10,
"mClutch": 1,
"mFuelCapacity": 74,
"mFuelLevel": 0.0673065,
"mFuelPressureKPa": 58.5,
"mGear": 1,
"mLastOpponentCollisionIndex": -1,
"mLastOpponentCollisionMagnitude": 0,
"mMaxRPM": 9100,
"mNumGears": 6,
"mOdometerKM": 0.977141,
"mOilTempCelsius": 40.7044,
"mRpm": 3079.89,
"mSpeed": 11.0924,
"mSteering": 0.221077,
"mThrottle": 0.503666,
"mWaterPressureKPa": 2.04501,
"mWaterTempCelsius": 39.8651
},
"eventInformation": {
"mLapsInEvent": 0,
"mTrackLength": 4290.96,
"mTrackLocation": "Dubai Autodrome",
"mTrackVariation": "International"
},
"flags": {
"mHighestFlagColour": 0,
"mHighestFlagReason": 0
},
"gameStates": {
"mGameState": 3,
"mRaceState": 1,
"mSessionState": 1
},
"motionAndDeviceRelated": {
"mAngularVelocity": [
-0.00986318,
-0.230197,
0.0126723
],
"mExtentsCentre": [
0,
0.577495,
-0.122955
],
"mLocalAcceleration": [
-2.04393,
10.0916,
-2.87576
],
"mLocalVelocity": [
-0.273973,
0.20247,
-11.0872
],
"mOrientation": [
-0.00328957,
1.55767,
-0.00241646
],
"mWorldAcceleration": [
-2.93615,
10.0869,
1.98025
],
"mWorldVelocity": [
-11.0904,
0.166659,
0.127905
]
},
"participants": {
"mNumParticipants": 1,
"mParticipantInfo": [
{
"mCurrentLap": 1,
"mCurrentLapDistance": 0,
"mCurrentSector": 1,
"mIsActive": true,
"mLapsCompleted": 0,
"mName": "WizapplyInfo",
"mRacePosition": 1,
"mWorldPosition": [
757.804,
8.15435,
109.986
]
}
],
"mViewedParticipantIndex": 0
},
"pitInfo": {
"mPitMode": 3,
"mPitSchedule": 0
},
"timings": {
"mBestLapTime": -1,
"mCurrentSector1Time": -1,
"mCurrentSector2Time": -1,
"mCurrentSector3Time": -1,
"mCurrentTime": -1,
"mEventTimeRemaining": -1,
"mFastestSector1Time": -1,
"mFastestSector2Time": -1,
"mFastestSector3Time": -1,
"mLapInvalidated": true,
"mLastLapTime": -1,
"mPersonalFastestLapTime": -1,
"mPersonalFastestSector1Time": -1,
"mPersonalFastestSector2Time": -1,
"mPersonalFastestSector3Time": -1,
"mSplitTime": 0,
"mSplitTimeAhead": -1,
"mSplitTimeBehind": -1,
"mWorldFastestLapTime": 81.834,
"mWorldFastestSector1Time": 20.596,
"mWorldFastestSector2Time": 34.863,
"mWorldFastestSector3Time": 26.375
},
"unfilteredInput": {
"mUnfilteredBrake": 0,
"mUnfilteredClutch": 0,
"mUnfilteredSteering": 0.217544,
"mUnfilteredThrottle": 0.503666
},
"vehicleInformation": {
"mCarClassName": "LMP1",
"mCarName": "RWD P30 LMP1"
},
"weather": {
"mAmbientTemperature": 22.2733,
"mCloudBrightness": 2.28293,
"mRainDensity": 0,
"mTrackTemperature": 31.4099,
"mWindDirectionX": 0.707107,
"mWindDirectionY": -0.707107,
"mWindSpeed": 8.13665
},
"wheelsAndTyres": {
"mBrakeDamage": [
0,
0,
0,
0
],
"mBrakeTempCelsius": [
22.46,
22.46,
22.46,
22.46
],
"mSuspensionDamage": [
0,
0,
0,
0
],
"mTerrain": [
0,
0,
0,
0
],
"mTyreCarcassTemp": [
363.149,
363.149,
363.149,
363.149
],
"mTyreFlags": [
7,
7,
7,
7
],
"mTyreGrip": [
1,
1,
1,
1
],
"mTyreHeightAboveGround": [
-0.0094614,
-0.00729752,
-0.0115566,
-0.00951385
],
"mTyreInternalAirTemp": [
363.02,
363.02,
363.025,
363.025
],
"mTyreLateralStiffness": [
70000,
70000,
70000,
70000
],
"mTyreLayerTemp": [
345.501,
345.521,
345.224,
345.217
],
"mTyreRPS": [
-31.0557,
-29.9791,
-31.6978,
-31.6978
],
"mTyreRimTemp": [
362.147,
362.147,
362.149,
362.148
],
"mTyreSlipSpeed": [
0.217887,
0.20733,
0.143959,
0.513045
],
"mTyreTemp": [
88.8168,
88.8199,
88.799,
88.7983
],
"mTyreTreadTemp": [
361.991,
361.994,
361.973,
361.973
],
"mTyreWear": [
2.02656e-06,
2.02656e-06,
2.02656e-06,
2.02656e-06
],
"mTyreY": [
0.0140466,
0.0122544,
0.0171628,
0.0152674
]
}
}