Simuv4.1: Corrected an issue with new tire heating curve, should be properly progressive now

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9285 30fe4595-0a0c-4342-8851-515496e4dcbd
This commit is contained in:
harunasan 2024-01-25 03:40:54 +00:00
parent abe3c3e8a4
commit c8a8c57b9b
1 changed files with 4 additions and 6 deletions

View File

@ -890,6 +890,7 @@ void SimWheelUpdateTire(tCar *car, int index)
tdble slipRatio = wheel->spinVel * wheel->radius;
tdble latMod = 0;
tdble longMod = 0;
tdble minOptTemp = wheel->Topt - 20;
tdble wheelSpeed = fabs(wheel->spinVel * wheel->radius);
tdble deltaTemperature = wheel->Ttire - Tair;
@ -996,21 +997,18 @@ void SimWheelUpdateTire(tCar *car, int index)
// Ratio modifier for when temp is under minimal optimal
// operating temp (f.e. below 70 C for a 90 deg optimal)
tdble diRatio;
if (wheel->Ttire < wheel->Topt - 20)
{
diRatio = (wheel->Ttire - Tair) / (Tair - (wheel->Ttire - 20)) * 0.125;
}
diRatio = (wheel->Ttire - Tair) / (Tair - minOptTemp) * 0.125;
// Racing tires typically have a roughly 10-20C window
// where they achieve most of their optimal grip.
// When within this "ideal window", grip changes are less extreme.
if (wheel->Ttire < (wheel->Topt - 20))
{
di = ((wheel->Ttire - wheel->Topt - 20) / (wheel->Topt - Tair)) + diRatio;
di = ((wheel->Ttire - minOptTemp) / (minOptTemp - Tair)) + diRatio;
}
else if (wheel->Ttire <= wheel->Topt)
{
di = (wheel->Ttire - wheel->Topt) / (wheel->Topt - (wheel->Topt - 20)) * 0.125;
di = (wheel->Ttire - wheel->Topt) / (wheel->Topt - minOptTemp) * 0.125;
}
else
{