cmdr2's notes

Continuing on the race car simulator series. Last week, the "effective tire friction" calculation was implemented, which modeled the grip at the point of contact between the tire and the road surface. This intentionally did not take into account the vertical load (or any other forces), since the purpose was limited to calculating the "effective" friction coefficient based on the material conditions.

The next step was implemented yesterday, which calculates the effective force the tire will apply on the wheel axle, in reaction to the torque applied by the engine on the wheel axle. That reaction force will cause the car to move forward. It also factors in the existing inertial force (i.e. if the car is already moving) in order to model sideways slip (e.g. for drifting).

If the applied force on the tire's contact patch exceeds the max allowed traction force, then the tire will start slipping. That will reduce the effective torque applied back on the wheel axle (from the contact patch). The tire's softness is also considered, since the tire will deform in response to the different torques, which will reduce the force applied.

The current models for grip and force have been documented at the wiki:

  • grip
  • force
  • Interesting side note - the wiki documentation was written by feeding ChatGPT the code for each module, and asking it to write such a document (with math formulae). It was pretty good, and I didn't have to do a lot of manual editing on the generated output.

    Also, all the searches performed on Perplexity AI for this project are available at the Perplexity Space created for this project.