![]() |
torcs - 1.2.2 | ![]() |
00001 /*************************************************************************** 00002 00003 file : wheel.h 00004 created : Sun Mar 19 00:09:18 CET 2000 00005 copyright : (C) 2000 by Eric Espie 00006 email : torcs@free.fr 00007 version : $Id: wheel.h,v 1.5 2004/01/15 18:23:22 torcs Exp $ 00008 00009 ***************************************************************************/ 00010 00011 /*************************************************************************** 00012 * * 00013 * This program is free software; you can redistribute it and/or modify * 00014 * it under the terms of the GNU General Public License as published by * 00015 * the Free Software Foundation; either version 2 of the License, or * 00016 * (at your option) any later version. * 00017 * * 00018 ***************************************************************************/ 00019 00020 #ifndef _WHEEL_H__ 00021 #define _WHEEL_H__ 00022 00023 #include "differential.h" 00024 00025 typedef struct 00026 { 00027 00028 /* internal data */ 00029 tSuspension susp; /* associated suspension */ 00030 tBrake brake; /* associated brake disk */ 00031 00032 /* dynamic */ 00033 t3Dd forces; /* forces acting on car */ 00034 tdble rollRes; /* Rolling Resistance (summed over the car) */ 00035 tdble rideHeight; /* height of the bottom of the car */ 00036 tdble zRoad; /* z of the road */ 00037 t3Dd pos; /* world related */ 00038 t3Dd bodyVel; /* world related */ 00039 tdble driveTq; /* engine torque */ 00040 tdble vt; 00041 00042 tdble spinTq; /* spin torque feedback */ 00043 tdble spinVel; /* spin velocity */ 00044 tdble prespinVel; /* spin velocity */ 00045 int state; /* wheel state */ 00046 /* 1 and 2 are for suspension state */ 00047 #define SIM_WH_SPINNING 4 /* the wheel is spinning */ 00048 #define SIM_WH_LOCKED 8 /* the wheel is locked */ 00049 tdble axleFz; /* force from axle (anti-roll bar) */ 00050 tTrkLocPos trkPos; /* current track position */ 00051 tPosd relPos; /* relative pos / GC */ 00052 tdble sa; /* slip angle */ 00053 tdble sx; /* longitudinal slip value */ 00054 tdble steer; 00055 00056 /* static */ 00057 tPosd staticPos; /* pos relative to the GC (z is suspension travel at rest) */ 00058 /* and angles are camber (ax), caster (ay) and toe (az) */ 00059 tdble rollCenter; 00060 00061 tdble weight0; /* initial weight on this wheel */ 00062 tdble tireSpringRate; 00063 tdble radius; 00064 tdble mu; 00065 tdble I; /* I = inertial moment of the wheel */ 00066 tdble curI; /* Current inertia for the wheel (including transmission) */ 00067 tdble mfC; /* Magic Formula C coeff */ 00068 tdble mfB; /* Magic Formula B coeff */ 00069 tdble mfE; /* Magic Formula E coeff */ 00070 tdble lfMax; /* Load factor */ 00071 tdble lfMin; /* Load factor */ 00072 tdble lfK; /* Load factor */ 00073 tdble opLoad; /* Operating load */ 00074 tdble mass; /* total wheel mass (incl. brake) (unsprung mass) */ 00075 tdble camber; /* camber, negative toward exterior on both sides */ 00076 tdble pressure; /* tire pressure */ 00077 00078 tDynAxis in; 00079 tDynAxis feedBack; 00080 00081 tdble preFn, preFt; 00082 } tWheel; 00083 00084 00085 00086 #endif /* _WHEEL_H__ */ 00087 00088 00089