![]() |
torcs - 1.2.2 | ![]() |
00001 /*************************************************************************** 00002 00003 file : susp.h 00004 created : Sun Mar 19 00:08:53 CET 2000 00005 copyright : (C) 2000 by Eric Espie 00006 email : torcs@free.fr 00007 version : $Id: susp.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 _SUSP_H__ 00021 #define _SUSP_H__ 00022 00023 00024 typedef struct 00025 { 00026 tdble C1, b1, v1; /* coefs for slow */ 00027 tdble C2, b2; /* coefs for fast */ 00028 } tDamperDef; 00029 00030 typedef struct 00031 { 00032 tDamperDef bump; 00033 tDamperDef rebound; 00034 } tDamper; 00035 00036 typedef struct 00037 { 00038 tdble K; /* spring coef */ 00039 tdble F0; /* initial force */ 00040 tdble x0; /* initial suspension travel */ 00041 tdble xMax; /* maxi suspension travel */ 00042 tdble bellcrank; /* ratio of movement between wheel and suspension */ 00043 tdble packers; /* packer size (min susp. travel) */ 00044 } tSpring; 00045 00046 00047 typedef struct Suspension 00048 { 00049 tSpring spring; 00050 tDamper damper; 00051 00052 tdble x; /* suspension travel */ 00053 tdble v; /* suspension travel speed */ 00054 00055 tdble force; /* generated force */ 00056 int state; /* indicate the state of the suspension */ 00057 #define SIM_SUSP_COMP 1 /* the suspension is fully compressed */ 00058 #define SIM_SUSP_EXT 2 /* the suspension is fully extended */ 00059 00060 } tSuspension; 00061 00062 00063 #endif /* _SUSP_H__ */ 00064 00065 00066