Cleanup of code for the new calculation of downforce

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@5594 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: c32b11fe6c37c7e45877ca295144cd47716e6f71
Former-commit-id: acbeb4c5ddf607ea6247de683ea7f29df7390671
This commit is contained in:
wdbee 2013-07-15 16:21:39 +00:00
parent 91d5c41293
commit bf0c5fc1c5
3 changed files with 6 additions and 5 deletions

View file

@ -803,7 +803,7 @@ static int InitFuncPt(int Index, void *Pt)
cInstances[Index-IndexOffset].cRobot->CalcHairpinFoo = &TDriver::CalcHairpin_simplix;
cInstances[Index-IndexOffset].cRobot->ScaleSide(0.95f,0.95f);
cInstances[Index-IndexOffset].cRobot->SideBorderOuter(0.00f);
//cInstances[Index-IndexOffset].cRobot->UseFilterAccel();
cInstances[Index-IndexOffset].cRobot->UseFilterAccel();
}
else if (cRobotType == RTYPE_SIMPLIX_LS1)
{

View file

@ -122,7 +122,7 @@ tdble CliftFromAoA(tWing* wing)
//fprintf(stderr,"a: %g\n",wing->a);
double s = sin(wing->a/180.0*PI);
//fprintf(stderr,"s: %g\n",s);
return (tdble)((s * s * (wing->CliftMax + wing->d) - wing->d) * wing->Kx);
return (tdble)(s * s * (wing->CliftMax + wing->d) - wing->d);
}
else
{
@ -224,7 +224,7 @@ SimWingConfig(tCar *car, int index)
}
else /* if (wing->WingType == 1) */
{
wing->Kz = CliftFromAoA(wing);
wing->Kz = CliftFromAoA(wing) * wing->Kx;
fprintf(stderr,"Kz: %g Kx: %g\n",wing->Kz,wing->Kx);
if (index == 0)
@ -297,7 +297,8 @@ SimWingUpdate(tCar *car, int index, tSituation* s)
else // if (wing->WingType == 1)
{
wing->forces.x = (tdble) (wing->Kx * vt2 * (1.0f + (tdble)car->dammage / 10000.0) * MAX(fabs(sin(aoa - wing->AoAatZRad)), 0.02));
wing->forces.z = (tdble) MIN(0.0,vt2 * CliftFromAoA(wing));
wing->forces.z = (tdble) MIN(0.0,wing->Kx* vt2 * CliftFromAoA(wing));
// fprintf(stderr,"%d fz: %g (%g)\n",index,wing->forces.z,CliftFromAoA(wing));
}
}
else