TORCS  1.3.9
The Open Racing Car Simulator
transmission.h
Go to the documentation of this file.
1 /***************************************************************************
2 
3  file : transmission.h
4  created : Mon Apr 16 16:04:36 CEST 2001
5  copyright : (C) 2001 by Eric Espi�
6  email : Eric.Espie@torcs.org
7  version : $Id$
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 
26 #ifndef _TRANSMISSION_H_
27 #define _TRANSMISSION_H_
28 
29 typedef struct
30 {
31  int gear;
32  int gearMin;
33  int gearMax;
34 } tGearbox;
35 
36 typedef struct
37 {
38  int state;
39 #define CLUTCH_APPLIED 1
40 #define CLUTCH_RELEASED 0
41 #define CLUTCH_RELEASING 2
42  int mode;
43 #define CLUTCH_AUTO 0
44 #define CLUTCH_MANUAL 1
45  tdble timeToRelease; /* remaining time before releasing the clutch pedal */
46  tdble releaseTime; /* time needed for releasing the clutch pedal */
47  tdble transferValue; /* 1.0 -> released, 0.0 -> applied */
48 } tClutch;
49 
50 typedef struct
51 {
54  int type;
55 #define TRANS_RWD 0
56 #define TRANS_FWD 1
57 #define TRANS_4WD 2
58  tdble overallRatio[MAX_GEARS]; /* including final drive ratio */
59  tdble driveI[MAX_GEARS]; /* Inertia (including engine) */
60  tdble freeI[MAX_GEARS]; /* Inertia when clutch is applied (wheels side) */
61  tdble gearEff[MAX_GEARS]; /* Gear Efficiency */
64 
65 #define TRANS_FRONT_DIFF 0
66 #define TRANS_REAR_DIFF 1
67 #define TRANS_CENTRAL_DIFF 2
68  tDifferential differential[3];
70 
71 
72 #endif /* _TRANSMISSION_H_ */
73 
74 
75 
tdble timeToRelease
Definition: transmission.h:45
float tdble
Floating point type used in TORCS.
Definition: tgf.h:48
tdble transferValue
Definition: transmission.h:47
int gearMax
Definition: transmission.h:33
tClutch clutch
Definition: transmission.h:53
tdble releaseTime
Definition: transmission.h:46
int state
Definition: transmission.h:38
int gearMin
Definition: transmission.h:32
tGearbox gearbox
Definition: transmission.h:52
#define MAX_GEARS
Definition: car.h:276
int mode
Definition: transmission.h:42
tdble curOverallRatio
Definition: transmission.h:62