- Update shadow's driver

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

Former-commit-id: c04812f7d855e608107b11d93df75ca5c2cd1be6
Former-commit-id: 92c77b362ab2af286403590e9418cb28ce0e7845
This commit is contained in:
torcs-ng 2019-11-20 00:16:25 +00:00
parent 46bad99265
commit 6ac0053f36
2 changed files with 37 additions and 5 deletions

View file

@ -1,3 +1,19 @@
/***************************************************************************
file : WheelModel.cpp
created : 02 november 2019
copyright : (C) 2006 Tim Foden - (C) 2019 Xavier Bertaux
***************************************************************************/
/***************************************************************************
* *
* 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. *
* *
***************************************************************************/
#include <robottools.h>

View file

@ -1,3 +1,19 @@
/***************************************************************************
file : WheelModel.h
created : 02 november 2019
copyright : (C) 2006 Tim Foden - (C) 2019 Xavier Bertaux
***************************************************************************/
/***************************************************************************
* *
* 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 _WHEEL_MODEL_H_
#define _WHEEL_MODEL_H_
@ -14,15 +30,15 @@ class WheelModel
public:
WheelModel();
~WheelModel();
void setWheel( int wheel );
void config( const tCarElt* car );
void config( void* hCar );
void update( const tCarElt* car, const tSituation* s, const CarModel& cm );
double slipX() const { return _sx; }
double slipY() const { return _sy; }
double slip() const { return hypot(_sx, _sy); }
double slipX() const { return _sx; }
double slipY() const { return _sy; }
double slip() const { return hypot(_sx, _sy); }
double radius() const { return _R; }
@ -42,7 +58,7 @@ private:
double _E; // magic formula constant
double _MU; // tyre mu.
double _R; // nominal wheel & tyre radius.
double _x; // global x position of wheel