The intention of
friction_coeff is to scale the total result therefore its early application to
D is problematic because
D itself is used in calculation of
B.
Code:
// peak factor
btScalar D = (c[1] * Fz + c[2]) * Fz * friction_coeff;
// stiffness factor
btScalar B = (c[3] * Fz * Fz + c[4] * Fz) * (1.0 - c[6] * btFabs(gamma)) * exp (-c[5] * Fz) / (c[0] * D); // <-----
...
// self-aligning torque
btScalar Mz = D * sin(c[0] * atan(B * S - E * (B * S - atan(B * S)))) + Sv;
Should be
Code:
// peak factor
btScalar D = (c[1] * Fz + c[2]) * Fz;
// stiffness factor
btScalar B = (c[3] * Fz * Fz + c[4] * Fz) * (1.0 - c[6] * btFabs(gamma)) * exp (-c[5] * Fz) / (c[0] * D);
...
// self-aligning torque
btScalar Mz = friction_coeff * D * sin(c[0] * atan(B * S - E * (B * S - atan(B * S)))) + Sv;