Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

GT2005SensorDataProcessor::SensorDataRingBuffer Class Reference

Stores values of SensorData for averaging. More...

Inheritance diagram for GT2005SensorDataProcessor::SensorDataRingBuffer:

Inheritance graph
[legend]
Collaboration diagram for GT2005SensorDataProcessor::SensorDataRingBuffer:

Collaboration graph
[legend]
List of all members.

Public Member Functions

double getAverage (SensorData::sensors sensor, int ticks)
 calculates an average value by summing up last ticks values

void updateAverage (SensorData::sensors sensor, int ticks, double &average)
 calculates an average value by subtracting oldest and adding newest value

long interpolate (SensorData::sensors sensor, unsigned long frame)

Detailed Description

Stores values of SensorData for averaging.

Definition at line 82 of file GT2005SensorDataProcessor.h.


Member Function Documentation

double GT2005SensorDataProcessor::SensorDataRingBuffer::getAverage SensorData::sensors  sensor,
int  ticks
 

calculates an average value by summing up last ticks values

Warning:
not efficient, use updateAverage instead if possible

Definition at line 282 of file GT2005SensorDataProcessor.cpp.

References SensorData::data, RingBuffer< SensorData, gt2005SensorDataProcessorBufferSize >::getEntry(), and RingBuffer< SensorData, gt2005SensorDataProcessorBufferSize >::getNumberOfEntries().

Referenced by GT2005SensorDataProcessor::detectSwitches().

Here is the call graph for this function:

void GT2005SensorDataProcessor::SensorDataRingBuffer::updateAverage SensorData::sensors  sensor,
int  ticks,
double &  average
 

calculates an average value by subtracting oldest and adding newest value

Definition at line 292 of file GT2005SensorDataProcessor.cpp.

References SensorData::data, RingBuffer< SensorData, gt2005SensorDataProcessorBufferSize >::getEntry(), and RingBuffer< SensorData, gt2005SensorDataProcessorBufferSize >::getNumberOfEntries().

Referenced by GT2005SensorDataProcessor::execute(), and GT2005SensorDataProcessor::getCameraVelocity().

Here is the call graph for this function:

long GT2005SensorDataProcessor::SensorDataRingBuffer::interpolate SensorData::sensors  sensor,
unsigned long  frame
 

Definition at line 300 of file GT2005SensorDataProcessor.cpp.

References SensorData::data, SensorData::frameNumber, and RingBuffer< SensorData, gt2005SensorDataProcessorBufferSize >::getEntry().

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Generated on Mon Mar 20 22:15:14 2006 for GT2005 by doxygen 1.3.6