Code:
//calculate brake torque
btScalar wheel_brake_torque = (0 - wheel[i].GetAngularVelocity()) / dt * wheel[i].GetInertia() - wheel_drive_torque + tire_friction_torque;
if (wheel_brake_torque > 0 && wheel_brake_torque > brake[i].GetTorque())
{
wheel_brake_torque = brake[i].GetTorque();
}
...
What does
AngularVelocity / dt * Inertia term represent?
Consider half-braked wheel at constant high speed. In such condition brake force should equal friction force. But Velocity / dt * Inertia will be non-zero, increase with speed and depend on iteration time step. Why is it there?