GT2004SensorDataProcessor::SensorDataRingBuffer Class Reference

Inheritance diagram for GT2004SensorDataProcessor::SensorDataRingBuffer:

RingBuffer< SensorData, gt2004SensorDataProcessorBufferSize > List of all members.

Public Member Functions

double getAverage (SensorData::sensors sensor, int ticks)
void updateAverage (SensorData::sensors sensor, int ticks, double &average)
long interpolate (SensorData::sensors sensor, unsigned long frame)

Detailed Description

Stores values of SensorData for averaging

Definition at line 82 of file GT2004SensorDataProcessor.h.


Member Function Documentation

double GT2004SensorDataProcessor::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 253 of file GT2004SensorDataProcessor.cpp.

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

Referenced by GT2004SensorDataProcessor::detectSwitches().

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

Definition at line 271 of file GT2004SensorDataProcessor.cpp.

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

void GT2004SensorDataProcessor::SensorDataRingBuffer::updateAverage ( SensorData::sensors  sensor,
int  ticks,
double &  average 
)

calculates an average value by subtracting oldest and adding newest value

Definition at line 263 of file GT2004SensorDataProcessor.cpp.

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

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


The documentation for this class was generated from the following files:
Generated on Thu Dec 7 01:36:08 2006 for DT2005.panorama by  doxygen 1.4.7