Update simplix Grand-Prix tracks

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

Former-commit-id: 2d848b7de3bacf99b28bcbbe0236212cb18a77e7
Former-commit-id: 6425fd0b7dc967420905c5838bdffe2dd6438c61
This commit is contained in:
wdbee 2009-12-23 22:12:39 +00:00
parent 75cf491846
commit 32fc3ff0c9
9 changed files with 336 additions and 7 deletions

View file

@ -0,0 +1,89 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
file : Corkscrew.xml
created : 01 Dec 2007
last modified : 23 Dec 2009
copyright : (C) 2007-2009 Wolf-Dieter Beelitz
SIMPLIX - CAR1-TRB1
-->
<!-- 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 -->
<!-- the Free Software Foundation; either version 2 of the License, or -->
<!-- (at your option) any later version. -->
<!DOCTYPE params SYSTEM "../../../src/libs/tgf/params.dtd">
<params name="car1-trb1" type="template" mode="mw">
<section name="Front Wing">
<attnum name="angle" unit="deg" min="0" max="12" val="12"/>
</section>
<section name="Rear Wing">
<attnum name="angle" unit="deg" min="0" max="18" val="18"/>
</section>
<section name="Rear Differential">
<attstr name="type" in="SPOOL,FREE,LIMITED SLIP" val="LIMITED SLIP"/>
<attnum name="ratio" min="0" max="10" val="4.25"/>
</section>
<section name="Brake System">
<attnum name="front-rear brake repartition" min="0.3" max="0.7" val="0.6"/>
<attnum name="max pressure" unit="kPa" min="100" max="150000" val="40000"/>
</section>
<section name="Front Anti-Roll Bar">
<attnum name="spring" unit="lbs/in" min="0" max="5000" val="500"/>
<attnum name="suspension course" unit="m" min="0" max="0.2" val="0.2"/>
<attnum name="bellcrank" min="1" max="5" val="2.5"/>
</section>
<section name="Rear Anti-Roll Bar">
<attnum name="spring" unit="lbs/in" min="0" max="5000" val="0"/>
<attnum name="suspension course" unit="m" min="0" max="0.2" val="0.2"/>
<attnum name="bellcrank" min="1" max="5" val="2.5"/>
</section>
<section name="Front Right Suspension">
<attnum name="spring" unit="lbs/in" min="0" max="10000" val="5500"/>
<attnum name="suspension course" unit="m" min="0" max="0.2" val="0.12"/>
<attnum name="bellcrank" min="0.1" max="5" val="0.9"/>
<attnum name="packers" unit="mm" min="0" max="10" val="0"/>
<attnum name="slow bump" unit="lbs/in/s" min="0" max="1000" val="500"/>
<attnum name="slow rebound" unit="lbs/in/s" min="0" max="1000" val="300"/>
<attnum name="fast bump" unit="lbs/in/s" min="0" max="1000" val="60"/>
<attnum name="fast rebound" unit="lbs/in/s" min="0" max="1000" val="60"/>
</section>
<section name="Front Left Suspension">
<attnum name="spring" unit="lbs/in" min="0" max="10000" val="5500"/>
<attnum name="suspension course" unit="m" min="0" max="0.2" val="0.12"/>
<attnum name="bellcrank" min="0.1" max="5" val="0.9"/>
<attnum name="packers" unit="mm" min="0" max="10" val="0"/>
<attnum name="slow bump" unit="lbs/in/s" min="0" max="1000" val="500"/>
<attnum name="slow rebound" unit="lbs/in/s" min="0" max="1000" val="300"/>
<attnum name="fast bump" unit="lbs/in/s" min="0" max="1000" val="60"/>
<attnum name="fast rebound" unit="lbs/in/s" min="0" max="1000" val="60"/>
</section>
<section name="Rear Right Suspension">
<attnum name="spring" unit="lbs/in" min="0" max="10000" val="3500"/>
<attnum name="suspension course" unit="m" min="0" max="0.2" val="0.15"/>
<attnum name="bellcrank" min="0.1" max="5" val="0.9"/>
<attnum name="packers" unit="mm" min="0" max="50" val="0"/>
<attnum name="slow bump" unit="lbs/in/s" min="0" max="1000" val="400"/>
<attnum name="slow rebound" unit="lbs/in/s" min="0" max="1000" val="500"/>
<attnum name="fast bump" unit="lbs/in/s" min="0" max="1000" val="60"/>
<attnum name="fast rebound" unit="lbs/in/s" min="0" max="1000" val="60"/>
</section>
<section name="Rear Left Suspension">
<attnum name="spring" unit="lbs/in" min="0" max="10000" val="3500"/>
<attnum name="suspension course" unit="m" min="0" max="0.2" val="0.15"/>
<attnum name="bellcrank" min="0.1" max="5" val="0.9"/>
<attnum name="packers" unit="mm" min="0" max="50" val="0"/>
<attnum name="slow bump" unit="lbs/in/s" min="0" max="1000" val="400"/>
<attnum name="slow rebound" unit="lbs/in/s" min="0" max="1000" val="500"/>
<attnum name="fast bump" unit="lbs/in/s" min="0" max="1000" val="60"/>
<attnum name="fast rebound" unit="lbs/in/s" min="0" max="1000" val="60"/>
</section>
<section name="simplix private">
<attnum name="crv" val="0"/>
<attnum name="lookaheadfactor" min="0.0" max="0.5" val="0.15"/>
<attnum name="avoid width" min="0.0" max="3.0" val="0.25"/>
<attnum name="scale brake" min="0" max="1" val="0.75"/>
<attnum name="scale bump" min="0" max="1" val="0.1"/>
<attnum name="scale bump outer" min="0" max="2" val="0.3"/>
<attnum name="scale mu" min="0" max="2" val="0.80"/>
</section>
</params>

