TORCS
1.3.9
The Open Racing Car Simulator
wheel.h
Go to the documentation of this file.
1
/***************************************************************************
2
3
file : wheel.h
4
created : Sun Mar 19 00:09:18 CET 2000
5
copyright : (C) 2000-2017 by Eric Espie, Bernhard Wymann
6
email : torcs@free.fr
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
20
#ifndef _WHEEL_H__
21
#define _WHEEL_H__
22
23
#include "
differential.h
"
24
25
typedef
struct
26
{
27
28
/* internal data */
29
tSuspension
susp
;
/* associated suspension */
30
tBrake
brake
;
/* associated brake disk */
31
32
/* dynamic */
33
t3Dd
forces
;
/* forces acting on car */
34
tdble
rollRes
;
/* Rolling Resistance (summed over the car) */
35
tdble
rideHeight
;
/* height of the bottom of the car */
36
tdble
zRoad
;
/* z of the road */
37
t3Dd
pos
;
/* world related */
38
t3Dd
bodyVel
;
/* world related */
39
tdble
driveTq
;
/* engine torque */
40
tdble
vt
;
41
42
tdble
spinTq
;
/* spin torque feedback */
43
tdble
spinVel
;
/* spin velocity */
44
tdble
prespinVel
;
/* spin velocity */
45
int
state
;
/* wheel state */
46
/* 1 and 2 are for suspension state */
47
#define SIM_WH_ONAIR 4
/* the wheel has no contact to the ground although the suspension is not fully extended */
48
tdble
axleFz
;
/* force from axle (anti-roll bar) */
49
tTrkLocPos
trkPos
;
/* current track position */
50
t3Dd
surfaceNormal
;
// Normal of the surface under this wheel
51
tPosd
relPos
;
/* relative pos / GC */
52
tdble
sa
;
/* slip angle */
53
tdble
sx
;
/* longitudinal slip value */
54
tdble
steer
;
55
56
/* static */
57
tPosd
staticPos
;
/* pos relative to the GC (z is suspension travel at rest) */
58
/* and angles are camber (ax), caster (ay) and toe (az) */
59
tdble
rollCenter
;
60
61
tdble
weight0
;
/* initial weight on this wheel */
62
tdble
tireSpringRate
;
63
tdble
radius
;
64
tdble
mu
;
65
tdble
I
;
/* I = inertial moment of the wheel */
66
tdble
curI
;
/* Current inertia for the wheel (including transmission) */
67
tdble
mfC
;
/* Magic Formula C coeff */
68
tdble
mfB
;
/* Magic Formula B coeff */
69
tdble
mfE
;
/* Magic Formula E coeff */
70
tdble
lfMax
;
/* Load factor */
71
tdble
lfMin
;
/* Load factor */
72
tdble
lfK
;
/* Load factor */
73
tdble
opLoad
;
/* Operating load */
74
tdble
mass
;
/* total wheel mass (incl. brake) (unsprung mass) */
75
tdble
camber
;
/* camber, negative toward exterior on both sides */
76
tdble
pressure
;
/* initial tire pressure, environment temperature */
77
tdble
rel_vel
;
/* relative velocity - used for realstic suspension movement*/
78
tdble
tirewidth
;
/* width of tire, used for surface property blending */
79
80
tDynAxis
in
;
81
tDynAxis
feedBack
;
82
83
tdble
preFn,
preFt
;
84
85
// Additional parameters for the tire wear model
86
tdble
treadMass
;
// Initial mass of the tread
87
tdble
baseMass
;
// Mass of the tire minus the tread
88
tdble
treadThinkness
;
// Thinkness of the initial tread (brand new tire)
89
tdble
tireGasMass
;
// Mass of the gas in the tire (constant)
90
tdble
tireConvectionSurface
;
// Surface area regarding the convection model
91
tdble
initialTemperature
;
// Initial temperature of the tire (initial pressure, p0/T0=constant)
92
tdble
hysteresisFactor
;
// Factor to adjust the hysteresis (model fitting), usually close to 1.0.
93
tdble
wearFactor
;
// Factor to adjust the wear (model fitting), usually close to 1.0.
94
tdble
idealTemperature
;
// Ideal tire temperature for best grip.
95
96
// Dynamic Tire properties (temp, wear, etc.)
97
tdble
currentPressure
;
// current tire pressure considering temperature
98
tdble
currentTemperature
;
// current temperature
99
double
currentWear
;
// [0..1], 1 means totally worn (tread thickness 0)
100
tdble
currentGraining
;
// [0..1], 1 means totally grained
101
tdble
currentGripFactor
;
// [0..1], 1 means best grip
102
103
tdble
tireSlip
;
// Slip of the tire from tire model calculation
104
tdble
tireZForce
;
// Force on tire
105
106
}
tWheel
;
107
108
109
110
#endif
/* _WHEEL_H__ */
111
112
113
differential.h
tWheel::opLoad
tdble opLoad
Definition:
wheel.h:73
tWheel::initialTemperature
tdble initialTemperature
Definition:
wheel.h:91
tWheel::sx
tdble sx
Definition:
wheel.h:53
tWheel::currentTemperature
tdble currentTemperature
Definition:
wheel.h:98
tWheel::tireZForce
tdble tireZForce
Definition:
wheel.h:104
tWheel::wearFactor
tdble wearFactor
Definition:
wheel.h:93
tWheel::in
tDynAxis in
Definition:
wheel.h:80
tWheel::prespinVel
tdble prespinVel
Definition:
wheel.h:44
tWheel::steer
tdble steer
Definition:
wheel.h:54
tWheel::mfB
tdble mfB
Definition:
wheel.h:68
tWheel::hysteresisFactor
tdble hysteresisFactor
Definition:
wheel.h:92
tTrkLocPos
Location on the track in local coordinates.
Definition:
track.h:418
tWheel::treadMass
tdble treadMass
Definition:
wheel.h:86
tWheel::mfC
tdble mfC
Definition:
wheel.h:67
tWheel::rollRes
tdble rollRes
Definition:
wheel.h:34
tWheel::lfMax
tdble lfMax
Definition:
wheel.h:70
tWheel::lfK
tdble lfK
Definition:
wheel.h:72
tWheel::mu
tdble mu
Definition:
wheel.h:64
tWheel::tireSlip
tdble tireSlip
Definition:
wheel.h:103
tWheel::tireConvectionSurface
tdble tireConvectionSurface
Definition:
wheel.h:90
tWheel::curI
tdble curI
Definition:
wheel.h:66
tWheel::spinTq
tdble spinTq
Definition:
wheel.h:42
tWheel::rollCenter
tdble rollCenter
Definition:
wheel.h:59
tWheel::relPos
tPosd relPos
Definition:
wheel.h:51
tWheel::brake
tBrake brake
Definition:
wheel.h:30
tWheel::susp
tSuspension susp
Definition:
wheel.h:29
tBrake
Definition:
brake.h:22
tWheel::currentGripFactor
tdble currentGripFactor
Definition:
wheel.h:101
tWheel::mfE
tdble mfE
Definition:
wheel.h:69
tWheel::idealTemperature
tdble idealTemperature
Definition:
wheel.h:94
tWheel::radius
tdble radius
Definition:
wheel.h:63
tWheel::vt
tdble vt
Definition:
wheel.h:40
tWheel::lfMin
tdble lfMin
Definition:
wheel.h:71
tWheel::trkPos
tTrkLocPos trkPos
Definition:
wheel.h:49
tWheel
Definition:
wheel.h:25
tWheel::zRoad
tdble zRoad
Definition:
wheel.h:36
tWheel::pressure
tdble pressure
Definition:
wheel.h:76
tWheel::currentWear
double currentWear
Definition:
wheel.h:99
tWheel::tireSpringRate
tdble tireSpringRate
Definition:
wheel.h:62
tdble
float tdble
Floating point type used in TORCS.
Definition:
tgf.h:48
tWheel::staticPos
tPosd staticPos
Definition:
wheel.h:57
tWheel::pos
t3Dd pos
Definition:
wheel.h:37
tWheel::axleFz
tdble axleFz
Definition:
wheel.h:48
tWheel::I
tdble I
Definition:
wheel.h:65
tWheel::currentGraining
tdble currentGraining
Definition:
wheel.h:100
tWheel::driveTq
tdble driveTq
Definition:
wheel.h:39
tWheel::baseMass
tdble baseMass
Definition:
wheel.h:87
tWheel::mass
tdble mass
Definition:
wheel.h:74
tWheel::surfaceNormal
t3Dd surfaceNormal
Definition:
wheel.h:50
tPosd
6 DOF position.
Definition:
tgf.h:130
tWheel::rel_vel
tdble rel_vel
Definition:
wheel.h:77
tWheel::spinVel
tdble spinVel
Definition:
wheel.h:43
tWheel::weight0
tdble weight0
Definition:
wheel.h:61
tWheel::treadThinkness
tdble treadThinkness
Definition:
wheel.h:88
tWheel::rideHeight
tdble rideHeight
Definition:
wheel.h:35
tWheel::preFt
tdble preFt
Definition:
wheel.h:83
Suspension
Definition:
susp.h:47
t3Dd
3D point.
Definition:
tgf.h:115
tWheel::camber
tdble camber
Definition:
wheel.h:75
tWheel::feedBack
tDynAxis feedBack
Definition:
wheel.h:81
tWheel::tirewidth
tdble tirewidth
Definition:
wheel.h:78
tWheel::sa
tdble sa
Definition:
wheel.h:52
tDynAxis
Definition:
differential.h:23
tWheel::forces
t3Dd forces
Definition:
wheel.h:33
tWheel::bodyVel
t3Dd bodyVel
Definition:
wheel.h:38
tWheel::state
int state
Definition:
wheel.h:45
tWheel::currentPressure
tdble currentPressure
Definition:
wheel.h:97
tWheel::tireGasMass
tdble tireGasMass
Definition:
wheel.h:89
src
modules
simu
simuv2
wheel.h
Generated by
1.8.14