Prevent rounding error resulting in 3rd spring.
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@6018 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 28d7a722f6f6aa6b7e0202996a3fa853c13ad550 Former-commit-id: 2ecca9aa01af4a68540fe23498de7c54277444a1
This commit is contained in:
parent
01419ba47c
commit
a22710b2a7
1 changed files with 9 additions and 5 deletions
|
@ -142,10 +142,14 @@ SimCarConfig(tCar *car)
|
|||
/*for (i = 0; i < 2; i++) {
|
||||
SimAxleConfig(car, i, 0.0);
|
||||
}*/
|
||||
wf0 = (wf0 - car->wheel[FRNT_RGT].weight0 - car->wheel[FRNT_LFT].weight0);
|
||||
wr0 = (wr0 - car->wheel[REAR_RGT].weight0 - car->wheel[REAR_LFT].weight0);
|
||||
SimAxleConfig(car, FRNT, wf0);
|
||||
SimAxleConfig(car, REAR, wr0);
|
||||
if (Kfheave > 0.0f) {
|
||||
wf0 = (wf0 - car->wheel[FRNT_RGT].weight0 - car->wheel[FRNT_LFT].weight0);
|
||||
SimAxleConfig(car, FRNT, wf0);
|
||||
} else { SimAxleConfig(car, FRNT, 0.0f); }
|
||||
if (Krheave > 0.0f) {
|
||||
wr0 = (wr0 - car->wheel[REAR_RGT].weight0 - car->wheel[REAR_LFT].weight0);
|
||||
SimAxleConfig(car, REAR, wr0);
|
||||
} else { SimAxleConfig(car, REAR, 0.0f); }
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
SimWheelConfig(car, i);
|
||||
|
@ -328,7 +332,7 @@ SimCarUpdateForces(tCar *car)
|
|||
else {F.F.x -= w;}
|
||||
}
|
||||
}
|
||||
|
||||
printf("F.F.z=%g F.M.x=%g\n",F.F.z,F.M.x);
|
||||
/* compute accelerations */
|
||||
car->DynGC.acc.x = F.F.x * minv;
|
||||
car->DynGC.acc.y = F.F.y * minv;
|
||||
|
|
Loading…
Reference in a new issue