View file

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
file : aalborg.xml
created : 01 Dec 2007
last modified : 23 Dec 2009
copyright : (C) 2007-2009 Wolf-Dieter Beelitz
SIMPLIX - CAR1-TRB1
-->
<!-- 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 -->
<!-- the Free Software Foundation; either version 2 of the License, or -->
<!-- (at your option) any later version. -->
<!DOCTYPE params SYSTEM "../../../src/libs/tgf/params.dtd">
<params name="car1-trb1" type="template" mode="mw">
<section name="Front Wing">
<attnum name="angle" unit="deg" min="0" max="12" val="12"/>
</section>
<section name="Rear Wing">
<attnum name="angle" unit="deg" min="0" max="18" val="18"/>
</section>
<section name="Rear Differential">
<attstr name="type" in="SPOOL,FREE,LIMITED SLIP" val="LIMITED SLIP"/>
<attnum name="ratio" min="0" max="10" val="4.0"/>
</section>
<section name="Brake System">
<attnum name="front-rear brake repartition" min="0.3" max="0.7" val="0.62"/>
<attnum name="max pressure" unit="kPa" min="100" max="150000" val="40000"/>
</section>
<section name="Front Anti-Roll Bar">
<attnum name="spring" unit="lbs/in" min="0" max="5000" val="500"/>
</section>
<section name="Rear Anti-Roll Bar">
<attnum name="spring" unit="lbs/in" min="0" max="5000" val="0"/>
</section>
<section name="Front Right Suspension">
<attnum name="spring" unit="lbs/in" min="0" max="10000" val="4000"/>
<attnum name="bellcrank" min="0.1" max="5" val="0.9"/>
</section>
<section name="Front Left Suspension">
<attnum name="spring" unit="lbs/in" min="0" max="10000" val="4000"/>
<attnum name="bellcrank" min="0.1" max="5" val="0.9"/>
</section>
<section name="Rear Right Suspension">
<attnum name="spring" unit="lbs/in" min="0" max="10000" val="3700"/>
<attnum name="bellcrank" min="0.1" max="5" val="0.9"/>
</section>
<section name="Rear Left Suspension">
<attnum name="spring" unit="lbs/in" min="0" max="10000" val="3700"/>
<attnum name="bellcrank" min="0.1" max="5" val="0.9"/>
</section>
<section name="simplix private">
<attnum name="fuelper100km" min="1.0" max="100.0" val="75.0"/>
<attnum name="lookaheadfactor" min="0.0" max="0.5" val="0.03"/>
<attnum name="avoid width" min="0.0" max="3.0" val="0.25"/>
<attnum name="scale avoid" min="1.0" max="20.0" val="10.0"/>
<attnum name="scale brake" min="0" max="1" val="0.78"/>
<attnum name="scale bump" min="0" max="1" val="0.01"/>
<attnum name="scale bump outer" min="0" max="2" val="0.01"/>
<attnum name="scale mu" min="0" max="2" val="1.09"/>
<attnum name="side mu" min="0" max="2" val="0.95"/>
</section>
</params>

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
file : g-track-2.xml
created : 01 Dec 2007
last modified : 23 Dec 2009
copyright : (C) 2007-2009 Wolf-Dieter Beelitz
SIMPLIX - CAR1-TRB1
-->
<!-- 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 -->
<!-- the Free Software Foundation; either version 2 of the License, or -->
<!-- (at your option) any later version. -->
<!DOCTYPE params SYSTEM "../../../src/libs/tgf/params.dtd">
<params name="car1-trb1" type="template" mode="mw">
<section name="Rear Wing">
<attnum name="angle" unit="deg" min="0" max="18" val="18"/>
</section>
<section name="Rear Anti-Roll Bar">
<attnum name="spring" unit="lbs/in" val="500"/>
</section>
<section name="simplix private">
<attnum name="scale bump" val="0.01"/>
<attnum name="scale bump outer" val="0.01"/>
<attnum name="scale mu" val="0.88"/>
<attnum name="side mu" val="0.90"/>
</section>
</params>

