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