35 #define MAX_NAME_LEN 32 59 #define _rimRadius(i) info.wheel[i].rimRadius 60 #define _tireHeight(i) info.wheel[i].tireHeight 61 #define _tireWidth(i) info.wheel[i].tireWidth 62 #define _brakeDiskRadius(i) info.wheel[i].brakeDiskRadius 63 #define _wheelRadius(i) info.wheel[i].wheelRadius 93 #define _name info.name 94 #define _teamname info.teamname 95 #define _carName info.carName 96 #define _category info.category 97 #define _driverType info.driverType 98 #define _skillLevel info.skillLevel 99 #define _raceNumber info.raceNumber 100 #define _startRank info.startRank 101 #define _dimension info.dimension 102 #define _dimension_x info.dimension.x 103 #define _dimension_y info.dimension.y 104 #define _dimension_z info.dimension.z 105 #define _drvPos_x info.drvPos.x 106 #define _drvPos_y info.drvPos.y 107 #define _drvPos_z info.drvPos.z 108 #define _bonnetPos_x info.bonnetPos.x 109 #define _bonnetPos_y info.bonnetPos.y 110 #define _bonnetPos_z info.bonnetPos.z 111 #define _statGC info.statGC 112 #define _statGC_x info.statGC.x 113 #define _statGC_y info.statGC.y 114 #define _statGC_z info.statGC.z 115 #define _iconColor info.iconColor 116 #define _tank info.tank 117 #define _steerLock info.steerLock 118 #define _exhaustNb info.visualAttr.exhaustNb 119 #define _exhaustPos info.visualAttr.exhaustPos 120 #define _exhaustPower info.visualAttr.exhaustPower 122 #define RM_DRV_HUMAN 1 123 #define RM_DRV_ROBOT 2 126 #define RM_PENALTY_DRIVETHROUGH 1 127 #define RM_PENALTY_STOPANDGO 2 166 #define _bestLapTime race.bestLapTime 167 #define _commitBestLapTime race.commitBestLapTime 168 #define _deltaBestLapTime race.deltaBestLapTime 169 #define _curLapTime race.curLapTime 170 #define _curTime race.curTime 171 #define _lastLapTime race.lastLapTime 172 #define _topSpeed race.topSpeed 173 #define _currentMinSpeedForLap race.currentMinSpeedForLap 174 #define _laps race.laps 175 #define _nbPitStops race.nbPitStops 176 #define _remainingLaps race.remainingLaps 177 #define _pos race.pos 178 #define _timeBehindLeader race.timeBehindLeader 179 #define _lapsBehindLeader race.lapsBehindLeader 180 #define _timeBehindPrev race.timeBehindPrev 181 #define _timeBeforeNext race.timeBeforeNext 182 #define _distRaced race.distRaced 183 #define _distFromStartLine race.distFromStartLine 184 #define _pit race.pit 185 #define _scheduledEventTime race.scheduledEventTime 186 #define _event race.event 187 #define _penaltyList race.penaltyList 188 #define _penaltyTime race.penaltyTime 210 #define RM_CAR_STATE_FINISH 0x00000100 211 #define RM_CAR_STATE_PIT 0x00000001 212 #define RM_CAR_STATE_DNF 0x00000002 213 #define RM_CAR_STATE_PULLUP 0x00000004 214 #define RM_CAR_STATE_PULLSIDE 0x00000008 215 #define RM_CAR_STATE_PULLDN 0x00000010 216 #define RM_CAR_STATE_OUT (RM_CAR_STATE_DNF | RM_CAR_STATE_FINISH) 217 #define RM_CAR_STATE_NO_SIMU 0x000000FF 218 #define RM_CAR_STATE_BROKEN 0x00000200 219 #define RM_CAR_STATE_OUTOFGAS 0x00000400 220 #define RM_CAR_STATE_ELIMINATED 0x00000800 221 #define RM_CAR_STATE_SIMU_NO_MOVE 0x00010000 226 #define _DynGC pub.DynGC 227 #define _pos_X pub.DynGC.pos.x 228 #define _pos_Y pub.DynGC.pos.y 229 #define _pos_Z pub.DynGC.pos.z 230 #define _roll pub.DynGC.pos.ax 231 #define _pitch pub.DynGC.pos.ay 232 #define _yaw pub.DynGC.pos.az 233 #define _yaw_rate pub.DynGC.vel.az 234 #define _speed_x pub.DynGC.vel.x 235 #define _speed_y pub.DynGC.vel.y 236 #define _speed_z pub.DynGC.vel.z 237 #define _accel_x pub.DynGC.acc.x 238 #define _accel_y pub.DynGC.acc.y 239 #define _accel_z pub.DynGC.acc.z 240 #define _state pub.state 241 #define _trkPos pub.trkPos 242 #define _speed_X pub.DynGCg.vel.x 243 #define _speed_Y pub.DynGCg.vel.y 244 #define _corner_x(i) pub.corner[i].ax 245 #define _corner_y(i) pub.corner[i].ay 246 #define _posMat pub.posMat 266 #define _ride(i) priv.wheel[i].relPos.z 267 #define _brakeTemp(i) priv.wheel[i].brakeTemp 268 #define _wheelSpinVel(i) priv.wheel[i].spinVel 269 #define _wheelSeg(i) priv.wheel[i].seg 270 #define _wheelSlipSide(i) priv.wheel[i].slipSide 271 #define _wheelSlipAccel(i) priv.wheel[i].slipAccel 272 #define _wheelFx(i) priv.wheel[i].Fx 273 #define _wheelFy(i) priv.wheel[i].Fy 274 #define _wheelFz(i) priv.wheel[i].Fz 322 #define _driverIndex priv.driverIndex 323 #define _paramsHandle priv.paramsHandle 324 #define _carHandle priv.carHandle 325 #define _modName priv.modName 326 #define _enginerpm priv.enginerpm 327 #define _enginerpmRedLine priv.enginerpmRedLine 328 #define _enginerpmMax priv.enginerpmMax 329 #define _enginerpmMaxTq priv.enginerpmMaxTq 330 #define _enginerpmMaxPw priv.enginerpmMaxPw 331 #define _engineMaxTq priv.engineMaxTq 332 #define _engineMaxPw priv.engineMaxPw 333 #define _gearRatio priv.gearRatio 334 #define _gearNb priv.gearNb 335 #define _gearOffset priv.gearOffset 336 #define _fuel priv.fuel 337 #define _gear priv.gear 338 #define _debug priv.debug 339 #define _skid priv.skid 340 #define _reaction priv.reaction 341 #define _dammage priv.dammage 351 #define RM_CMD_NONE 0 352 #define RM_CMD_PIT_ASKED 1 354 #define RM_MSG_LEN 31 357 #define RM_LIGHT_HEAD1 0x00000001 358 #define RM_LIGHT_HEAD2 0x00000002 359 int brakeRepartitionCmd; 361 #define _steerCmd ctrl.steer 362 #define _accelCmd ctrl.accelCmd 363 #define _brakeCmd ctrl.brakeCmd 364 #define _clutchCmd ctrl.clutchCmd 365 #define _gearCmd ctrl.gear 366 #define _raceCmd ctrl.raceCmd 367 #define _msgCmd ctrl.msg 368 #define _msgColorCmd ctrl.msgColor 369 #define _lightCmd ctrl.lightCmd 429 enum TDiffType { NONE = 0, SPOOL = 1, FREE = 2, LIMITED_SLIP = 3, VISCOUS_COUPLER = 4};
438 #define RM_PIT_REPAIR 0 439 #define RM_PIT_STOPANDGO 1 447 #define _pitFuel pitcmd.fuel 448 #define _pitRepair pitcmd.repair 449 #define _pitStopType pitcmd.stopType 472 #define SECT_SIMU_SETTINGS "Simulation Options" 473 #define SECT_CAR "Car" 474 #define SECT_FRNT "Front" 475 #define SECT_FRNTWING "Front Wing" 476 #define SECT_FRNTAXLE "Front Axle" 477 #define SECT_FRNTARB "Front Anti-Roll Bar" 478 #define SECT_FRNTRGTWHEEL "Front Right Wheel" 479 #define SECT_FRNTLFTWHEEL "Front Left Wheel" 480 #define SECT_FRNTRGTSUSP "Front Right Suspension" 481 #define SECT_FRNTLFTSUSP "Front Left Suspension" 482 #define SECT_FRNTRGTBRAKE "Front Right Brake" 483 #define SECT_FRNTLFTBRAKE "Front Left Brake" 484 #define SECT_FRNTDIFFERENTIAL "Front Differential" 485 #define SECT_REAR "Rear" 486 #define SECT_REARWING "Rear Wing" 487 #define SECT_REARAXLE "Rear Axle" 488 #define SECT_REARARB "Rear Anti-Roll Bar" 489 #define SECT_REARRGTWHEEL "Rear Right Wheel" 490 #define SECT_REARLFTWHEEL "Rear Left Wheel" 491 #define SECT_REARRGTSUSP "Rear Right Suspension" 492 #define SECT_REARLFTSUSP "Rear Left Suspension" 493 #define SECT_REARRGTBRAKE "Rear Right Brake" 494 #define SECT_REARLFTBRAKE "Rear Left Brake" 495 #define SECT_REARDIFFERENTIAL "Rear Differential" 496 #define SECT_CENTRALDIFFERENTIAL "Central Differential" 497 #define SECT_STEER "Steer" 498 #define SECT_BRKSYST "Brake System" 499 #define SECT_AERODYNAMICS "Aerodynamics" 500 #define SECT_ENGINE "Engine" 501 #define SECT_CLUTCH "Clutch" 502 #define SECT_DRIVETRAIN "Drivetrain" 503 #define SECT_GEARBOX "Gearbox" 504 #define SECT_DRIVER "Driver" 505 #define SECT_BONNET "Bonnet" 506 #define SECT_GROBJECTS "Graphic Objects" 507 #define SECT_EXHAUST "Exhaust" 508 #define SECT_LIGHT "Light" 511 #define PRM_CATEGORY "category" 512 #define PRM_LEN "body length" 513 #define PRM_WIDTH "body width" 514 #define PRM_OVERALLLEN "overall length" 515 #define PRM_OVERALLWIDTH "overall width" 516 #define PRM_HEIGHT "body height" 517 #define PRM_MASS "mass" 518 #define PRM_FRWEIGHTREP "front-rear weight repartition" 519 #define PRM_FRLWEIGHTREP "front right-left weight repartition" 520 #define PRM_RRLWEIGHTREP "rear right-left weight repartition" 521 #define PRM_GCHEIGHT "GC height" 522 #define PRM_TANK "fuel tank" 523 #define PRM_FUEL "initial fuel" 524 #define PRM_CENTR "mass repartition coefficient" 525 #define PRM_INERTIA "inertia" 526 #define PRM_EFFICIENCY "efficiency" 527 #define PRM_TYPE "type" 528 #define PRM_SIZE "size" 532 #define PRM_RIMDIAM "rim diameter" 533 #define PRM_TIREWIDTH "tire width" 534 #define PRM_TIRERATIO "tire height-width ratio" 535 #define PRM_RIDEHEIGHT "ride height" 536 #define PRM_TOE "toe" 537 #define PRM_CAMBER "camber" 538 #define PRM_CASTER "caster" 539 #define PRM_CA "stiffness" 540 #define PRM_RFACTOR "dynamic friction" 541 #define PRM_EFACTOR "elasticity factor" 542 #define PRM_PRESSURE "pressure" 543 #define PRM_LOADFMAX "load factor max" 544 #define PRM_LOADFMIN "load factor min" 545 #define PRM_OPLOAD "operating load" 546 #define PRM_TREADTHICKNESS "tread thickness" 547 #define PRM_RIMMASS "rim mass" 548 #define PRM_HYSTERESIS "hysteresis" 549 #define PRM_IDEALTEMP "ideal temperature" 550 #define PRM_WEAR "wear" 553 #define PRM_SPR "spring" 554 #define PRM_SUSPCOURSE "suspension course" 555 #define PRM_BELLCRANK "bellcrank" 556 #define PRM_PACKERS "packers" 557 #define PRM_SLOWBUMP "slow bump" 558 #define PRM_SLOWREBOUND "slow rebound" 559 #define PRM_FASTBUMP "fast bump" 560 #define PRM_FASTREBOUND "fast rebound" 561 #define PRM_BUMPTHRESHOLD "fast bump threshold" 562 #define PRM_REBOUNDTHRESHOLD "fast rebound threshold" 564 #define PRM_XPOS "xpos" 565 #define PRM_YPOS "ypos" 566 #define PRM_ZPOS "zpos" 568 #define PRM_STEERLOCK "steer lock" 569 #define PRM_STEERSPD "max steer speed" 571 #define PRM_BRKDIAM "disk diameter" 572 #define PRM_BRKAREA "piston area" 573 #define PRM_BRKREP "front-rear brake repartition" 574 #define PRM_BRKPRESS "max pressure" 575 #define PRM_BRKREPCMD_MAXCLICKS "brake repartition max clicks" 576 #define PRM_BRKREPCMD_CLICKVALUE "brake repartition offset per click" 579 #define PRM_FCL "front Clift" 580 #define PRM_RCL "rear Clift" 581 #define PRM_FRNTAREA "front area" 582 #define PRM_WINGAREA "area" 583 #define PRM_WINGANGLE "angle" 586 #define PRM_REVSLIM "revs limiter" 587 #define PRM_REVSMAX "revs maxi" 588 #define PRM_TICKOVER "tickover" 589 #define PRM_RPM "rpm" 591 #define ARR_DATAPTS "data points" 592 #define PRM_FUELCONS "fuel cons factor" 593 #define PRM_ENGBRKCOEFF "brake coefficient" 594 #define PRM_POWER "power" 595 #define PRM_TURBO "turbo" 596 #define PRM_TURBO_RPM "turbo rpm" 597 #define PRM_TURBO_FACTOR "turbo factor" 598 #define PRM_TURBO_LAG "turbo lag" 600 #define PRM_RATIO "ratio" 601 #define PRM_BIAS "bias" 603 #define ARR_GEARS "gears" 604 #define PRM_SHIFTTIME "shift time" 606 #define PRM_ROLLCENTER "roll center height" 608 #define LST_RANGES "Ranges" 609 #define PRM_THRESHOLD "threshold" 610 #define PRM_CAR "car" 611 #define PRM_WHEELSON "wheels" 612 #define PRM_ENV "env" 613 #define PRM_BONNET "bonnet" 614 #define PRM_WHEEL_TEXTURE "wheel texture" 615 #define PRM_SHADOW_TEXTURE "shadow texture" 617 #define PRM_MIN_TQ_BIAS "min torque bias" 618 #define PRM_MAX_TQ_BIAS "max torque bias" 619 #define PRM_MAX_SLIP_BIAS "max slip bias" 620 #define PRM_LOCKING_TQ "locking input torque" 621 #define PRM_LOCKINGBRAKE_TQ "locking brake input torque" 622 #define PRM_VISCOSITY_FACTOR "viscosity factor" 625 #define VAL_DIFF_NONE "NONE" 626 #define VAL_DIFF_SPOOL "SPOOL" 627 #define VAL_DIFF_FREE "FREE" 628 #define VAL_DIFF_LIMITED_SLIP "LIMITED SLIP" 629 #define VAL_DIFF_VISCOUS_COUPLER "VISCOUS COUPLER" 631 #define VAL_TRANS_RWD "RWD" 632 #define VAL_TRANS_FWD "FWD" 633 #define VAL_TRANS_4WD "4WD" 637 #define PRM_TACHO_TEX "tachometer texture" 638 #define PRM_TACHO_XSZ "tachometer width" 639 #define PRM_TACHO_YSZ "tachometer height" 640 #define PRM_TACHO_XPOS "tachometer x pos" 641 #define PRM_TACHO_YPOS "tachometer y pos" 642 #define PRM_TACHO_NDLXSZ "tachometer needle width" 643 #define PRM_TACHO_NDLYSZ "tachometer needle height" 644 #define PRM_TACHO_XCENTER "tachometer needle x center" 645 #define PRM_TACHO_YCENTER "tachometer needle y center" 646 #define PRM_TACHO_XDIGITCENTER "tachometer digit x center" 647 #define PRM_TACHO_YDIGITCENTER "tachometer digit y center" 648 #define PRM_TACHO_MINVAL "tachometer min value" 649 #define PRM_TACHO_MAXVAL "tachometer max value" 650 #define PRM_TACHO_MINANG "tachometer min angle" 651 #define PRM_TACHO_MAXANG "tachometer max angle" 653 #define PRM_SPEEDO_TEX "speedometer texture" 654 #define PRM_SPEEDO_XSZ "speedometer width" 655 #define PRM_SPEEDO_YSZ "speedometer height" 656 #define PRM_SPEEDO_XPOS "speedometer x pos" 657 #define PRM_SPEEDO_YPOS "speedometer y pos" 658 #define PRM_SPEEDO_NDLXSZ "speedometer needle width" 659 #define PRM_SPEEDO_NDLYSZ "speedometer needle height" 660 #define PRM_SPEEDO_XCENTER "speedometer needle x center" 661 #define PRM_SPEEDO_YCENTER "speedometer needle y center" 662 #define PRM_SPEEDO_XDIGITCENTER "speedometer digit x center" 663 #define PRM_SPEEDO_YDIGITCENTER "speedometer digit y center" 664 #define PRM_SPEEDO_MINVAL "speedometer min value" 665 #define PRM_SPEEDO_MAXVAL "speedometer max value" 666 #define PRM_SPEEDO_MINANG "speedometer min angle" 667 #define PRM_SPEEDO_MAXANG "speedometer max angle" 668 #define PRM_SPEEDO_DIGITAL "speedometer digital" 670 #define PRM_WHEEL_3D "3d wheel basename" 671 #define PRM_WHEEL_3D_DIR "3d wheel directory" 674 #define VAL_LIGHT_HEAD1 "head1" 675 #define VAL_LIGHT_HEAD2 "head2" 676 #define VAL_LIGHT_BRAKE "brake" 677 #define VAL_LIGHT_BRAKE2 "brake2" 678 #define VAL_LIGHT_REVERSE "reverse" 679 #define VAL_LIGHT_REAR "rear" 681 #define PRM_DAMAGE_TYRES "damage/tyres" 682 #define PRM_DAMAGE_SUSPENSION "damage/suspension" 683 #define PRM_DAMAGE_ALIGNMENT "damage/alignment" 684 #define PRM_DAMAGE_AERO "damage/aero" 685 #define PRM_MODEL_AEROFLOW "model/aero/flow" 686 #define PRM_MODEL_AERO_FACTOR "model/aero/factor" 687 #define PRM_MODEL_TYRE_TEMPERATURE "model/tyre/temperature" 690 #define SEM_COLLISION 0x01 691 #define SEM_COLLISION_XYSCENE 0x02 692 #define SEM_COLLISION_CAR 0x04 693 #define SEM_COLLISION_Z 0x08 694 #define SEM_COLLISION_Z_CRASH 0x10
int gear
[-1,6] for gear selection
struct tCollisionState_ tCollisionState
int raceCmd
command issued by the driver
tCollisionState collision_state
collision state
Interface Structure for Robots.
tdble brakeCmd
Brake command [0.0, 1.0].
int raceNumber
Car's race number.
sgMat4 posMat
position matrix
int lightCmd
Lights command.
struct CarElt tCarElt
Car structure (tCarElt).
Location on the track in local coordinates.
t3Dd dimension
Car's mesures.
tdble wheelRadius
Overall wheel radius.
int gearOffset
gearRatio[gear + gearOffset] is the ratio for gear
tdble clutchCmd
Clutch command [0.0, 1.0].
int startRank
Car's starting position.
tCarPitSetupValue brakePressure
GF_TAILQ_ENTRY(struct CarPenalty) link
double scheduledEventTime
tVisualAttributes visualAttr
Visual attributes.
int simcollision
For rules etc.
t3Dd statGC
Static pos of GC (should be the origin of car axis)
tCarPitSetupValue brakeRepartition
tdble exhaustPower
Power of the flames (from 1 to 3)
tCarPitSetupValue steerLock
struct CarPenalty tCarPenalty
One penalty.
tdble steerLock
Steer lock angle.
tdble rollRes
rolling resistance, useful for sound
tPosd relPos
position relative to GC
tdble steer
Steer command [-1.0, 1.0].
tDynPt DynGC
GC data (car axis)
float tdble
Floating point type used in TORCS.
struct RobotItf * robot
private
Race Administrative info.
int driverIndex
index when multiple drivers are in the same dll
void * carHandle
parameters for car caracteristics
tdble brakeDiskRadius
Brake disk radius.
tdble currentMinSpeedForLap
tdble rimRadius
Rim radius.
Dynamic wheel information.
GF_TAILQ_HEAD(CarPenaltyHead, struct CarPenalty)
int driverType
Driver type.
void * paramsHandle
accessible parameters for modules
tCarPenaltyHead penaltyList
List of current penalties.
tdble accelCmd
Accelerator command [0.0, 1.0].
int collision
Collision value for graphics and sound, clearing is managed by consumers.
Track segment (tTrackSeg) The segments can be straights (type TR_STR): (the track goes from the right...
t3Dd collpos
Collision position, useful for sound.
int gearNb
incl reverse and neutral
tTrackSeg * seg
Track segment where the wheel is.
int lapToClear
the lap before the penalty has to be cleared
t3Dd drvPos
Driver's position.
tdble fuel
remaining fuel (liters)
t3Dd bonnetPos
Bonnet's position.
tdble tireWidth
Tire width.
Data known only by the driver.
tdble tireHeight
Tire height.
Track Structure and Track Loader Module Definition.
int skillLevel
Driver's skill level (0=rookie -> 3=pro)
tdble brakeTemp
brake temperature from 0 (cool) to 1.0 (hot)
Info returned by driver during the race.
int exhaustNb
Number of exhaust pipes (max 2)
tTrkLocPos trkPos
current track position.
tdble tank
Fuel tank capa.
tdble spinVel
spin velocity rad/s
Static visual attributes.
int state
state of the car.
tDynPt DynGCg
GC data (world axis)
Command issued by the car during pit stop.