- update dandroid Strategy.cpp
- update dandroid_mpa12 setup git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9126 30fe4595-0a0c-4342-8851-515496e4dcbd
This commit is contained in:
parent
77068215aa
commit
f3a5a5a564
|
@ -21,6 +21,8 @@
|
|||
<attnum name="brakeforcemin" val="0.25"/>
|
||||
<attnum name="bumpspeedfactor" val="3.0"/>
|
||||
<attnum name="fuelpermeter" val="0.001"/>
|
||||
<attnum name="muscale" val="0.90"/>
|
||||
<attnum name="brakescale" val="1.90"/>
|
||||
<attnum name="fuelweightfactor" val="1.0"/>
|
||||
<attnum name="pitdamage" val="5000"/>
|
||||
<attnum name="pitentrymargin" val="200.0"/>
|
||||
|
|
|
@ -0,0 +1,99 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
file : mpa12-murasamar.xml
|
||||
created : Thu Aug 22 18:46:37 CET 2023
|
||||
copyright : (C) 2023 by Xavier Bertaux
|
||||
email : bertauxx@gmail.com
|
||||
version : $Id$
|
||||
-->
|
||||
|
||||
<!-- 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="mpa12-murasama" type="template">
|
||||
<section name="Front Wing">
|
||||
<attnum name="angle" unit="deg" val="4"/>
|
||||
</section>
|
||||
|
||||
<section name="Rear Wing">
|
||||
<attnum name="angle" unit="deg" val="2"/>
|
||||
</section>
|
||||
|
||||
<section name="Gearbox">
|
||||
<section name="gears">
|
||||
<section name="r">
|
||||
<attnum name="ratio" min="-3" max="0" val="-2"/>
|
||||
</section>
|
||||
|
||||
<section name="1">
|
||||
<attnum name="ratio" min="0" max="5" val="2.3"/>
|
||||
</section>
|
||||
|
||||
<section name="2">
|
||||
<attnum name="ratio" min="0" max="5" val="1.52"/>
|
||||
</section>
|
||||
|
||||
<section name="3">
|
||||
<attnum name="ratio" min="0" max="5" val="1.186"/>
|
||||
</section>
|
||||
|
||||
<section name="4">
|
||||
<attnum name="ratio" min="0" max="5" val="0.955"/>
|
||||
</section>
|
||||
|
||||
<section name="5">
|
||||
<attnum name="ratio" min="0" max="5" val="0.799"/>
|
||||
</section>
|
||||
|
||||
<section name="6">
|
||||
<attnum name="ratio" min="0" max="5" val="0.755"/>
|
||||
</section>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
<section name="Tires Set">
|
||||
<attnum name="compound set" min="1" max="5" val="1" />
|
||||
</section>
|
||||
|
||||
<section name="private">
|
||||
<attnum name="brakeforcefactor" val="1.0"/>
|
||||
<attnum name="brakeforcemin" val="0.25"/>
|
||||
<attnum name="bumpspeedfactor" val="3.0"/>
|
||||
<attnum name="fuelpermeter" val="0.001"/>
|
||||
<attnum name="muscale" val="1.05"/>
|
||||
<attnum name="brakescale" val="1.90"/>
|
||||
<attnum name="fuelweightfactor" val="1.0"/>
|
||||
<attnum name="pitdamage" val="5000"/>
|
||||
<attnum name="pitentrymargin" val="200.0"/>
|
||||
<attnum name="pitentryspeed" val="25.0"/>
|
||||
<attnum name="pitexitspeed" val="25.0"/>
|
||||
<attnum name="targetfactor" val="0.3"/>
|
||||
<attnum name="targetwalldist" val="0.0"/>
|
||||
<attnum name="tractioncontrol" val="1"/>
|
||||
<!-- Race line ClothoidPath -->
|
||||
<attnum name="maxleft" val="10.0"/>
|
||||
<attnum name="maxright" val="10.0"/>
|
||||
<attnum name="margininside" val="1.0"/>
|
||||
<attnum name="marginoutside" val="1.5"/>
|
||||
<attnum name="clothoidfactor" val="1.005"/>
|
||||
<attnum name="seglen" val="3.0"/>
|
||||
</section>
|
||||
</params>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -1,118 +1,119 @@
|
|||
/***************************************************************************
|
||||
|
||||
file : pit.h
|
||||
created : Thu Aug 31 01:21:49 UTC 2006
|
||||
copyright : (C) 2006 Daniel Schellhammer
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* 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. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef _PIT_H_
|
||||
#define _PIT_H_
|
||||
|
||||
#include "torcs_or_sd.h"
|
||||
#include "globaldefinitions.h"
|
||||
|
||||
#ifdef DANDROID_TORCS
|
||||
#include <track.h>
|
||||
#include <car.h>
|
||||
#include <raceman.h>
|
||||
#include <robottools.h>
|
||||
#endif
|
||||
|
||||
#include "spline.h"
|
||||
|
||||
#define NPOINTS 7
|
||||
#define DTPOINTS 4 // drive through
|
||||
|
||||
// The "DANDROID" logger instance.
|
||||
extern GfLogger* PLogDANDROID;
|
||||
#define LogDANDROID (*PLogDANDROID)
|
||||
|
||||
class Pit
|
||||
{
|
||||
public:
|
||||
Pit();
|
||||
~Pit();
|
||||
void init(PTrack t, PSituation s, PtCarElt c, int pitdamage, double pitentrymargin);
|
||||
void setPitstop(bool pitstop);
|
||||
bool getPitstop() { return pitstop; }
|
||||
void setInPit(bool inpitl) { inpitlane = inpitl; }
|
||||
bool getInPit() { return inpitlane; }
|
||||
double getPitOffset(double fromstart);
|
||||
bool isBetween(double fromstart);
|
||||
bool isPitlimit(double fromstart);
|
||||
bool pitForPenalty();
|
||||
double getPitEntry() { return pitentry; }
|
||||
double getLimitEntry() { return limitentry; }
|
||||
double getLimitExit() { return limitexit; }
|
||||
double getNPitStart() { return p[1].x; }
|
||||
double getNPitLoc() { return p[3].x; }
|
||||
double getNPitEnd() { return p[5].x; }
|
||||
double toSplineCoord(double x);
|
||||
void update(double fromstart);
|
||||
int getRepair();
|
||||
int getCompound();
|
||||
double getFuel();
|
||||
double getSpeedlimit();
|
||||
double getSpeedlimit(double fromstart);
|
||||
double getDist();
|
||||
double getSideDist();
|
||||
double tyreConditionFront();
|
||||
double tyreConditionRear();
|
||||
double tyreCondition();
|
||||
double tyreTreadDepthFront();
|
||||
double tyreTreadDepthRear();
|
||||
double tyreTreadDepth();
|
||||
double avgWearPerMeter() { return avgwearpermeter; }
|
||||
void setTYC(bool tyc) { HASTYC = tyc; }
|
||||
void setCPD(bool c) { HASCPD = c; }
|
||||
void pitCommand();
|
||||
public:
|
||||
PTrack track;
|
||||
PtCarElt car;
|
||||
PtCarElt teamcar;
|
||||
tTrackOwnPit* mypit; /* pointer to my pit */
|
||||
tTrackPitInfo* pitinfo; /* general pit info */
|
||||
SplinePoint p[NPOINTS]; /* spline points */
|
||||
Spline spline; /* spline */
|
||||
SplinePoint p2[DTPOINTS];
|
||||
Spline spline2;
|
||||
int penalty;
|
||||
bool pitstop; /* pitstop planned */
|
||||
bool inpitlane; /* we are still in the pit lane */
|
||||
double mFromStart;
|
||||
double pitentry; /* distance to start line of the pit entry */
|
||||
double pitexit; /* distance to the start line of the pit exit */
|
||||
double limitentry; /* distance to start line of the pit entry */
|
||||
double limitexit; /* distance to the start line of the pit exit */
|
||||
double speedlimit; /* pit speed limit */
|
||||
bool fuelchecked; /* fuel statistics updated */
|
||||
double lastfuel; /* the fuel available when we cross the start lane */
|
||||
double lastpitfuel; /* amount refueled, special case when we refuel */
|
||||
double maxfuelperlap; /* the maximum amount of fuel we needed for a lap */
|
||||
double totalfuel; /* the total amount of fuel we needed for the race */
|
||||
int fuellapscounted; /* the total laps we counted, maybe we miss a lap */
|
||||
double avgfuelperlap; /* the average amount of fuel we needed for a lap */
|
||||
double avgwearpermeter; /* the average amount wear tire by meter */
|
||||
double maxwearperlap; /* the maximum amount of wear we needed for a lap */
|
||||
int PIT_DAMAGE;
|
||||
int MAX_DAMAGE;
|
||||
int MAX_DAMAGE_DIST;
|
||||
double ENTRY_MARGIN;
|
||||
double SPEED_LIMIT_MARGIN;
|
||||
double MIN_WEAR;
|
||||
bool HASTYC;
|
||||
bool HASCPD;
|
||||
int RAIN;
|
||||
};
|
||||
|
||||
#endif // _PIT_H_
|
||||
/***************************************************************************
|
||||
|
||||
file : pit.h
|
||||
created : Thu Aug 31 01:21:49 UTC 2006
|
||||
copyright : (C) 2006 Daniel Schellhammer
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* 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. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef _PIT_H_
|
||||
#define _PIT_H_
|
||||
|
||||
#include "torcs_or_sd.h"
|
||||
#include "globaldefinitions.h"
|
||||
|
||||
#ifdef DANDROID_TORCS
|
||||
#include <track.h>
|
||||
#include <car.h>
|
||||
#include <raceman.h>
|
||||
#include <robottools.h>
|
||||
#endif
|
||||
|
||||
#include "spline.h"
|
||||
|
||||
#define NPOINTS 7
|
||||
#define DTPOINTS 4 // drive through
|
||||
|
||||
// The "DANDROID" logger instance.
|
||||
extern GfLogger* PLogDANDROID;
|
||||
#define LogDANDROID (*PLogDANDROID)
|
||||
|
||||
class Pit
|
||||
{
|
||||
public:
|
||||
Pit();
|
||||
~Pit();
|
||||
void init(PTrack t, PSituation s, PtCarElt c, int pitdamage, double pitentrymargin);
|
||||
void setPitstop(bool pitstop);
|
||||
bool getPitstop() { return pitstop; }
|
||||
void setInPit(bool inpitl) { inpitlane = inpitl; }
|
||||
bool getInPit() { return inpitlane; }
|
||||
double getPitOffset(double fromstart);
|
||||
bool isBetween(double fromstart);
|
||||
bool isPitlimit(double fromstart);
|
||||
bool pitForPenalty();
|
||||
double getPitEntry() { return pitentry; }
|
||||
double getLimitEntry() { return limitentry; }
|
||||
double getLimitExit() { return limitexit; }
|
||||
double getNPitStart() { return p[1].x; }
|
||||
double getNPitLoc() { return p[3].x; }
|
||||
double getNPitEnd() { return p[5].x; }
|
||||
double toSplineCoord(double x);
|
||||
void update(double fromstart);
|
||||
int getRepair();
|
||||
int getCompound();
|
||||
double getFuel();
|
||||
double getSpeedlimit();
|
||||
double getSpeedlimit(double fromstart);
|
||||
double getDist();
|
||||
double getSideDist();
|
||||
double tyreConditionFront();
|
||||
double tyreConditionRear();
|
||||
double tyreCondition();
|
||||
double tyreTreadDepthFront();
|
||||
double tyreTreadDepthRear();
|
||||
double tyreTreadDepth();
|
||||
double avgWearPerLap() { return avgwearperlap; }
|
||||
void setTYC(bool tyc) { HASTYC = tyc; }
|
||||
void setCPD(bool c) { HASCPD = c; }
|
||||
void pitCommand();
|
||||
public:
|
||||
PTrack track;
|
||||
PtCarElt car;
|
||||
PtCarElt teamcar;
|
||||
tTrackOwnPit* mypit; /* pointer to my pit */
|
||||
tTrackPitInfo* pitinfo; /* general pit info */
|
||||
SplinePoint p[NPOINTS]; /* spline points */
|
||||
Spline spline; /* spline */
|
||||
SplinePoint p2[DTPOINTS];
|
||||
Spline spline2;
|
||||
int penalty;
|
||||
bool pitstop; /* pitstop planned */
|
||||
bool inpitlane; /* we are still in the pit lane */
|
||||
double mFromStart;
|
||||
double pitentry; /* distance to start line of the pit entry */
|
||||
double pitexit; /* distance to the start line of the pit exit */
|
||||
double limitentry; /* distance to start line of the pit entry */
|
||||
double limitexit; /* distance to the start line of the pit exit */
|
||||
double speedlimit; /* pit speed limit */
|
||||
bool fuelchecked; /* fuel statistics updated */
|
||||
double lastfuel; /* the fuel available when we cross the start lane */
|
||||
double lastpitfuel; /* amount refueled, special case when we refuel */
|
||||
double maxfuelperlap; /* the maximum amount of fuel we needed for a lap */
|
||||
double totalfuel; /* the total amount of fuel we needed for the race */
|
||||
int fuellapscounted; /* the total laps we counted, maybe we miss a lap */
|
||||
double avgfuelperlap; /* the average amount of fuel we needed for a lap */
|
||||
double avgwearperlap; /* the average amount wear tire by meter */
|
||||
double lastwearperlap;
|
||||
double maxwearperlap; /* the maximum amount of wear we needed for a lap */
|
||||
int PIT_DAMAGE;
|
||||
int MAX_DAMAGE;
|
||||
int MAX_DAMAGE_DIST;
|
||||
double ENTRY_MARGIN;
|
||||
double SPEED_LIMIT_MARGIN;
|
||||
double MIN_WEAR;
|
||||
bool HASTYC;
|
||||
bool HASCPD;
|
||||
int RAIN;
|
||||
};
|
||||
|
||||
#endif // _PIT_H_
|
||||
|
|
Loading…
Reference in New Issue