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

# GT2005SelfLocatorSample Class Reference

The class represents a sample. More...

`#include <GT2005SelfLocatorSample.h>`

Inheritance diagram for GT2005SelfLocatorSample:

[legend]
Collaboration diagram for GT2005SelfLocatorSample:

[legend]
List of all members.

## Public Types
enum | { UNINITIALIZED_PROBABILITY = 2 }
enum | PerceptType { xFieldLine, yFieldLine, border, flag, goal, lineCrossing, numberOfPerceptTypes }
## Public Member Functions
| GT2005SelfLocatorSample ()
| Constructor.
| GT2005SelfLocatorSample (const Pose2D &pose)
| Constructor.
double | getProbability () const
void | reset ()
void | updateProbability (const double *average, const GT2005SelfLocatorParameters &parameters)
void | setPerceptProbability (GT2005SelfLocatorSample::PerceptType type, double value, const GT2005SelfLocatorParameters &parameters)
| sets the probability for a percept.
bool | isValid () const
void | scaleProbabilities (double factor)
## Public Attributes
Pose2D | camera
| Temporary representing the pose of the camera.
double | perceptProbabilities [numberOfPerceptTypes]
| a probability for each percept-type recognized
long | perceptTimestamps [numberOfPerceptTypes]
GT2005SelfLocatorSample * | next
| The next sample in the cell cube.
bool | isUsingOdometry
| Whether this sample receives odometry updates or not.

## Detailed Description

The class represents a sample.

Definition at line 27 of file GT2005SelfLocatorSample.h.

## Member Enumeration Documentation

anonymous enum

  | Enumeration values:
  UNINITIALIZED_PROBABILITY |
Definition at line 31 of file GT2005SelfLocatorSample.h.

enum GT2005SelfLocatorSample::PerceptType

  | Enumeration values:
  xFieldLine |
  yFieldLine |
  border |
  flag |
  goal |
  lineCrossing |
  numberOfPerceptTypes | the number of percept types
Definition at line 37 of file GT2005SelfLocatorSample.h.

## Constructor & Destructor Documentation

GT2005SelfLocatorSample::GT2005SelfLocatorSample | ( |  | ) |

| Constructor. Definition at line 13 of file GT2005SelfLocatorSample.cpp. References reset().

Here is the call graph for this function:

GT2005SelfLocatorSample::GT2005SelfLocatorSample | ( | const Pose2D & | pose | ) |

  | Constructor. Parameters:
  pose | The pose of the sample.
Definition at line 18 of file GT2005SelfLocatorSample.cpp. References reset().

Here is the call graph for this function:

## Member Function Documentation

double GT2005SelfLocatorSample::getProbability | ( |  | ) | const`[inline]`

| Definition at line 65 of file GT2005SelfLocatorSample.h. Referenced by GT2005SelfLocator::calcPoseFromSubCube(), and GT2005SelfLocator::resample().

void GT2005SelfLocatorSample::reset | ( |  | ) |

| Definition at line 24 of file GT2005SelfLocatorSample.cpp. References SystemCall::getCurrentSystemTime(), isUsingOdometry, numberOfPerceptTypes, perceptProbabilities, perceptTimestamps, and UNINITIALIZED_PROBABILITY. Referenced by GT2005SelfLocatorSample().

Here is the call graph for this function:

void GT2005SelfLocatorSample::updateProbability | ( | const double * | average,
|  | const GT2005SelfLocatorParameters & | parameters
| ) |

| Definition at line 41 of file GT2005SelfLocatorSample.cpp. References max, numberOfPerceptTypes, and perceptProbabilities.

void GT2005SelfLocatorSample::setPerceptProbability | ( | GT2005SelfLocatorSample::PerceptType | type,
|  | double | value,
|  | const GT2005SelfLocatorParameters & | parameters
| ) |

  | sets the probability for a percept. replaces setProbability in GT04SL limits change of probability to +paramProbUpLimit and -paramProbDownLimit differs from gt code by strange part dependent on goal type Parameters:
  type | of the percept the probability is updated for
Returns: value the probability for the percept Definition at line 68 of file GT2005SelfLocatorSample.cpp. References flag, SystemCall::getCurrentSystemTime(), numberOfPerceptTypes, perceptProbabilities, and perceptTimestamps. Referenced by GT2005SelfLocator::updateByCenterCircle(), GT2005SelfLocator::updateByCrossing(), GT2005SelfLocator::updateByFlag(), GT2005SelfLocator::updateByGoalPost(), and GT2005SelfLocator::updateByPoint().

Here is the call graph for this function:

bool GT2005SelfLocatorSample::isValid | ( |  | ) | const`[inline]`

| Definition at line 85 of file GT2005SelfLocatorSample.h. Referenced by GT2005SelfLocator::calcPose(), and GT2005SelfLocator::calcPoseFromSubCube().

void GT2005SelfLocatorSample::scaleProbabilities | ( | double | factor | ) |

| Definition at line 110 of file GT2005SelfLocatorSample.cpp. References numberOfPerceptTypes, perceptProbabilities, and UNINITIALIZED_PROBABILITY.

## Member Data Documentation

Pose2D GT2005SelfLocatorSample::camera

| Temporary representing the pose of the camera. Definition at line 48 of file GT2005SelfLocatorSample.h. Referenced by GT2005SelfLocator::motionUpdate(), GT2005SelfLocator::updateByFlag(), and GT2005SelfLocator::updateByGoalPost().

double GT2005SelfLocatorSample::perceptProbabilities[numberOfPerceptTypes]

| a probability for each percept-type recognized Definition at line 49 of file GT2005SelfLocatorSample.h. Referenced by GT2005SelfLocator::calcAveragePerceptTypeProbabilities(), reset(), scaleProbabilities(), setPerceptProbability(), and updateProbability().

long GT2005SelfLocatorSample::perceptTimestamps[numberOfPerceptTypes]

| Definition at line 50 of file GT2005SelfLocatorSample.h. Referenced by reset(), and setPerceptProbability().

GT2005SelfLocatorSample* GT2005SelfLocatorSample::next

| The next sample in the cell cube. Definition at line 51 of file GT2005SelfLocatorSample.h. Referenced by GT2005SelfLocator::calcPose(), and GT2005SelfLocator::calcPoseFromSubCube().

bool GT2005SelfLocatorSample::isUsingOdometry

| Whether this sample receives odometry updates or not. Definition at line 52 of file GT2005SelfLocatorSample.h. Referenced by GT2005SelfLocator::motionUpdate(), GT2005SelfLocator::resample(), and reset().

The documentation for this class was generated from the following files:

- Modules/SelfLocator/GT2005SelfLocator/GT2005SelfLocatorSample.h
- Modules/SelfLocator/GT2005SelfLocator/GT2005SelfLocatorSample.cpp