TORCS  1.3.10
The Open Racing Car Simulator
Loading...
Searching...
No Matches
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
25
26#ifndef _TRANSMISSION_H_
27#define _TRANSMISSION_H_
28
29typedef struct
30{
31 int gear;
34} tGearbox;
35
36typedef 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
50typedef 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
70
71
72#endif /* _TRANSMISSION_H_ */
73
74
75
#define MAX_GEARS
Definition car.h:278
float tdble
Floating point type used in TORCS.
Definition tgf.h:47
tdble transferValue
tdble timeToRelease
tdble releaseTime
tdble gearEff[MAX_GEARS]
tdble overallRatio[MAX_GEARS]
tdble curOverallRatio
tdble driveI[MAX_GEARS]
tdble freeI[MAX_GEARS]
tGearbox gearbox
tDifferential differential[3]