CSWSonar Class Reference

Inheritance diagram for CSWSonar:

Inheritance graph
[legend]
List of all members.

Public Types

enum  ScanDirectionMode {
  FULL = 1, FRONT = 2, BACK = 3,
  LOCAL_DIRECTION = 4, GLOBAL_POSITION = 5
}
enum  ScanVelocityMode { FAST = 1, SLOW = 2 }
enum  ScanRangeMode { NEAR_RANGE = 1, FAR_RANGE = 2 }

Public Member Functions

void setEnableAutomaticRotation (bool bValue)
bool isAutomaticRotationEnabled () const
void setScanDirectionMode (ScanDirectionMode directionMode)
void setScanVelocityMode (ScanVelocityMode velocityMode)
void setScanRangeMode (ScanRangeMode rangeMode)
ScanDirectionMode getScanDirectionMode () const
ScanVelocityMode getScanVelocityMode () const
ScanRangeMode getScanRangeMode () const
void setScanDirection (const Vector3D &vecDirection)
const Vector3D & getScanDirection () const
void pointToGlobalPosition (const Vector3D &vecPosition)
const Vector3D & getDirection () const

Detailed Description

This is the base class for sonar like functionality. To cover regions the sonar can be rotated periodically. This can be controlled by the three different mode types (direction, velocity and range). The maximal angular velocity for adjusting is 180 degree/second.


Member Enumeration Documentation

enum CSWSonar::ScanDirectionMode

Available scanning directions and areas.

Enumerator:
FULL  Scans horizontal about 360 degree. (Default).
FRONT  Scans horizontal about 90 degree in forward direction.
BACK  Scans horizontal about 90 degree in backward direction.
LOCAL_DIRECTION  Scans horizontal about 30 degree in currently set custom direction.
GLOBAL_POSITION  Scans horizontal about 30 degree in direction to the currently set global position.

enum CSWSonar::ScanVelocityMode

Available scanning velocities.

Enumerator:
FAST  Scans horizontal with 90 degree per second. (Default).
SLOW  Scans horizontal with 20 degree per second.

enum CSWSonar::ScanRangeMode

Available scanning ranges.

Enumerator:
NEAR_RANGE  Scans like described above. (Default).
FAR_RANGE  Reduces the scaning area (horizontal) and the velocity (horizontal) by factor 4.


Member Function Documentation

void CSWSonar::setEnableAutomaticRotation ( bool  bValue  ) 

Enable the automatic rotation. If this is set to false the sonar can be set manually to desired direction with setDirection().

Parameters:
bValue If true the automatic rotation is activated otherwise not.

bool CSWSonar::isAutomaticRotationEnabled (  )  const

Returns whether the automatic rotation is enabled or not.

Returns:
True if the automatic rotation is activated otherwise false.

void CSWSonar::setScanDirectionMode ( ScanDirectionMode  directionMode  ) 

Sets the scanning direction.

Parameters:
directionMode The new scanning direction that should be used.
Warning:
Mode changes causes direction changes.

void CSWSonar::setScanVelocityMode ( ScanVelocityMode  velocityMode  ) 

Sets the scanning velocity.

Parameters:
velocityMode The new scanning velocity that should be used.
Warning:
Mode changes causes direction changes.

void CSWSonar::setScanRangeMode ( ScanRangeMode  rangeMode  ) 

Sets the scanning range.

Parameters:
rangeMode The new scanning range that should be used.
Warning:
Mode changes causes direction changes.

CSWSonar::ScanDirectionMode CSWSonar::getScanDirectionMode (  )  const

Gets the current scanning direction mode.

Returns:
Returns the current scanning direction mode.

CSWSonar::ScanVelocityMode CSWSonar::getScanVelocityMode (  )  const

Gets the current scanning velocity mode.

Returns:
Returns the current scanning velocity mode.

CSWSonar::ScanRangeMode CSWSonar::getScanRangeMode (  )  const

Gets the current scanning range mode.

Returns:
Returns the current scanning range mode.

void CSWSonar::setScanDirection ( const Vector3D &  vecDirection  ) 

Sets the new custom main scanning direction for scan direction mode LOCAL_DIRECTION.

Parameters:
vecDirection The new custom main scanning direction in local coordinate system that should be used.
Warning:
This makes only sense in mode LOCAL_DIRECTION.

const Vector3D & CSWSonar::getScanDirection (  )  const

Gets the current custom main scanning direction for scan direction mode LOCAL_DIRECTION.

Returns:
Returns the current custom main scanning direction in local coordinate system.
Warning:
This makes only sense in mode LOCAL_DIRECTION.

void CSWSonar::pointToGlobalPosition ( const Vector3D &  vecPosition  ) 

Lets the sonar always points to the given position in world coordinate system for scan direction mode GLOBAL_POSITION.

Parameters:
vecPosition The global position to which the sonar should be directed.
Warning:
This makes only sense in mode GLOBAL_POSITION.

const Vector3D & CSWSonar::getDirection (  )  const

Gets the current scanning direction in world coordinate system.

Returns:
Returns the current scanning direction in world coordinate system.


Generated at 2 Jan 2007 for project CodeSubWars. www.codesubwars.org