View file

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
file : migrants.xml
created : 01 Dec 2007
last modified : 23 Dec 2009
copyright : (C) 2007-2009 Wolf-Dieter Beelitz
SIMPLIX - CAR1-TRB1
-->
<!-- 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 -->
<!-- the Free Software Foundation; either version 2 of the License, or -->
<!-- (at your option) any later version. -->
<!DOCTYPE params SYSTEM "../../../src/libs/tgf/params.dtd">
<params name="car1-trb1" type="template" mode="mw">
<section name="Brake System">
<attnum name="front-rear brake repartition" min="0.3" max="0.7" val="0.6"/>
</section>
<section name="Rear Anti-Roll Bar">
<attnum name="spring" unit="lbs/in" min="0" max="5000" val="500"/>
</section>
<section name="simplix private">
<attnum name="scale brake" val="0.78"/>
<attnum name="scale bump" val="0.01"/>
<attnum name="scale bump outer" val="0.01"/>
<attnum name="scale mu" val="1.0"/>
<attnum name="side mu" val="0.90"/>
</section>
</params>

View file

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
file : ruudskogen.xml
created : 01 Dec 2007
last modified : 23 Dec 2009
copyright : (C) 2007-2009 Wolf-Dieter Beelitz
SIMPLIX - CAR1-TRB1
-->
<!-- 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 -->
<!-- the Free Software Foundation; either version 2 of the License, or -->
<!-- (at your option) any later version. -->
<!DOCTYPE params SYSTEM "../../../src/libs/tgf/params.dtd">
<params name="car1-trb1" type="template" mode="mw">
<section name="Front Wing">
<attnum name="angle" unit="deg" min="0" max="12" val="12"/>
</section>
<section name="Rear Wing">
<attnum name="angle" unit="deg" min="0" max="18" val="18"/>
</section>
<section name="Rear Differential">
<attnum name="ratio" min="0" max="10" val="3.65"/>
</section>
<section name="Brake System">
<attnum name="front-rear brake repartition" min="0.3" max="0.7" val="0.6"/>
</section>
<section name="Rear Anti-Roll Bar">
<attnum name="spring" unit="lbs/in" min="0" max="5000" val="500"/>
</section>
<section name="simplix private">
<attnum name="scale brake" min="0" max="1" val="0.8"/>
<attnum name="scale bump" min="0" max="1" val="0.3"/>
<attnum name="scale bump outer" min="0" max="2" val="0.4"/>
<attnum name="scale mu" min="0" max="2" val="0.96"/>
</section>
</params>

