Scaled CliftTotal by 2 to give the real Clift total value

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

Former-commit-id: 051119b4a6298bbcaacdd5baad19c09b4858e043
Former-commit-id: 624472f22199f1850b61d081a5f9a8c564db0108
This commit is contained in:
wdbee 2015-11-05 11:49:32 +00:00
parent b161b19d63
commit 0614017ce8

View file

@ -51,7 +51,7 @@ tdble MaximumLiftGivenDrag (tdble drag, tdble A)
tdble Cd = (drag / A) * 2.0f / rho; tdble Cd = (drag / A) * 2.0f / rho;
return Max_SCl_given_Cd (Cd, A); return Max_SCl_given_Cd (Cd, A);
} }
// ... Christos plausibhility check // ... Christos plausibility check
void void
SimAeroConfig(tCar *car) SimAeroConfig(tCar *car)
@ -60,7 +60,7 @@ SimAeroConfig(tCar *car)
tdble Cx, FrntArea; tdble Cx, FrntArea;
// New style parameters: // New style parameters:
// To be able to check the total of clift to be in the defined range // To be able to check the total of clift to be in the defined range
// min <= car->aero.Clift[0] + car->aero.Clift[1] <= max // min <= 2 * (car->aero.Clift[0] + car->aero.Clift[1]) <= max
// with the default procedures of SD we define Clift with // with the default procedures of SD we define Clift with
// the two new style parameters CliftTotal and CliftBias. // the two new style parameters CliftTotal and CliftBias.
// If CliftTotal and/or CliftBias are not defined, the corresponding // If CliftTotal and/or CliftBias are not defined, the corresponding
@ -76,18 +76,18 @@ SimAeroConfig(tCar *car)
car->aero.Clift[1] = GfParmGetNum(hdle, SECT_AERODYNAMICS, PRM_RCL, (char*)NULL, 0.0f); car->aero.Clift[1] = GfParmGetNum(hdle, SECT_AERODYNAMICS, PRM_RCL, (char*)NULL, 0.0f);
// Calculate CliftTotal from old style parameters // Calculate CliftTotal from old style parameters
CliftTotal = car->aero.Clift[0] + car->aero.Clift[1]; CliftTotal = 2 * (car->aero.Clift[0] + car->aero.Clift[1]);
// Use calculated value if no new style definition found // Use calculated value if no new style definition found
CliftTotal = GfParmGetNum(hdle, SECT_AERODYNAMICS, PRM_CL, (char*)NULL, CliftTotal); CliftTotal = GfParmGetNum(hdle, SECT_AERODYNAMICS, PRM_CL, (char*)NULL, CliftTotal);
// Calculate CliftBias from old style parameters // Calculate CliftBias from old style parameters
CliftBias = car->aero.Clift[0] / CliftTotal; CliftBias = 2 * car->aero.Clift[0] / CliftTotal;
// Use calculated value if no new style definition found // Use calculated value if no new style definition found
CliftBias = GfParmGetNum(hdle, SECT_AERODYNAMICS, PRM_CLBIAS, (char*)NULL, CliftBias); CliftBias = GfParmGetNum(hdle, SECT_AERODYNAMICS, PRM_CLBIAS, (char*)NULL, CliftBias);
// Calculate front/rear Clift based on new style parameters // Calculate front/rear Clift based on new style parameters
car->aero.Clift[0] = CliftBias * CliftTotal; car->aero.Clift[0] = 0.5f * CliftBias * CliftTotal;
car->aero.Clift[1] = CliftTotal - car->aero.Clift[0]; car->aero.Clift[1] = 0.5f * (CliftTotal - 2 * car->aero.Clift[0]);
car->aero.CdBody = 0.645f * Cx * FrntArea; car->aero.CdBody = 0.645f * Cx * FrntArea;
car->aero.Cd = car->aero.CdBody; car->aero.Cd = car->aero.CdBody;