49 const tdble SUSP_DAMPER_MAX_VELOCITY = 10.0f;
53 if (fabs(v) > SUSP_DAMPER_MAX_VELOCITY) {
54 v = (
tdble)
SIGN(v) * SUSP_DAMPER_MAX_VELOCITY;
66 if (av < dampdef->v1) {
67 f = (dampdef->
C1 * av);
69 f = (dampdef->
C2 * av + dampdef->
b2);
89 f = spring->
K * (susp->
x - spring->
x0) + spring->
F0;
125 if (internalForce <= 0.0f) {
void SimSuspCheckIn(tSuspension *susp)
tCarPitSetupValue suspslowrebound[4]
bool SimAdjustPitCarSetupParam(tCarPitSetupValue *v)
#define SIGN(x)
Sign of the expression.
tCarPitSetupValue suspslowbump[4]
Section header structure.
static tdble damperForce(tSuspension *susp)
tCarPitSetupValue suspbumpthreshold[4]
#define PRM_BUMPTHRESHOLD
tCarPitSetupValue thirdspring[2]
float tdble
Floating point type used in TORCS.
tCarPitSetupValue susppackers[4]
tCarPitSetupValue thirdrebound[2]
tCarPitSetupValue thirdbump[2]
tCarPitSetupValue suspfastbump[4]
void SimSuspUpdate(tSuspension *susp)
#define PRM_REBOUNDTHRESHOLD
void SimSuspConfig(void *hdle, const char *section, tSuspension *susp, tdble F0, tdble X0)
static tdble springForce(tSuspension *susp)
tCarPitSetupValue suspreboundthreshold[4]
tdble GfParmGetNum(void *handle, const char *path, const char *key, const char *unit, tdble deflt)
Get a numerical parameter from the parameter set handle.
void SimSuspReConfig(tCar *car, int index, tSuspension *susp, tdble F0, tdble X0)
void SimSuspThirdReConfig(tCar *car, int index, tSuspension *susp, tdble F0, tdble X0)
tCarPitSetupValue suspfastrebound[4]
tCarPitSetupValue suspspring[4]
static void initDamper(tSuspension *susp)