1 /*************************************************************************** 2 3 file : car.h 4 created : Sun Jan 30 12:00:15 CET 2000 5 copyright : (C) 2000-2013 by Eric Espie, Bernhard Wymann 6 email : torcs@free.fr 7 version : $Id: car.h,v 1.37.2.11 2014/03/17 18:11:41 berniw Exp $ 8 9 ***************************************************************************/ 10 11 /*************************************************************************** 12 * * 13 * This program is free software; you can redistribute it and/or modify * 14 * it under the terms of the GNU General Public License as published by * 15 * the Free Software Foundation; either version 2 of the License, or * 16 * (at your option) any later version. * 17 * * 18 ***************************************************************************/ 19 20 /** @file 21 This is the car structure. 22 @author <a href=mailto:torcs@free.fr>Eric Espie</a> 23 @version $Id: car.h,v 1.37.2.11 2014/03/17 18:11:41 berniw Exp $ 24 @ingroup carstruct 25 @note Short cuts are to be used with the carElt structure. 26 */ 27 28 29 #ifndef __CARV1_H__ 30 #define __CARV1_H__ 31 32 #include <track.h> 33 #include <plib/sg.h> 34 35 #define CAR_IDENT 0 36 37 #define MAX_NAME_LEN 32 38 39 /* designation */ 40 #define FRNT_RGT 0 /**< front right */ 41 #define FRNT_LFT 1 /**< front left */ 42 #define REAR_RGT 2 /**< rear right */ 43 #define REAR_LFT 3 /**< rear left */ 44 #define FRNT 0 /**< front */ 45 #define REAR 1 /**< rear */ 46 #define RIGHT 0 /**< right */ 47 #define LEFT 1 /**< left */ 48 49 50 /** Wheels Specifications */ 51 typedef struct 52 { 53 tdble rimRadius; /**< Rim radius */ 54 tdble tireHeight; /**< Tire height */ 55 tdble tireWidth; /**< Tire width */ 56 tdble brakeDiskRadius; /**< Brake disk radius */ 57 tdble wheelRadius; /**< Overall wheel radius */ 58 } tWheelSpec; 59 /* structure access short cuts */ 60 #define _rimRadius(i) info.wheel[i].rimRadius /**< short cut to tWheelSpec#rimRadius */ 61 #define _tireHeight(i) info.wheel[i].tireHeight /**< short cut to tWheelSpec#tireHeight */ 62 #define _tireWidth(i) info.wheel[i].tireWidth /**< short cut to tWheelSpec#tireWidth */ 63 #define _brakeDiskRadius(i) info.wheel[i].brakeDiskRadius /**< short cut to tWheelSpec#brakeDiskRadius */ 64 #define _wheelRadius(i) info.wheel[i].wheelRadius /**< short cut to tWheelSpec#wheelRadius */ 65 66 /** Static visual attributes */ 67 typedef struct { 68 int exhaustNb; /**< Number of exhaust pipes (max 2) */ 69 t3Dd exhaustPos[2]; /**< Position of exhaust pipes */ 70 tdble exhaustPower; /**< Power of the flames (from 1 to 3) */ 71 } tVisualAttributes; 72 73 /** Static Public info */ 74 typedef struct { 75 char name[MAX_NAME_LEN]; /**< Driver's name */ 76 char teamname[MAX_NAME_LEN]; /**< Team name */ 77 char carName[MAX_NAME_LEN]; /**< Car object name */ 78 char category[MAX_NAME_LEN]; /**< Car's category */ 79 int raceNumber; /**< Car's race number */ 80 int startRank; /**< Car's starting position */ 81 int driverType; /**< Driver type */ 82 int skillLevel; /**< Driver's skill level (0=rookie -> 3=pro) */ 83 tdble iconColor[3]; /**< Car color in leaders board */ 84 t3Dd dimension; /**< Car's mesures */ 85 t3Dd drvPos; /**< Driver's position */ 86 t3Dd bonnetPos; /**< Bonnet's position */ 87 tdble tank; /**< Fuel tank capa */ 88 tdble steerLock; /**< Steer lock angle */ 89 t3Dd statGC; /**< Static pos of GC (should be the origin of car axis) */ 90 tWheelSpec wheel[4]; /**< Wheels specifications */ 91 tVisualAttributes visualAttr; /**< Visual attributes */ 92 } tInitCar; 93 /* structure access short cuts */ 94 #define _name info.name /**< short cut to tInitCar#name */ 95 #define _teamname info.teamname /**< short cut to tInitCar#teamname */ 96 #define _carName info.carName /**< short cut to tInitCar#carName */ 97 #define _category info.category /**< short cut to tInitCar#category */ 98 #define _driverType info.driverType /**< short cut to tInitCar#driverType */ 99 #define _skillLevel info.skillLevel /**< short cut to tInitCar#skillLevel */ 100 #define _raceNumber info.raceNumber /**< short cut to tInitCar#raceNumber */ 101 #define _startRank info.startRank /**< short cut to tInitCar#startRank */ 102 #define _dimension info.dimension /**< short cut to tInitCar#dimension */ 103 #define _dimension_x info.dimension.x /**< short cut to tInitCar#dimension.x */ 104 #define _dimension_y info.dimension.y /**< short cut to tInitCar#dimension.y */ 105 #define _dimension_z info.dimension.z /**< short cut to tInitCar#dimension.z */ 106 #define _drvPos_x info.drvPos.x /**< short cut to tInitCar#drvPos.x */ 107 #define _drvPos_y info.drvPos.y /**< short cut to tInitCar#drvPos.y */ 108 #define _drvPos_z info.drvPos.z /**< short cut to tInitCar#drvPos.z */ 109 #define _bonnetPos_x info.bonnetPos.x /**< short cut to tInitCar#bonnetPos.x */ 110 #define _bonnetPos_y info.bonnetPos.y /**< short cut to tInitCar#bonnetPos.y */ 111 #define _bonnetPos_z info.bonnetPos.z /**< short cut to tInitCar#bonnetPos.z */ 112 #define _statGC info.statGC /**< short cut to tInitCar#statGC */ 113 #define _statGC_x info.statGC.x /**< short cut to tInitCar#statGC.x */ 114 #define _statGC_y info.statGC.y /**< short cut to tInitCar#statGC.y */ 115 #define _statGC_z info.statGC.z /**< short cut to tInitCar#statGC.z */ 116 #define _iconColor info.iconColor /**< short cut to tInitCar#iconColor */ 117 #define _tank info.tank /**< short cut to tInitCar#tank */ 118 #define _steerLock info.steerLock /**< short cut to tInitCar#steerLock */ 119 #define _exhaustNb info.visualAttr.exhaustNb /**< short cut to tVisualAttributes#exhaustNb */ 120 #define _exhaustPos info.visualAttr.exhaustPos /**< short cut to tVisualAttributes#exhaustPos */ 121 #define _exhaustPower info.visualAttr.exhaustPower /**< short cut to tVisualAttributes#exhaustPower */ 122 123 #define RM_DRV_HUMAN 1 124 #define RM_DRV_ROBOT 2 125 126 127 #define RM_PENALTY_DRIVETHROUGH 1 128 #define RM_PENALTY_STOPANDGO 2 129 130 /** One penalty */ 131 typedef struct CarPenalty 132 { 133 int penalty; /**< penalty type */ 134 int lapToClear; /**< the lap before the penalty has to be cleared */ 135 GF_TAILQ_ENTRY(struct CarPenalty) link; 136 } tCarPenalty; 137 138 GF_TAILQ_HEAD(CarPenaltyHead, struct CarPenalty); 139 140 /** Race Administrative info */ 141 typedef struct { 142 double bestLapTime; 143 bool commitBestLapTime; /* If a rule violation happens (e.g. cutting a corner) the laptime is not commited (false) */ 144 double deltaBestLapTime; 145 double curLapTime; 146 double lastLapTime; 147 double curTime; 148 tdble topSpeed; 149 tdble currentMinSpeedForLap; // Min speed on current lap, reset on start line crossing 150 int laps; 151 int nbPitStops; 152 int remainingLaps; 153 int pos; 154 double timeBehindLeader; 155 int lapsBehindLeader; 156 double timeBehindPrev; 157 double timeBeforeNext; 158 tdble distRaced; 159 tdble distFromStartLine; 160 double scheduledEventTime; 161 tTrackOwnPit *pit; 162 int event; 163 tCarPenaltyHead penaltyList; /**< List of current penalties */ 164 tdble penaltyTime; 165 } tCarRaceInfo; 166 /* structure access */ 167 #define _bestLapTime race.bestLapTime 168 #define _commitBestLapTime race.commitBestLapTime 169 #define _deltaBestLapTime race.deltaBestLapTime 170 #define _curLapTime race.curLapTime 171 #define _curTime race.curTime 172 #define _lastLapTime race.lastLapTime 173 #define _topSpeed race.topSpeed 174 #define _currentMinSpeedForLap race.currentMinSpeedForLap 175 #define _laps race.laps 176 #define _nbPitStops race.nbPitStops 177 #define _remainingLaps race.remainingLaps 178 #define _pos race.pos 179 #define _timeBehindLeader race.timeBehindLeader 180 #define _lapsBehindLeader race.lapsBehindLeader 181 #define _timeBehindPrev race.timeBehindPrev 182 #define _timeBeforeNext race.timeBeforeNext 183 #define _distRaced race.distRaced 184 #define _distFromStartLine race.distFromStartLine 185 #define _pit race.pit 186 #define _scheduledEventTime race.scheduledEventTime 187 #define _event race.event 188 #define _penaltyList race.penaltyList 189 #define _penaltyTime race.penaltyTime 190 191 /** Public info on the cars */ 192 typedef struct { 193 tDynPt DynGC; /**< GC data (car axis) */ 194 tDynPt DynGCg; /**< GC data (world axis) */ 195 tdble speed; // total speed, sqrt(vx*vx + vy*vy + vz*vz) 196 sgMat4 posMat; /**< position matrix */ 197 tTrkLocPos trkPos; /**< current track position. The segment is the track segment (not sides)*/ 198 int state; /**< state of the car. 199 <br>The states are: 200 - RM_CAR_STATE_FINISH 201 - RM_CAR_STATE_PIT 202 - RM_CAR_STATE_DNF 203 - RM_CAR_STATE_PULLUP 204 - RM_CAR_STATE_PULLSIDE 205 - RM_CAR_STATE_PULLDN 206 - RM_CAR_STATE_OUT 207 - RM_CAR_STATE_NO_SIMU 208 - RM_CAR_STATE_BROKEN 209 - RM_CAR_STATE_OUTOFGAS 210 */ 211 #define RM_CAR_STATE_FINISH 0x00000100 /**< Car having passed the finish line */ 212 #define RM_CAR_STATE_PIT 0x00000001 /**< Car currently stopped in pits */ 213 #define RM_CAR_STATE_DNF 0x00000002 /**< Car did not finish */ 214 #define RM_CAR_STATE_PULLUP 0x00000004 /**< Car pulled out in the air */ 215 #define RM_CAR_STATE_PULLSIDE 0x00000008 /**< Car pulled out in the air */ 216 #define RM_CAR_STATE_PULLDN 0x00000010 /**< Car pulled out in the air */ 217 #define RM_CAR_STATE_OUT (RM_CAR_STATE_DNF | RM_CAR_STATE_FINISH)/**< Car out of race */ 218 #define RM_CAR_STATE_NO_SIMU 0x000000FF /**< Do not simulate the car */ 219 #define RM_CAR_STATE_BROKEN 0x00000200 /**< Engine no more working */ 220 #define RM_CAR_STATE_OUTOFGAS 0x00000400 /**< Out of Gas */ 221 #define RM_CAR_STATE_ELIMINATED 0x00000800 /**< Eliminated due to rules infringement */ 222 #define RM_CAR_STATE_SIMU_NO_MOVE 0x00010000 /**< Simulation without car move (i.e. clutch applied and no wheel move) */ 223 tPosd corner[4]; 224 225 } tPublicCar; 226 /* structure access */ 227 #define _DynGC pub.DynGC 228 #define _pos_X pub.DynGC.pos.x 229 #define _pos_Y pub.DynGC.pos.y 230 #define _pos_Z pub.DynGC.pos.z 231 #define _roll pub.DynGC.pos.ax 232 #define _pitch pub.DynGC.pos.ay 233 #define _yaw pub.DynGC.pos.az 234 #define _yaw_rate pub.DynGC.vel.az 235 #define _speed_x pub.DynGC.vel.x 236 #define _speed_y pub.DynGC.vel.y 237 #define _speed_z pub.DynGC.vel.z 238 #define _accel_x pub.DynGC.acc.x 239 #define _accel_y pub.DynGC.acc.y 240 #define _accel_z pub.DynGC.acc.z 241 #define _state pub.state 242 #define _trkPos pub.trkPos 243 #define _speed_X pub.DynGCg.vel.x 244 #define _speed_Y pub.DynGCg.vel.y 245 #define _corner_x(i) pub.corner[i].ax 246 #define _corner_y(i) pub.corner[i].ay 247 #define _posMat pub.posMat 248 249 /** Dynamic wheel information */ 250 typedef struct { 251 tPosd relPos; /**< position relative to GC */ 252 tdble spinVel; /**< spin velocity rad/s */ 253 tdble brakeTemp; /**< brake temperature from 0 (cool) to 1.0 (hot) */ 254 int state; /**< wheel state */ 255 tTrackSeg *seg; /**< Track segment where the wheel is */ 256 tdble rollRes; /**< rolling resistance, useful for sound */ 257 tdble temp_in, temp_mid, temp_out; 258 tdble condition; 259 tdble slipSide; 260 tdble slipAccel; 261 tdble Fx; 262 tdble Fy; 263 tdble Fz; 264 } tWheelState; 265 #define _ride(i) priv.wheel[i].relPos.z 266 #define _brakeTemp(i) priv.wheel[i].brakeTemp 267 #define _wheelSpinVel(i) priv.wheel[i].spinVel 268 #define _wheelSeg(i) priv.wheel[i].seg 269 #define _wheelSlipSide(i) priv.wheel[i].slipSide 270 #define _wheelSlipAccel(i) priv.wheel[i].slipAccel 271 #define _wheelFx(i) priv.wheel[i].Fx 272 #define _wheelFy(i) priv.wheel[i].Fy 273 #define _wheelFz(i) priv.wheel[i].Fz 274 #define _tyreT_in(i) priv.wheel[i].temp_in 275 #define _tyreT_mid(i) priv.wheel[i].temp_mid 276 #define _tyreT_out(i) priv.wheel[i].temp_out 277 #define _tyreCondition(i) priv.wheel[i].condition 278 279 280 #define MAX_GEARS 10 /* including reverse and neutral */ 281 282 typedef struct tCollisionState_ { 283 int collision_count; 284 sgVec3 pos; 285 sgVec3 force; 286 } tCollisionState; 287 288 /** Data known only by the driver */ 289 typedef struct { 290 void *paramsHandle; /**< accessible parameters for modules */ 291 void *carHandle; /**< parameters for car caracteristics */ 292 int driverIndex; /**< index when multiple drivers are in the same dll */ 293 char modName[MAX_NAME_LEN]; /**< dll name */ 294 tWheelState wheel[4]; 295 tPosd corner[4]; /**< car's corners position */ 296 int gear; /**< current gear */ 297 tdble fuel; /**< remaining fuel (liters) */ 298 tdble enginerpm; 299 tdble enginerpmRedLine; 300 tdble enginerpmMax; 301 tdble enginerpmMaxTq; 302 tdble enginerpmMaxPw; 303 tdble engineMaxTq; 304 tdble engineMaxPw; 305 tdble gearRatio[MAX_GEARS]; /**< including final drive */ 306 int gearNb; /**< incl reverse and neutral */ 307 int gearOffset; /**< gearRatio[gear + gearOffset] is the ratio for gear */ 308 tdble skid[4]; /**< skid intensity */ 309 tdble reaction[4]; /**< reaction on wheels */ 310 int collision; /**< Collision value for graphics and sound, clearing is managed by consumers */ 311 int simcollision; /**< For rules etc. reflects the collision state from simu */ 312 float smoke; 313 t3Dd normal; 314 t3Dd collpos; /**< Collision position, useful for sound*/ 315 int dammage; 316 int debug; 317 tCollisionState collision_state; /**< collision state */ 318 } tPrivCar; 319 /* structure access */ 320 #define _driverIndex priv.driverIndex 321 #define _paramsHandle priv.paramsHandle 322 #define _carHandle priv.carHandle 323 #define _modName priv.modName 324 #define _enginerpm priv.enginerpm 325 #define _enginerpmRedLine priv.enginerpmRedLine 326 #define _enginerpmMax priv.enginerpmMax 327 #define _enginerpmMaxTq priv.enginerpmMaxTq 328 #define _enginerpmMaxPw priv.enginerpmMaxPw 329 #define _engineMaxTq priv.engineMaxTq 330 #define _engineMaxPw priv.engineMaxPw 331 #define _gearRatio priv.gearRatio 332 #define _gearNb priv.gearNb 333 #define _gearOffset priv.gearOffset 334 #define _fuel priv.fuel 335 #define _gear priv.gear 336 #define _debug priv.debug 337 #define _skid priv.skid 338 #define _reaction priv.reaction 339 #define _dammage priv.dammage 340 341 /** Info returned by driver during the race */ 342 typedef struct { 343 tdble steer; /**< Steer command [-1.0, 1.0] */ 344 tdble accelCmd; /**< Accelerator command [0.0, 1.0] */ 345 tdble brakeCmd; /**< Brake command [0.0, 1.0] */ 346 tdble clutchCmd; /**< Clutch command [0.0, 1.0] */ 347 int gear; /**< [-1,6] for gear selection */ 348 int raceCmd; /**< command issued by the driver */ 349 #define RM_CMD_NONE 0 /**< No race command */ 350 #define RM_CMD_PIT_ASKED 1 /**< Race command: Pit asked */ 351 char msg[4][32]; /**< 4 lines of 31 characters 0-1 from car 2-3 from race engine */ 352 #define RM_MSG_LEN 31 353 float msgColor[4]; /**< RGBA of text */ 354 int lightCmd; /**< Lights command */ 355 #define RM_LIGHT_HEAD1 0x00000001 /**< head light 1 */ 356 #define RM_LIGHT_HEAD2 0x00000002 /**< head light 2 */ 357 } tCarCtrl; 358 #define _steerCmd ctrl.steer 359 #define _accelCmd ctrl.accelCmd 360 #define _brakeCmd ctrl.brakeCmd 361 #define _clutchCmd ctrl.clutchCmd 362 #define _gearCmd ctrl.gear 363 #define _raceCmd ctrl.raceCmd 364 #define _msgCmd ctrl.msg 365 #define _msgColorCmd ctrl.msgColor 366 #define _lightCmd ctrl.lightCmd 367 368 struct RobotItf; 369 370 typedef struct 371 { 372 tdble value; 373 tdble min; 374 tdble max; 375 } tCarPitSetupValue; 376 377 378 379 typedef struct 380 { 381 // Steer 382 tCarPitSetupValue steerLock; 383 384 //Wheel 385 tCarPitSetupValue wheelcamber[4]; 386 tCarPitSetupValue wheeltoe[4]; 387 tCarPitSetupValue wheelrideheight[4]; 388 389 // Brake 390 tCarPitSetupValue brakePressure; 391 tCarPitSetupValue brakeRepartition; 392 393 //Suspension 394 tCarPitSetupValue suspspring[4]; 395 tCarPitSetupValue susppackers[4]; 396 tCarPitSetupValue suspslowbump[4]; 397 tCarPitSetupValue suspslowrebound[4]; 398 tCarPitSetupValue suspfastbump[4]; 399 tCarPitSetupValue suspfastrebound[4]; 400 401 // Anti-rollbar 402 tCarPitSetupValue arbspring[2]; 403 404 // Third element 405 tCarPitSetupValue thirdspring[2]; 406 tCarPitSetupValue thirdbump[2]; 407 tCarPitSetupValue thirdrebound[2]; 408 tCarPitSetupValue thirdX0[2]; 409 410 // Gears [1-8] 411 tCarPitSetupValue gearsratio[MAX_GEARS - 2]; // without reverse/neutral 412 413 // Wings 414 tCarPitSetupValue wingangle[2]; 415 416 // Differential 417 tCarPitSetupValue diffratio[3]; 418 tCarPitSetupValue diffmintqbias[3]; 419 tCarPitSetupValue diffmaxtqbias[3]; 420 tCarPitSetupValue diffslipbias[3]; 421 tCarPitSetupValue difflockinginputtq[3]; 422 tCarPitSetupValue difflockinginputbraketq[3]; 423 enum TDiffType { NONE = 0, SPOOL = 1, FREE = 2, LIMITED_SLIP = 3, VISCOUS_COUPLER = 4}; 424 TDiffType diffType[3]; 425 } tCarPitSetup; 426 427 /** Command issued by the car during pit stop */ 428 typedef struct 429 { 430 tdble fuel; 431 int repair; 432 #define RM_PIT_REPAIR 0 433 #define RM_PIT_STOPANDGO 1 434 int stopType; 435 tCarPitSetup setup; 436 } tCarPitCmd; 437 #define _pitFuel pitcmd.fuel 438 #define _pitRepair pitcmd.repair 439 #define _pitStopType pitcmd.stopType 440 441 442 /** Car structure (tCarElt). 443 This is the main car structure, used everywhere in the code. 444 */ 445 typedef struct CarElt 446 { 447 int index; /**< car index */ 448 tInitCar info; /**< public */ 449 tPublicCar pub; /**< public */ 450 tCarRaceInfo race; /**< public */ 451 tPrivCar priv; /**< private */ 452 tCarCtrl ctrl; /**< private */ 453 tCarPitCmd pitcmd; /**< private */ 454 struct RobotItf *robot; /**< private */ 455 struct CarElt *next; 456 } tCarElt; 457 458 459 460 /* sections in xml description files */ 461 462 #define SECT_SIMU_SETTINGS "Simulation Options" 463 #define SECT_CAR "Car" 464 #define SECT_FRNT "Front" 465 #define SECT_FRNTWING "Front Wing" 466 #define SECT_FRNTAXLE "Front Axle" 467 #define SECT_FRNTARB "Front Anti-Roll Bar" 468 #define SECT_FRNTRGTWHEEL "Front Right Wheel" 469 #define SECT_FRNTLFTWHEEL "Front Left Wheel" 470 #define SECT_FRNTRGTSUSP "Front Right Suspension" 471 #define SECT_FRNTLFTSUSP "Front Left Suspension" 472 #define SECT_FRNTRGTBRAKE "Front Right Brake" 473 #define SECT_FRNTLFTBRAKE "Front Left Brake" 474 #define SECT_FRNTDIFFERENTIAL "Front Differential" 475 #define SECT_REAR "Rear" 476 #define SECT_REARWING "Rear Wing" 477 #define SECT_REARAXLE "Rear Axle" 478 #define SECT_REARARB "Rear Anti-Roll Bar" 479 #define SECT_REARRGTWHEEL "Rear Right Wheel" 480 #define SECT_REARLFTWHEEL "Rear Left Wheel" 481 #define SECT_REARRGTSUSP "Rear Right Suspension" 482 #define SECT_REARLFTSUSP "Rear Left Suspension" 483 #define SECT_REARRGTBRAKE "Rear Right Brake" 484 #define SECT_REARLFTBRAKE "Rear Left Brake" 485 #define SECT_REARDIFFERENTIAL "Rear Differential" 486 #define SECT_CENTRALDIFFERENTIAL "Central Differential" 487 #define SECT_STEER "Steer" 488 #define SECT_BRKSYST "Brake System" 489 #define SECT_AERODYNAMICS "Aerodynamics" 490 #define SECT_ENGINE "Engine" 491 #define SECT_CLUTCH "Clutch" 492 #define SECT_DRIVETRAIN "Drivetrain" 493 #define SECT_GEARBOX "Gearbox" 494 #define SECT_DRIVER "Driver" 495 #define SECT_BONNET "Bonnet" 496 #define SECT_GROBJECTS "Graphic Objects" 497 #define SECT_EXHAUST "Exhaust" 498 #define SECT_LIGHT "Light" 499 500 /* parameters names */ 501 #define PRM_CATEGORY "category" 502 #define PRM_LEN "body length" 503 #define PRM_WIDTH "body width" 504 #define PRM_OVERALLLEN "overall length" 505 #define PRM_OVERALLWIDTH "overall width" 506 #define PRM_HEIGHT "body height" 507 #define PRM_MASS "mass" 508 #define PRM_FRWEIGHTREP "front-rear weight repartition" 509 #define PRM_FRLWEIGHTREP "front right-left weight repartition" 510 #define PRM_RRLWEIGHTREP "rear right-left weight repartition" 511 #define PRM_GCHEIGHT "GC height" 512 #define PRM_TANK "fuel tank" 513 #define PRM_FUEL "initial fuel" 514 #define PRM_CENTR "mass repartition coefficient" 515 #define PRM_INERTIA "inertia" 516 #define PRM_EFFICIENCY "efficiency" 517 #define PRM_TYPE "type" 518 #define PRM_SIZE "size" 519 520 /* Tires */ 521 #define PRM_MU "mu" 522 #define PRM_RIMDIAM "rim diameter" 523 #define PRM_TIREWIDTH "tire width" 524 #define PRM_TIRERATIO "tire height-width ratio" 525 #define PRM_RIDEHEIGHT "ride height" 526 #define PRM_TOE "toe" 527 #define PRM_CAMBER "camber" 528 #define PRM_CA "stiffness" 529 #define PRM_RFACTOR "dynamic friction" 530 #define PRM_EFACTOR "elasticity factor" 531 #define PRM_PRESSURE "pressure" 532 #define PRM_LOADFMAX "load factor max" 533 #define PRM_LOADFMIN "load factor min" 534 #define PRM_OPLOAD "operating load" 535 536 537 #define PRM_SPR "spring" 538 #define PRM_SUSPCOURSE "suspension course" 539 #define PRM_BELLCRANK "bellcrank" 540 #define PRM_PACKERS "packers" 541 #define PRM_SLOWBUMP "slow bump" 542 #define PRM_SLOWREBOUND "slow rebound" 543 #define PRM_FASTBUMP "fast bump" 544 #define PRM_FASTREBOUND "fast rebound" 545 #define PRM_BUMPTHRESHOLD "fast bump threshold" 546 #define PRM_REBOUNDTHRESHOLD "fast rebound threshold" 547 548 #define PRM_XPOS "xpos" 549 #define PRM_YPOS "ypos" 550 #define PRM_ZPOS "zpos" 551 552 #define PRM_STEERLOCK "steer lock" 553 #define PRM_STEERSPD "max steer speed" 554 555 #define PRM_BRKDIAM "disk diameter" 556 #define PRM_BRKAREA "piston area" 557 #define PRM_BRKREP "front-rear brake repartition" 558 #define PRM_BRKPRESS "max pressure" 559 560 #define PRM_CX "Cx" 561 #define PRM_FCL "front Clift" 562 #define PRM_RCL "rear Clift" 563 #define PRM_FRNTAREA "front area" 564 #define PRM_WINGAREA "area" 565 #define PRM_WINGANGLE "angle" 566 567 /* Engine */ 568 #define PRM_REVSLIM "revs limiter" 569 #define PRM_REVSMAX "revs maxi" 570 #define PRM_TICKOVER "tickover" 571 #define PRM_RPM "rpm" 572 #define PRM_TQ "Tq" 573 #define ARR_DATAPTS "data points" 574 #define PRM_FUELCONS "fuel cons factor" 575 #define PRM_ENGBRKCOEFF "brake coefficient" 576 #define PRM_POWER "power" 577 #define PRM_TURBO "turbo" 578 #define PRM_TURBO_RPM "turbo rpm" 579 #define PRM_TURBO_FACTOR "turbo factor" 580 #define PRM_TURBO_LAG "turbo lag" 581 582 #define PRM_RATIO "ratio" 583 #define PRM_BIAS "bias" 584 585 #define ARR_GEARS "gears" 586 #define PRM_SHIFTTIME "shift time" 587 588 #define PRM_ROLLCENTER "roll center height" 589 590 #define LST_RANGES "Ranges" 591 #define PRM_THRESHOLD "threshold" 592 #define PRM_CAR "car" 593 #define PRM_WHEELSON "wheels" 594 #define PRM_ENV "env" 595 #define PRM_BONNET "bonnet" 596 #define PRM_WHEEL_TEXTURE "wheel texture" 597 #define PRM_SHADOW_TEXTURE "shadow texture" 598 599 #define PRM_MIN_TQ_BIAS "min torque bias" 600 #define PRM_MAX_TQ_BIAS "max torque bias" 601 #define PRM_MAX_SLIP_BIAS "max slip bias" 602 #define PRM_LOCKING_TQ "locking input torque" 603 #define PRM_LOCKINGBRAKE_TQ "locking brake input torque" 604 #define PRM_VISCOSITY_FACTOR "viscosity factor" 605 606 607 #define VAL_DIFF_NONE "NONE" 608 #define VAL_DIFF_SPOOL "SPOOL" 609 #define VAL_DIFF_FREE "FREE" 610 #define VAL_DIFF_LIMITED_SLIP "LIMITED SLIP" 611 #define VAL_DIFF_VISCOUS_COUPLER "VISCOUS COUPLER" 612 613 #define VAL_TRANS_RWD "RWD" 614 #define VAL_TRANS_FWD "FWD" 615 #define VAL_TRANS_4WD "4WD" 616 617 618 /* graphic */ 619 #define PRM_TACHO_TEX "tachometer texture" 620 #define PRM_TACHO_XSZ "tachometer width" 621 #define PRM_TACHO_YSZ "tachometer height" 622 #define PRM_TACHO_XPOS "tachometer x pos" 623 #define PRM_TACHO_YPOS "tachometer y pos" 624 #define PRM_TACHO_NDLXSZ "tachometer needle width" 625 #define PRM_TACHO_NDLYSZ "tachometer needle height" 626 #define PRM_TACHO_XCENTER "tachometer needle x center" 627 #define PRM_TACHO_YCENTER "tachometer needle y center" 628 #define PRM_TACHO_XDIGITCENTER "tachometer digit x center" 629 #define PRM_TACHO_YDIGITCENTER "tachometer digit y center" 630 #define PRM_TACHO_MINVAL "tachometer min value" 631 #define PRM_TACHO_MAXVAL "tachometer max value" 632 #define PRM_TACHO_MINANG "tachometer min angle" 633 #define PRM_TACHO_MAXANG "tachometer max angle" 634 635 #define PRM_SPEEDO_TEX "speedometer texture" 636 #define PRM_SPEEDO_XSZ "speedometer width" 637 #define PRM_SPEEDO_YSZ "speedometer height" 638 #define PRM_SPEEDO_XPOS "speedometer x pos" 639 #define PRM_SPEEDO_YPOS "speedometer y pos" 640 #define PRM_SPEEDO_NDLXSZ "speedometer needle width" 641 #define PRM_SPEEDO_NDLYSZ "speedometer needle height" 642 #define PRM_SPEEDO_XCENTER "speedometer needle x center" 643 #define PRM_SPEEDO_YCENTER "speedometer needle y center" 644 #define PRM_SPEEDO_XDIGITCENTER "speedometer digit x center" 645 #define PRM_SPEEDO_YDIGITCENTER "speedometer digit y center" 646 #define PRM_SPEEDO_MINVAL "speedometer min value" 647 #define PRM_SPEEDO_MAXVAL "speedometer max value" 648 #define PRM_SPEEDO_MINANG "speedometer min angle" 649 #define PRM_SPEEDO_MAXANG "speedometer max angle" 650 #define PRM_SPEEDO_DIGITAL "speedometer digital" 651 652 #define PRM_WHEEL_3D "3d wheel basename" 653 #define PRM_WHEEL_3D_DIR "3d wheel directory" 654 655 /* Lights */ 656 #define VAL_LIGHT_HEAD1 "head1" 657 #define VAL_LIGHT_HEAD2 "head2" 658 #define VAL_LIGHT_BRAKE "brake" 659 #define VAL_LIGHT_BRAKE2 "brake2" 660 #define VAL_LIGHT_REVERSE "reverse" 661 #define VAL_LIGHT_REAR "rear" 662 /* Simulation Options */ 663 #define PRM_DAMAGE_TYRES "damage/tyres" 664 #define PRM_DAMAGE_SUSPENSION "damage/suspension" 665 #define PRM_DAMAGE_ALIGNMENT "damage/alignment" 666 #define PRM_DAMAGE_AERO "damage/aero" 667 #define PRM_MODEL_AEROFLOW "model/aero/flow" 668 #define PRM_MODEL_AERO_FACTOR "model/aero/factor" 669 #define PRM_MODEL_TYRE_TEMPERATURE "model/tyre/temperature" 670 671 // Collision constants. 672 #define SEM_COLLISION 0x01 673 #define SEM_COLLISION_XYSCENE 0x02 674 #define SEM_COLLISION_CAR 0x04 675 #define SEM_COLLISION_Z 0x08 676 #define SEM_COLLISION_Z_CRASH 0x10 677 678 679 #endif /* __CARV1_H__ */ 680 681 682 683