torcs - 1.2.2

src/libs/robottools/robottools.h File Reference


Detailed Description

Robots Tools.

Author:
Eric Espie
Version:
Id
robottools.h,v 1.6 2003/11/23 20:21:11 torcs Exp

#include <car.h>
#include <track.h>

Include dependency graph for robottools.h:

Include dependency graph

Go to the source code of this file.

Defines

#define RELAXATION2(target, prev, rate)
#define RELAXATION(target, prev, rate)

Functions

tdble RtTrackGetWidth (tTrackSeg *seg, tdble toStart)
 Get the track width at the specified point.

void RtTrackLocal2Global (tTrkLocPos *p, tdble *X, tdble *Y, int flag)
 Convert a Local position (segment, toRight, toStart).

void RtTrackGlobal2Local (tTrackSeg *segment, tdble X, tdble Y, tTrkLocPos *p, int type)
 Convert a Global (segment, X, Y) position into a Local one (segment, toRight, toStart).

tdble RtTrackHeightL (tTrkLocPos *p)
 Returns the absolute height in meters of the road at the Local position p.

tdble RtTrackHeightG (tTrackSeg *seg, tdble X, tdble Y)
 Returns the absolute height in meters of the road at the Global position (segment, X, Y).

void RtTrackSideNormalG (tTrackSeg *seg, tdble X, tdble Y, int side, t3Dd *norm)
 Give the normal vector of the border of the track including the sides.

tdble RtTrackSideTgAngleL (tTrkLocPos *p)
 Used to get the tangent angle for a track position The angle is given in radian.

void RtTrackSurfaceNormalL (tTrkLocPos *p, t3Dd *norm)
 Used to get the normal vector of the road (pointing upward).

int RtDistToPit (struct CarElt *car, tTrack *track, tdble *dL, tdble *dW)
 Get the distance to the pit stop.

tdble RtGetDistFromStart (tCarElt *car)
 Get the distance from the start lane.

tdble RtGetDistFromStart2 (tTrkLocPos *p)
 Get the distance from the start lane.

void RtTelemInit (tdble ymin, tdble ymax)
 Initialization of a telemetry session.

tTrackSegRtTrackGetSeg (tTrkLocPos *p)
 Get the current segment.

void RtTelemNewChannel (const char *name, tdble *var, tdble min, tdble max)
 Create a new telemetry channel.

void RtTelemStartMonitoring (const char *filename)
 Start recording into a file.

void RtTelemStopMonitoring (void)
 Stop recording and close the file.

void RtTelemUpdate (double time)
 Record a new set of values.

void RtTelemShutdown (void)
 Deinstall the telemetry module.


Define Documentation

#define RELAXATION target,
prev,
rate   ) 
 

Value:

do {                                                            \
    target = (prev) + (rate) * ((target) - (prev)) * 0.01;      \
    prev = (target);                                            \
} while (0)

#define RELAXATION2 target,
prev,
rate   ) 
 

Value:

do {                                                            \
    tdble __tmp__;                                              \
    __tmp__ = target;                                           \
    target = (prev) + (rate) * ((target) - (prev)) * 0.01;      \
    prev = __tmp__;                                             \
} while (0)


Function Documentation

tTrackSeg* RtTrackGetSeg tTrkLocPos p  ) 
 

Get the current segment.

Here is the call graph for this function:


Generated at Thu Feb 26 21:53:08 2004 for torcs by doxygen 1.3.3 written by Dimitri van Heesch, © 1997-1999
TORCS © Eric Espié 1999, 2002.