2D car physics and high speed turning

I've been looking at the following page, which has been very helpful: http://www.asawicki.info/Mirror/Car%20Physics%20for%20Games/Car%20Physics%20for%20Games.html but have come into problems with the high speed turning section (about two thirds down the page)

He gives the following function to calculate the slip angle: but it looks as if Vlat and Vlong are both vectors, and I can't see how putting vectors into the arctan function or the sgn function (which I assume is a function which returns -1 or 1 depending on the value of the sign) works.

The immediately below this he talks about F n,lat which he describes as "normalized lateral force for a given slip angle", but I am not sure how to calculate this value.

I'm not sure of any of the maths below this either, but this may be because I have not yet worked out the above bits, so if you wish to explain things below it then I would be grateful but it is not necessary.

I am writing the code using C# and XNA if this is important.

Thanks

I believe those are the lateral and longitudinal components of the velocity. Because those values are aligned (side and forward, respectively) to the direction of the car, they don't need to be vectors at all. They can be described as a simple scalar value, where their direction is abstracted into the overall reference frame of the car.

Those values will always be at right angles to each other, composing the net velocity. Your values are being modified by the weight distribution, and the whole value between the parenthesis can be any value. Regardless, arc-tangent can accept values beyond the -1 to 1 range, because the tangent can produce values approaching +infinity and -infinity.

Bonus fact: is is preferred to call the inverse of tangent arctan rather than tan^-1 because (1 / tan(x)) is very different from running the tan function backwards. It's about avoiding confusion.

arctan(tan(x)) == x
tan^-1(x) == (1/tan(x))
tan^-1(tan(x)) == (1/tan(tan(x))) != x

Edit: The review of the car physics tutorial

I think the physics guide you are following should be studied with a lot of skepticism. There are several instances where the analysis is plainly wrong. The author strings together unrelated physics, and draws wrong conclusions from them. Here are a few examples:

1. He confuses the idea of center of mass with something he calls "center of geometry", sometimes even in the same sentence. Center of mass is very important to the study of statics and dynamics, but the measured distance from one point to another is not a valid way to determine the center of mass. The author makes this mistake, and even the formula posted in the question relies on that bad assumption.
2. The author describes pitching of the car during braking and acceleration, based on some height value (which should be the center of mass but is not determined at all), but does not relate it to relative position or the total forces applied to the car. If this calculation were to be done correctly, it would require 3-dimensions, which the author claims not to do.
3. He multiplies a constant by an angle. Both are unitless numbers. He somehow equates that to a force. In all physics, all the time, units must be conserved.
4. He equates the rate of increase in angular velocity to the amount of torque applied from the engine through the geartrain, etc. He divides the value by a very rough calculation of the moment of inertia of the wheels. This would only be valid if the car were suspended in the air, not contacting the ground. It is absurd to apply the concept to drive wheels.

So! That leads to point you asked about, which is when to apply either of the two subsequent calculations. He describes that one is for small angles, and the other is not, but he doesn't explain why. (It's the transition from static to sliding friction, by the way). I think that is the point where the guide become utterly useless, and goes from a poor understanding of physics to pure bullshit.

The guide gets one thing right. The forces applied in the direction of travel of the car affect the car's speed. The lateral forces applied to the wheels affect the angular momentum of the car. Almost everything else should be thrown out.

• Thank you for this, it seems so clear when someone explains it to me that I'm surprised I couldn't get it myself. I'm now looking at the F n,lat value and cannot see what this is describing. It also shows 2 ways of calculating F lateral so I'm not sure if I need both of these? Also what do I do once I have calculated the cornering & centripetal forces? Do I just sum these together with the other net forces? I hope you're able to explain. Thanks. – Luke Mar 5 '13 at 19:08
• I'll need to read your tutorial before I can get back to you and clarify my lunchbreak answer. I'll try to come back in the early evening. I'm at UTC -6, by the way. – Seth Battin Mar 5 '13 at 19:15
• Have you had a chance to take a look yet? – Luke Mar 7 '13 at 11:55
• I started to read through it, but I have not finished. Sorry for being slow; I am still looking through it. – Seth Battin Mar 7 '13 at 13:15
• I read it, but it made me very angry. I edited my answer. – Seth Battin Mar 8 '13 at 3:12