BallModel Class Reference

#include <BallModel.h>

List of all members.

Public Types

 behaviorControlTimeAfterWhichCommunicatedBallsAreAccepted = 6000
enum  { behaviorControlTimeAfterWhichCommunicatedBallsAreAccepted = 6000 }

Public Member Functions

 BallModel ()
void setFrameNumber (unsigned long frameNumber)
const Vector2< double > & getKnownPosition (unsigned long timeAfterWhichCommunicatedBallsAreAccepted) const
unsigned long getTimeSinceLastKnown (unsigned long timeAfterWhichCommunicatedBallsAreAccepted) const

Public Attributes

unsigned long frameNumber
int numberOfImagesWithoutBallPercept
int numberOfImagesWithBallPercept
bool ballWasSeen
SeenBallPosition seen
PropagatedBallPosition propagated
CommunicatedBallPosition communicated
BallState ballState
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

Enumerator:
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

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().

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().

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

Definition at line 164 of file BallModel.h.


Member Data Documentation

BallState BallModel::ballState

Qualitative propositions of the ball

Definition at line 187 of file BallModel.h.

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

bool BallModel::ballWasSeen

Definition at line 169 of file BallModel.h.

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

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 Oracle::getBallModel(), GT2004HeadControlSymbols::getCommunicatedBallDistance(), getKnownPosition(), getTimeSinceLastKnown(), DebugDrawingManagerMessageHandler::handleMessage(), and DrawingMethods::paintWorldState().

unsigned long BallModel::frameNumber

Definition at line 163 of file BallModel.h.

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

double BallModel::motionValidity

Definition at line 208 of file BallModel.h.

Referenced by BallSymbols::getMotionValidity().

int BallModel::numberOfImagesWithBallPercept

Definition at line 167 of file BallModel.h.

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

int BallModel::numberOfImagesWithoutBallPercept

Definition at line 166 of file BallModel.h.

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

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().

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(), CPotentialFieldViewerDlgBar::drawField(), GT2004StrategySymbols::estimateTimeToReachBall(), KickLogger::execute(), GT2004BallLocator::execute(), BallSymbols::getAngleToOpponentGoal(), GT2004HeadControlSymbols::getBallConsecutivelySeenTime(), Oracle::getBallModel(), 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(), DebugDrawingManagerMessageHandler::handleMessage(), CValueHistoryDlgBar::handleMessage(), GT2004BallLocator::handleSeenBall(), GT2004BallLocator::handleUnseenBall(), PaintMethodsWin32::paintBallModelToCDC(), DrawingMethods::paintWorldState(), BallSymbols::registerSymbols(), KickSelectionSymbols::retrieveKick(), GT2004BallLocator::setBallStateV2(), GTStandardConverter::setData(), ObstaclesSymbols::update(), and BallSymbols::update().

double BallModel::validity

Definition at line 207 of file BallModel.h.

Referenced by Oracle::getBallModel().


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