View file

@ -0,0 +1,59 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
file : wheel-2.xml
created : 01 Dec 2007
last modified : 23 Dec 2009
copyright : (C) 2007-2009 Wolf-Dieter Beelitz
SIMPLIX - CAR1-TRB1
-->
<!-- 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 -->
<!-- the Free Software Foundation; either version 2 of the License, or -->
<!-- (at your option) any later version. -->
<!DOCTYPE params SYSTEM "../../../src/libs/tgf/params.dtd">
<params name="car1-trb1" type="template" mode="mw">
<section name="Front Wing">
<attnum name="angle" unit="deg" min="0" max="12" val="12"/>
</section>
<section name="Rear Wing">
<attnum name="angle" unit="deg" min="0" max="18" val="14"/>
</section>
<section name="Rear Differential">
<attnum name="ratio" min="0" max="10" val="3.85"/>
</section>
<section name="Brake System">
<attnum name="front-rear brake repartition" min="0.3" max="0.7" val="0.57"/>
<attnum name="max pressure" unit="kPa" min="100" max="150000" val="40000"/>
</section>
<section name="Front Anti-Roll Bar">
<attnum name="spring" unit="lbs/in" min="0" max="5000" val="500"/>
</section>
<section name="Rear Anti-Roll Bar">
<attnum name="spring" unit="lbs/in" min="0" max="5000" val="0"/>
</section>
<section name="Front Right Suspension">
<attnum name="spring" unit="lbs/in" min="0" max="10000" val="4000"/>
<attnum name="bellcrank" min="0.1" max="5" val="0.9"/>
</section>
<section name="Front Left Suspension">
<attnum name="spring" unit="lbs/in" min="0" max="10000" val="4000"/>
<attnum name="bellcrank" min="0.1" max="5" val="0.9"/>
</section>
<section name="Rear Right Suspension">
<attnum name="spring" unit="lbs/in" min="0" max="10000" val="4000"/>
<attnum name="bellcrank" min="0.1" max="5" val="0.9"/>
</section>
<section name="Rear Left Suspension">
<attnum name="spring" unit="lbs/in" min="0" max="10000" val="4000"/>
<attnum name="bellcrank" min="0.1" max="5" val="0.9"/>
</section>
<section name="simplix private">
<attnum name="crv" val="0"/>
<attnum name="lookaheadfactor" min="0.0" max="0.5" val="0.15"/>
<attnum name="scale brake" min="0" max="1" val="0.77"/>
<attnum name="scale bump" min="0" max="1" val="0.15"/>
<attnum name="scale bump outer" min="0" max="2" val="0.2"/>
<attnum name="scale mu" min="0" max="2" val="0.93"/>
</section>
</params>

View file

