forked from speed-dreams/speed-dreams-code
Update parameters ABS/TCL
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@5822 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 9a209218267e9daf9209fad803b95e3b5e63b4d3 Former-commit-id: 0e4359dd5843cc1d444ee5a84ea9f42fd45fe6de
This commit is contained in:
parent
ae6cf548b5
commit
c14253bea3
3 changed files with 10 additions and 6 deletions
|
@ -62,10 +62,14 @@ SimBrakeUpdate(tCar *car, tWheel *wheel, tBrake *brake)
|
||||||
brake->Tq = brake->coeff * brake->pressure;
|
brake->Tq = brake->coeff * brake->pressure;
|
||||||
|
|
||||||
// Option ABS ...
|
// Option ABS ...
|
||||||
if (car->features & FEAT_ABSINSIMU)
|
// if (car->features & FEAT_ABSINSIMU)
|
||||||
{
|
{
|
||||||
if (brake->EnableABS)
|
if (brake->EnableABS)
|
||||||
brake->Tq *= brake->ABS;
|
brake->Tq *= brake->ABS;
|
||||||
|
/*
|
||||||
|
if (brake->EnableABS)
|
||||||
|
fprintf(stderr,"ABS: %.1f %%\n",brake->ABS * 100.0);
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
// ... Option ABS
|
// ... Option ABS
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -180,7 +180,7 @@ SimEngineUpdateTq(tCar *car)
|
||||||
if (engine->EnableTCL)
|
if (engine->EnableTCL)
|
||||||
fprintf(stderr,"TCL: %.1f %%\n", engine->TCL * 100);
|
fprintf(stderr,"TCL: %.1f %%\n", engine->TCL * 100);
|
||||||
*/
|
*/
|
||||||
engine->TCL = 1.0; // Reset the TCL accel command
|
//engine->TCL = 1.0; // Reset the TCL accel command
|
||||||
}
|
}
|
||||||
// ... Option TCL
|
// ... Option TCL
|
||||||
|
|
||||||
|
|
|
@ -170,7 +170,7 @@ void SimWheelUpdateRide(tCar *car, int index)
|
||||||
// update wheel brake
|
// update wheel brake
|
||||||
SimBrakeUpdate(car, wheel, &(wheel->brake));
|
SimBrakeUpdate(car, wheel, &(wheel->brake));
|
||||||
|
|
||||||
/*
|
/**/
|
||||||
// Option TCL ...
|
// Option TCL ...
|
||||||
if (car->features & FEAT_TCLINSIMU)
|
if (car->features & FEAT_TCLINSIMU)
|
||||||
{
|
{
|
||||||
|
@ -178,10 +178,10 @@ void SimWheelUpdateRide(tCar *car, int index)
|
||||||
{ // After using the values for the last wheel
|
{ // After using the values for the last wheel
|
||||||
tEngine *engine = &(car->engine);
|
tEngine *engine = &(car->engine);
|
||||||
engine->TCL = 1.0; // Reset the TCL accel command
|
engine->TCL = 1.0; // Reset the TCL accel command
|
||||||
wheel->brake.TCLMin = 1.0; // Reset the TCL brake command reference value
|
//wheel->brake.TCLMin = 1.0; // Reset the TCL brake command reference value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
/**/
|
||||||
// ... Option TCL
|
// ... Option TCL
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -371,7 +371,7 @@ void SimWheelUpdateForce(tCar *car, int index)
|
||||||
{
|
{
|
||||||
tdble TCL_SlipScale = 0.1f; // Make it be a parameter later
|
tdble TCL_SlipScale = 0.1f; // Make it be a parameter later
|
||||||
tdble TCL_BrakeScale = 1/60.0f; // Make it be a parameter later
|
tdble TCL_BrakeScale = 1/60.0f; // Make it be a parameter later
|
||||||
tdble TCL_AccelScale = 0.3f; // Make it be a parameter later
|
tdble TCL_AccelScale = 0.9f; // Make it be a parameter later
|
||||||
|
|
||||||
tEngine *engine = &(car->engine); // Get engine
|
tEngine *engine = &(car->engine); // Get engine
|
||||||
if (sx < -TCL_SlipScale) // Slip is over our limit
|
if (sx < -TCL_SlipScale) // Slip is over our limit
|
||||||
|
|
Loading…
Reference in a new issue