CSWPassiveSonar Class Reference

Inheritance diagram for CSWPassiveSonar:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual const double & getAngleOfBeam () const
virtual void setAngleOfBeam (const double &fAngle)
virtual const double & getLevel () const
void adjustDirectionToMaximum (const double &fTimeToFind)
bool isAdjusting () const
bool hasAdjusted () const

Detailed Description

This class specializes a sonar to a passive sonar. It detects environmental sounds of sound emitting objects.


Member Function Documentation

const double & CSWPassiveSonar::getAngleOfBeam (  )  const [virtual]

Returns the current set angle of beam.

Returns:
The current set angle of beam.

Implements CSWISoundReceiver.

void CSWPassiveSonar::setAngleOfBeam ( const double &  fAngle  )  [virtual]

Sets the current angle of beam within emitted sound are detected. If setting a larger angle the resolution will be decreased. Initially the angle is 15 degree.

Parameters:
fAngle The angle of beam that should be used in degree. This is clamped to [0, 180].

Implements CSWISoundReceiver.

const double & CSWPassiveSonar::getLevel (  )  const [virtual]

Returns the currently detected sound pressure level (SPL) in decibel (dB). Typical values are (depend on distance):
Main engine of large submarine on max intensity: about 100dB
Jet oars of large submarine on max intensity: about 80dB
Explosion of torpedo/mine: about 150dB
Engine of torpedo: about 30dB

Returns:
The currently detected sound pressure level in dB.

Implements CSWISoundReceiver.

void CSWPassiveSonar::adjustDirectionToMaximum ( const double &  fTimeToFind  ) 

Adjusts the currently set local direction to point to a maximum level. By doing this the automatic rotation will be disabled and the direction mode is set to LOCAL_DIRECTION.

Parameters:
fTimeToFind The maximal relative time within the maximum level must be found. If this time has reached the adjusting will stop at the currently found maximum. This time will never be exceeded.

bool CSWPassiveSonar::isAdjusting (  )  const

Returns true if the sonar is currently adjusting.

Returns:
True if the sonar is currently adjusting otherwise false.

bool CSWPassiveSonar::hasAdjusted (  )  const

Returns true if a previously started adjusting has been finished.

Returns:
True if a previously started adjusting has been finished otherwise false.


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