# Inputs for Pacejka Magic Formula

This topic is 3966 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I'm re-implementing the pacejka formula and some car physics, and I just realized a major flaw. How do you actually get the car moving? What I mean by this is that the only inputs to the magic formula are the longitudinal slip and slip angle. These are calculated like so (pseudo comments I wrote):
/* COORDINATE (positive, negative): X IS FORWARD/BACKWARD, Y IS RIGHT/LEFT, Z DOWN/UP
* To find K (longitudinal slip):
*		 K = (-Vsx/Vx)
* 		where Vsx = longitudinal speed of the contact point with respect to woorld coords.
* 			  Vx  = longitudinal speed of the contact point with respect to the road plane (ground velocity)
*		ex.)    (reverse the order of this example, slip_x is what were trying to calculate)
*			slip_x = k / max_peak_slip;
*			K = 100.0 * (patch_speed - hub_velocity.x) / denom;
*
*			double denom = std::max (std::abs (hub_velocity.x), 3.0);
*			patch_speed = speed();
*			hub_velocity = m_velocity;
*
*			speed() = (rotational speed of the tire in radians per second) * radius;
*			m_velocity = m_ground_velocity;
*
* To find alpha (slip angle):
*		alpha = arctan(Vsy/|Vx|)
*		where Vsy = Vy, and Vy = lateral speed in the contact point with respect to the road plane (ground velocity)
* 			  Vx  = longitudinal speed of the contact point with respect to the road plane (ground velocity)
*		ex.) alpha = -rad_to_deg(atan2(hub_velocity.y, denom))

*/
I see nothing in there about any type of acceleration from gas resulting in a torque, or a brake torque, or steering torque. So, my question is, how do I go from the brake, drive, and steer torque to the two slip inputs for the magic formula? Thanks a lot! -Jedd

##### Share on other sites
It's not a flaw. Those formulas are for modeling the tires. The engine modeling is handled separately.

##### Share on other sites
Quote:
 Original post by VorpyIt's not a flaw. Those formulas are for modeling the tires. The engine modeling is handled separately.

I meant a flaw in my own logic of thinking :)

1. 1
2. 2
3. 3
Rutin
19
4. 4
khawk
14
5. 5
frob
12

• 9
• 11
• 11
• 23
• 12
• ### Forum Statistics

• Total Topics
633657
• Total Posts
3013197
×