Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug in cartire.cpp CARTIRE::PacejkaMz
08-15-2011, 06:18 PM,
#1
Bug in cartire.cpp CARTIRE::PacejkaMz
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;
Reply


Messages In This Thread
Bug in cartire.cpp CARTIRE::PacejkaMz - by LBodnar - 08-15-2011, 06:18 PM
[No subject] - by NaN - 08-16-2011, 05:49 PM
[No subject] - by LBodnar - 08-16-2011, 06:49 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)