@ -80,7 +80,7 @@
// Statics
//--------------------------------------------------------------------------*
int TDriver::NBBOTS = MAX_NBBOTS; // Nbr of drivers/robots
double TDriver::CurrSimTime = 0; // Current simulation time
//double TDriver::CurrSimTime = 0; // Current simulation time
char const* TDriver::MyBotName = "simplix"; // Name of this bot
char const* TDriver::ROBOT_DIR = "drivers/simplix"; // Sub path to dll
char const* TDriver::SECT_PRIV = "simplix private"; // Private section
@ -748,7 +748,7 @@ void TDriver::InitTrack
oSideScaleBrake =
GfParmGetNum(Handle,TDriver::SECT_PRIV,PRV_SIDE_BRAKE,NULL,oSideScaleBrake);
GfOut("#Side Scale Brake%g\n",oSideScaleMu);
GfOut("#Side Scale Brake%g\n",oSideScaleBrake);
oAvoidScale =
GfParmGetNum(Handle,TDriver::SECT_PRIV,PRV_AVOID_SCALE,0,oAvoidScale);
@ -1052,6 +1052,19 @@ void TDriver::NewRace(PtCarElt Car, PSituation Situation)
}
//==========================================================================*
//==========================================================================*
// Drive
//--------------------------------------------------------------------------*
void TDriver::DriveLast()
{
oCar->ctrl.accelCmd = (float) oAccel;
oCar->ctrl.brakeCmd = (float) oBrake;
oCar->ctrl.clutchCmd = (float) oClutch;
oCar->ctrl.gear = oGear;
oCar->ctrl.steer = (float) oSteer;
}
//==========================================================================*
//==========================================================================*
// Drive
//--------------------------------------------------------------------------*

View file

@ -100,6 +100,7 @@ class TDriver
void NewRace // Start new Race
(PtCarElt Car, PSituation Situation);
void Drive(); // Drive while racing
void DriveLast(); // Reuse drive commands
int PitCmd(); // Handle pitstop
void EndRace(); // Stop race
void Shutdown(); // Cleanup
@ -387,7 +388,8 @@ private:
float oSideBorderOuter;
static int NBBOTS; // Nbr of cars
static double CurrSimTime; // Current simulation time
// static double CurrSimTime; // Current simulation time
double CurrSimTime; // Current simulation time
static char const* MyBotName; // Name of this bot
static char const* ROBOT_DIR; // Sub path to dll
static char const* SECT_PRIV; // Private section

View file

@ -8,7 +8,7 @@
//
// File : unitmain.cpp
// Created : 2008.01.27
// Last changed : 2009.02.26
// Last changed : 2009.12.22
// Copyright : © 2007-2009 Wolf-Dieter Beelitz
// eMail : wdb@wdbee.de
// Version : 2.00.000
@ -569,6 +569,7 @@ static void NewRace(int Index, tCarElt* Car, tSituation *S)
cUnusedCount[Index-IndexOffset] = 0;
cRobot[Index-IndexOffset]->NewRace(Car, S);
cRobot[Index-IndexOffset]->CurrSimTime = -10.0;
}
//==========================================================================*
@ -587,8 +588,10 @@ static void NewRace(int Index, tCarElt* Car, tSituation *S)
static void Drive(int Index, tCarElt* Car, tSituation *S)
{
//GfOut("#>>> TDriver::Drive\n");
//if (cRobot[Index-IndexOffset]->CurrSimTime != S->currentTime)
if (cRobot[Index-IndexOffset]->CurrSimTime < S->currentTime)
// if (cRobot[Index-IndexOffset]->CurrSimTime + 0.03 < S->currentTime)
{
//GfOut("#Drive\n");
double StartTimeStamp = RtTimeStamp();
cRobot[Index-IndexOffset]->CurrSimTime = // Update current time
@ -615,8 +618,12 @@ static void Drive(int Index, tCarElt* Car, tSituation *S)
cTickCount[Index-IndexOffset]++;
cTicks[Index-IndexOffset] += Duration;
}
// else
// cUnusedCount++;
else
{
//GfOut("#DriveLast\n");
cUnusedCount[Index-IndexOffset]++;
cRobot[Index-IndexOffset]->DriveLast(); // Use last drive commands
}
//GfOut("#<<< TDriver::Drive\n");
}
//==========================================================================*