Simplix GP36 basics

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

Former-commit-id: b75949a5dde42e167d898711fd6bc33fea73b034
Former-commit-id: 3ec517a9a1a53c3e7be4beaa1a0c2869848ec86f
This commit is contained in:
wdbee 2011-05-24 20:00:40 +00:00
parent 41cc5cd9d0
commit 2f14a6c142
3 changed files with 28 additions and 15 deletions

View file

@ -2,8 +2,8 @@
<!--
file : default.xml
created : 19 Dec 2008
last modified : 20 Dec 2009
copyright : (C) 2008-2009 Wolf-Dieter Beelitz
last modified : 24 May 2011
copyright : (C) 2008-2011 Wolf-Dieter Beelitz
-->
<!-- This program is free software; you can redistribute it and/or modify -->
<!-- it under the terms of the GNU General Public License as published by -->
@ -18,11 +18,17 @@
<attnum name="fuelper100km" val="105.0"/>
<attnum name="accel out" min="0" max="1" val="1"/>
<attnum name="brake limit" val="-10.0"/>
<attnum name="scale brake" min="0" max="1" val="0.85"/>
<attnum name="scale mu" min="0" max="2" val="1.00"/>
<attnum name="_early shift" min="0.90" max="1.00" val="0.96"/>
<attnum name="tcl slip" min="1.0" max="10.0" val="1.0"/>
<attnum name="tcl factor" min="1.0" max="10.0" val="3.0"/>
<attnum name="drift factor" min="1.0" max="10.0" val="3.0"/>
<attnum name="lookaheadfactor" min="0.0" max="0.5" val="0.10"/>
<attnum name="brake limit" val="-100.0"/>
<attnum name="scale brake" min="0" max="1" val="0.135"/>
<attnum name="scale mu" min="0" max="2" val="0.85"/>
<attnum name="scale steer" min="0.1" max="2.0" val="1.0"/>
<attnum name="tcl slip" min="1.0" max="10.0" val="3.3"/>
</section>
</params>

View file

@ -587,10 +587,10 @@ void TDriver::AdjustDriving(
if (GfParmGetNum(Handle,TDriver::SECT_PRIV,PRV_ACCEL_OUT,0,1) != 0)
UseAccelOut();
/*
/*
if (GfParmGetNum(Handle,TDriver::SECT_PRIV,PRV_ACCEL_FILTER,0,0) != 0)
UseFilterAccel();
*/
*/
oOmegaAhead = Param.Fix.oLength;
oInitialBrakeCoeff = oBrakeCoeff[0];
@ -1336,10 +1336,6 @@ void TDriver::Drive()
oMaxAccel.Measurement // get samples
(CarSpeedLong,CarAccelLong);
*/
// Filters for brake
oBrake = FilterBrake(oBrake);
oBrake = FilterBrakeSpeed(oBrake);
oBrake = FilterABS(oBrake);
if (oBrake == 0.0)
{
// Filters for throttle
@ -1347,7 +1343,15 @@ void TDriver::Drive()
oAccel = FilterDrifting(oAccel);
oAccel = FilterTrack(oAccel);
oAccel = FilterTCL(oAccel);
//oAccel = FilterAccel(oAccel);
if (oUseFilterAccel)
oAccel = FilterAccel(oAccel);
}
else
{
// Filters for brake
oBrake = FilterBrake(oBrake);
oBrake = FilterBrakeSpeed(oBrake);
oBrake = FilterABS(oBrake);
}
// Keep history
@ -3347,6 +3351,8 @@ double TDriver::FilterBrakeSpeed(double Brake)
//--------------------------------------------------------------------------*
double TDriver::FilterAccel(double Accel)
{
if (Accel > oLastAccel + 0.05)
Accel = oLastAccel + 0.05;
return Accel;
}
//==========================================================================*
@ -3401,7 +3407,8 @@ double TDriver::FilterTCL(double Accel)
if (Slip > oTclSlip) // Decrease accel if needed
{
float MinAccel = (float) (0.2 * Accel);
// float MinAccel = (float) (0.2 * Accel);
float MinAccel = (float) (0.05 * Accel);
Accel -= MIN(Accel, (Slip - oTclSlip)/oTclRange);
Accel = MAX(MinAccel,Accel);
}

View file

@ -646,7 +646,7 @@ static int InitFuncPt(int Index, void *Pt)
cInstances[Index-IndexOffset].cRobot->CalcHairpinFoo = &TDriver::CalcHairpin_simplix_Identity;
cInstances[Index-IndexOffset].cRobot->ScaleSide(0.85f,0.85f);
cInstances[Index-IndexOffset].cRobot->SideBorderOuter(0.75f);
//cRobot[Index-IndexOffset]->UseFilterAccel();
cInstances[Index-IndexOffset].cRobot->UseFilterAccel();
}
else if (cRobotType == RTYPE_SIMPLIX_MPA1)
{