Enki::FourWayMic Class Reference
[Interaction classes]

#include <Microphone.h>

Inheritance diagram for Enki::FourWayMic:

Enki::LocalInteraction Enki::SbotMicrophone List of all members.

Detailed Description

A generic sound sensor/microphone.


Public Member Functions

 FourWayMic (Robot *owner, double micDist, double range, MicrophoneResponseModel micModel, unsigned channels)
 Constructor e.g.
 ~FourWayMic (void)
 Destructor.
void init ()
 Reset distance values, called every w->step().
virtual void objectStep (double dt, PhysicalObject *po, World *w)
 Check for local interactions with other physical objects.
void resetSound (void)
 Reset sound buffer to 0 after one time-step in experiment.
double * getAcquiredSound (unsigned micNo)
 Return frequencies of input sound.
void getMaxChannel (unsigned micNo, double *intensity, int *channel)
 Find frequency with maximum intensity.
Vector getMicAbsPos (unsigned micNo)
 Get absolute position of microphone.

Protected Attributes

PhysicalObjectowner
 Robot/object with the microphone.
Vector allMicAbsPos [4]
 Absolute position in the world, updated on init().
double micDist
 Distance of the mics from centre of object.
MicrophoneResponseModel micModel
 Microphone frequency response model.
double range
 Actual detection range.
unsigned noOfChannels
 No of frequency channels distinguished in input.
double * acquiredSound [4]
 Microphone input signal (array of size noOfChannels for 4 mics).


Constructor & Destructor Documentation

Enki::FourWayMic::FourWayMic ( Robot owner,
double  micDist,
double  range,
MicrophoneResponseModel  micModel,
unsigned  channels 
)

Constructor e.g.

: FourWayMic(this, 0.5, 5, micStepModel, 20); meaning: each of the 4 mics is 0.5 away from robot center, can hear sounds up to 5 units away, uses a step model to detect sounds and can distinguish 20 frequencies


The documentation for this class was generated from the following files:
Generated on Sun Mar 1 03:10:09 2009 for Enki by  doxygen 1.5.1