Re: Patch for wheel spin velocity traction

David Savinkoff <[email protected]> Tue, 31 Mar 2015 12:38:10 -0600 (MDT)
Newsgroups gmane.games.torcs.general
Message-ID <1563663873.12013984.1427827090422.JavaMail.zimbra@mailid.telus.net>
Hi,

Drive this one also. 

----- David Savinkoff wrote:
> Hi Bernhard,
> 
> Please apply this patch; which makes for better maneuvering while
> drifting and overtaking in corners. 
> 
> What I found interesting with the line of code:
> sx = (vt - wrl) / fabs(vt);
> 
> Is that:
> sx = (car_velocity - wheel_spin_velocity = slip_velocity) / car_velocity;
> Has no [units] and is 'with respect to' car_velocity.
> This works well with braking because the wheel_spin_velocity is less
> than the car_velocity.
> 
> When wheel_spin_velocity is faster than car_velocity, it appears that this
> unitless value works better with respect to wheel_spin_velocity.
> 
> Thus:
> sx = (vt - wrl) / ( MAX(fabs(vt) , fabs(wrl)) );
> 
> Sincerely,
> David Savinkoff

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/

_______________________________________________
Torcs-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/torcs-users
traction.next1.diff (text/x-patch, 467 B)
--- torcs-1.3.6/src/modules/simu/simuv2/wheel.cpp	2015-03-31 11:21:12.497806674 -0700
+++ torcs-1.3.6/src/modules/simu/simuv2/wheel.cpp	2015-03-31 10:57:02.552917891 -0700
@@ -301,7 +301,7 @@
 		wheel = &(car->wheel[i]);
 		wheel->spinVel = wheel->in.spinVel;
 
-		RELAXATION2(wheel->spinVel, wheel->prespinVel, 50.0f);
+		RELAXATION2(wheel->spinVel, wheel->prespinVel, 74.1f);
 
 		wheel->relPos.ay += wheel->spinVel * SimDeltaTime;
 		NORM_PI_PI(wheel->relPos.ay);