Re: halving the range of wheel->lfMax and wheel->lfMin

David Savinkoff <[email protected]> Sun, 2 Oct 2016 17:48:34 -0600 (MDT)
Newsgroups gmane.games.torcs.general
Message-ID <1644594643.138481575.1475452114846.JavaMail.zimbra@mailid.telus.net>
----- Bernhard Wymann wrote:
> Hi David
> 
> You can set these parameters directly in the xml configuration of the 
> car, no reason to fudge with the code, see wheel.cpp:
> wheel->lfMax = GfParmGetNum(hdle, WheelSect[index], PRM_LOADFMAX, 
> (char*)NULL, 1.6f);
> wheel->lfMin = GfParmGetNum(hdle, WheelSect[index], PRM_LOADFMIN, 
> (char*)NULL, 0.8f);
> 
> Look up the definition in car.h for the effective xml parameter name:
> #define PRM_LOADFMIN            "load factor min"
> #define PRM_OPLOAD              "operating load"
> 
> Kind regards
> 
> Bernhard
>
Hi Bernhard,

Thanks for the info. I just used grep on TORCS to scan everything
and found that ./data/cars/models/kc-bigh/kc-bigh.xml is the only
car in torcs-1.3.7 that sets "load factor max" or min.
All of the other cars use the default that you showed here:
> wheel.cpp:
> wheel->lfMax = GfParmGetNum(hdle, WheelSect[index], PRM_LOADFMAX, 
> (char*)NULL, 1.6f);
> wheel->lfMin = GfParmGetNum(hdle, WheelSect[index], PRM_LOADFMIN, 
> (char*)NULL, 0.8f);

I believe the default should be changed to

wheel->lfMax = GfParmGetNum(... , ...PRM_LOADFMAX, ... 1.4f);
wheel->lfMin = GfParmGetNum(... , ...PRM_LOADFMIN, ... 1.0f);

because this improves all of the cars that I tested on different tracks.

Sincerely,
David Savinkoff

> On 02.10.2016 00:02, David Savinkoff wrote:
> > Hi,
> >
> > I found that halving the range of wheel->lfMax and wheel->lfMin
> > greatly improves realistic tire performance in TORCS
> >
> > see line 283 in the patch:
> >
> >  	// load sensitivity
> > -	mu = wheel->mu * (wheel->lfMin + (wheel->lfMax - wheel->lfMin) * exp(wheel->lfK * zforce / wheel->opLoad));
> > +	mu = wheel->mu * ((0.75f*wheel->lfMin + 0.25f*wheel->lfMax) + 0.5f*(wheel->lfMax - wheel->lfMin) * exp(wheel->lfK * zforce / wheel->opLoad));
> >
> > Test the true limits with TORCS.
> 


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot