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

BallModel Class Reference

Contains the modeled knowledge about the ball. More...

#include <BallModel.h>

Collaboration diagram for BallModel:

Collaboration graph
[legend]
List of all members.

Public Types

enum  { behaviorControlTimeAfterWhichCommunicatedBallsAreAccepted = 6000 }
 The time for the behaviorControl after that communicated ball positions are accepted. More...


Public Member Functions

 BallModel ()
 Constructor.

void setFrameNumber (unsigned long frameNumber)
const Vector2< double > & getKnownPosition (unsigned long timeAfterWhichCommunicatedBallsAreAccepted) const
 Returns a "known" ball position.

unsigned long getTimeSinceLastKnown (unsigned long timeAfterWhichCommunicatedBallsAreAccepted) const
 Returns the time since the ball was seen or communicated.


Public Attributes

unsigned long frameNumber
int numberOfImagesWithoutBallPercept
int numberOfImagesWithBallPercept
bool ballWasSeen
SeenBallPosition seen
 The position of the ball estimated from own observations.

PropagatedBallPosition propagated
 The position of the ball estimated from own observations and the observed ball speed; it is propagated even if the ball is not seen.

CommunicatedBallPosition communicated
 The position of the ball estimated from own observations and from observation of other players.

BallState ballState
 Qualitative propositions of the ball.

double validity
double motionValidity

Detailed Description

Contains the modeled knowledge about the ball.

Definition at line 157 of file BallModel.h.


Member Enumeration Documentation

anonymous enum
 

The time for the behaviorControl after that communicated ball positions are accepted.

Enumeration values:
behaviorControlTimeAfterWhichCommunicatedBallsAreAccepted 

Definition at line 204 of file BallModel.h.


Constructor & Destructor Documentation

BallModel::BallModel  ) 
 

Constructor.

Definition at line 123 of file BallModel.cpp.

References ballWasSeen.


Member Function Documentation

void BallModel::setFrameNumber unsigned long  frameNumber  )  [inline]
 

Definition at line 164 of file BallModel.h.

const Vector2< double > & BallModel::getKnownPosition unsigned long  timeAfterWhichCommunicatedBallsAreAccepted  )  const
 

Returns a "known" ball position.

If the ball was seen, the seen ball position is used. If the ball was not seen for a timeAfterThatCommunicatedBallsAreAccepted, the communicatedBallPosition is returned, if there was received a ball position.

Parameters:
timeAfterWhichCommunicatedBallsAreAccepted The time after that the communicated position is returned

Definition at line 87 of file BallModel.cpp.

References communicated, SystemCall::getTimeSince(), seen, CommunicatedBallPosition::timeWhenLastObserved, and SeenBallPosition::timeWhenLastSeen.

Referenced by GT2004BasicBehaviorGoaliePosition::execute(), GT2004BasicBehaviorGoToBallWithoutTurning::execute(), GT2004BasicBehaviorGoToBall::execute(), GT2004PotentialFieldBasicBehaviorOffensiveSupport::execute(), BallSymbols::getKnownAngle(), BallSymbols::getKnownDistance(), BallSymbols::getKnownX(), BallSymbols::getKnownY(), and GTStandardConverter::setData().

Here is the call graph for this function:

unsigned long BallModel::getTimeSinceLastKnown unsigned long  timeAfterWhichCommunicatedBallsAreAccepted  )  const
 

Returns the time since the ball was seen or communicated.

Parameters:
timeAfterWhichCommunicatedBallsAreAccepted as in getKnownPosition()

Definition at line 108 of file BallModel.cpp.

References communicated, SystemCall::getTimeSince(), min, seen, CommunicatedBallPosition::timeWhenLastObserved, and SeenBallPosition::timeWhenLastSeen.

Referenced by BallSymbols::getTimeSinceLastKnown(), and GTStandardConverter::setData().

Here is the call graph for this function:


Member Data Documentation

unsigned long BallModel::frameNumber
 

Definition at line 163 of file BallModel.h.

Referenced by GT2004BallLocator::execute(), operator<<(), and operator>>().

int BallModel::numberOfImagesWithoutBallPercept
 

Definition at line 166 of file BallModel.h.

Referenced by GT2004BallLocator::determineNumberOfImagesWith_WithoutBall(), and BallSymbols::getNumberOfImagesWithoutBallPercept().

int BallModel::numberOfImagesWithBallPercept
 

Definition at line 167 of file BallModel.h.

Referenced by GT2004BallLocator::determineNumberOfImagesWith_WithoutBall(), and BallSymbols::getNumberOfImagesWithBallPercept().

bool BallModel::ballWasSeen
 

Definition at line 169 of file BallModel.h.

Referenced by BallModel(), GT2004BallLocator::determineNumberOfImagesWith_WithoutBall(), GT2004BehaviorControl::preExecute(), and BallSymbols::registerSymbols().

SeenBallPosition BallModel::seen
 

The position of the ball estimated from own observations.

Definition at line 172 of file BallModel.h.

Referenced by GT2004ObstaclesLocator::addPSDPercept(), GT2004StrategySymbols::computeRole(), GT2004StrategySymbols::estimateTimeToReachBall(), KickLogger::execute(), GT2004BallLocator::execute(), BallSymbols::getAngleToOpponentGoal(), GT2004HeadControlSymbols::getBallConsecutivelySeenTime(), BallSymbols::getBallSeenInFrontOfOpponentGoal(), GT2004HeadControlSymbols::getBallSpeedAbs(), GT2004HeadControlSymbols::getBallTimeSinceLastSeen(), KickLogger::getBallX(), KickLogger::getBallY(), BallSymbols::getConsecutivelySeenTime(), BallSymbols::getDistanceSeenBallToOwnPenaltyArea(), GT2004StrategySymbols::getGoalieMaxPositionSpeed(), BallSymbols::getJustSeen(), getKnownPosition(), GT2004HeadControlSymbols::getRelativeBallSpeedX(), GT2004HeadControlSymbols::getRelativeBallSpeedY(), BallSymbols::getSeenAngle(), GT2004HeadControlSymbols::getSeenDistance(), BallSymbols::getSeenDistance(), BallSymbols::getSeenDistanceX(), BallSymbols::getSeenDistanceY(), BallSymbols::getSeenRelativeSpeedX(), BallSymbols::getSeenRelativeSpeedY(), BallSymbols::getSeenSpeed(), getTimeSinceLastKnown(), BallSymbols::getTimeSinceLastSeen(), GT2004HeadControlSymbols::getTimeSinceLastSeenConsecutively(), BallSymbols::getTimeSinceLastSeenConsecutively(), GT2004BallLocator::handleSeenBall(), GT2004BallLocator::handleUnseenBall(), GT2004BehaviorControl::preExecute(), BallSymbols::registerSymbols(), KickSelectionSymbols::retrieveKick(), GT2004BallLocator::setBallStateV2(), GTStandardConverter::setData(), ObstaclesSymbols::update(), and BallSymbols::update().

PropagatedBallPosition BallModel::propagated
 

The position of the ball estimated from own observations and the observed ball speed; it is propagated even if the ball is not seen.

Definition at line 178 of file BallModel.h.

Referenced by GT2004BallLocator::handleSeenBall(), GT2004BallLocator::handleUnseenBall(), and GT2004BallLocator::setUnknownResult().

CommunicatedBallPosition BallModel::communicated
 

The position of the ball estimated from own observations and from observation of other players.

Definition at line 184 of file BallModel.h.

Referenced by GT2004HeadControlSymbols::getCommunicatedBallDistance(), getKnownPosition(), getTimeSinceLastKnown(), and GT2004BehaviorControl::preExecute().

BallState BallModel::ballState
 

Qualitative propositions of the ball.

Definition at line 187 of file BallModel.h.

Referenced by BallSymbols::getProjectedDistanceOnYAxis(), BallSymbols::getTimeUntilBallCrossesYAxis(), GT2004BehaviorControl::postExecute(), BallSymbols::registerSymbols(), GT2004BallLocator::setBallState(), and GT2004BallLocator::setBallStateV2().

double BallModel::validity
 

Definition at line 207 of file BallModel.h.

double BallModel::motionValidity
 

Definition at line 208 of file BallModel.h.

Referenced by BallSymbols::getMotionValidity().


The documentation for this class was generated from the following files:
Generated on Thu Sep 23 20:04:16 2004 for GT2004 by doxygen 1.3.6