Main Page   Class Hierarchy   Compound List   Compound Members  

ArInterpolation Class Reference

#include <ArInterpolation.h>

List of all members.

Public Methods

 ArInterpolation (size_t numberOfReadings=100)
 Constructor.

virtual ~ArInterpolation (void)
 Destructor.

bool addReading (ArTime timeOfReading, ArPose position)
 Adds a new reading.

int getPose (ArTime timeStamp, ArPose *position)
 Finds a position. More...

void setNumberOfReadings (size_t numberOfReadings)
 Sets the number of readings this instance holds back in time.

size_t getNumberOfReadings (void)
 Gets the number of readings this instance holds back in time.

void reset (void)
 Empties the interpolated positions.


Detailed Description

This class takes care of storing in readings of position vs time, and then interpolating between them to find where the robot was at a particular point in time. It has two lists, one containing the times, and one containing the positions at those same times (per position), they must be walked through jointly to maintain cohesion. The new entries are at the front of the list, while the old ones are at the back. numberOfReadings and the setNumberOfReadings control the number of entries in the list. If a size is set that is smaller than the current size, then the old ones are chopped off.


Member Function Documentation

int ArInterpolation::getPose ArTime    timeStamp,
ArPose   position
 

Finds a position.

Parameters:
timeStamp  the time we are interested in
position  the pose to set to the given position
Returns:
1 its good interpolation, 0 its predicting, -1 its too far to predict, -2 its too old, -3 there's not enough data to predict


The documentation for this class was generated from the following files:
Generated on Tue Nov 12 17:43:57 2002 for Aria by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001