34 #ifndef __ENKI_MICROPHONE_H 35 #define __ENKI_MICROPHONE_H 133 void getMaxChannel(
unsigned micNo,
double *intensity,
int *channel);
A vector in a 2D space.
Definition: Geometry.h:68
double * getAcquiredSound(void)
Return frequencies of input sound.
Definition: Microphone.cpp:116
void resetSound(void)
Reset sound buffer to 0 after one time-step in experiment.
Definition: Microphone.cpp:121
Vector micRelPos
Relative position of mic on object.
Definition: Microphone.h:62
A generic sound sensor/microphone.
Definition: Microphone.h:54
Vector micAbsPos
Absolute position in the world, updated on init()
Definition: Microphone.h:60
Header of sound emitter interaction.
A situated object in the world with mass, geometry properties, physical properties, ...
Definition: PhysicalEngine.h:131
A generic sound sensor/microphone.
Definition: Microphone.h:97
PhysicalObject * owner
Robot/object with the microphone.
Definition: Microphone.h:58
unsigned noOfChannels
No of frequency channels distinguished in input.
Definition: Microphone.h:68
Enki is the namespace of the Enki simulator. All Enki functions and classes excepted the math one are...
Definition: BluetoothBase.cpp:44
~Microphone(void)
Destructor.
Definition: Microphone.cpp:63
unsigned noOfChannels
No of frequency channels distinguished in input.
Definition: Microphone.h:111
The interfaces for the interactions.
void init()
Reset distance values, called every w->step()
Definition: Microphone.cpp:68
PhysicalObject * owner
Robot/object with the microphone.
Definition: Microphone.h:101
double * acquiredSound
microphone input signal (array of size noOfChannels)
Definition: Microphone.h:70
void getMaxChannel(double *intensity, int *channel)
Find frequency with maximum intensity.
Definition: Microphone.cpp:126
virtual void objectStep(double dt, PhysicalObject *po, World *w)
Check for local interactions with other physical objects.
Definition: Microphone.cpp:75
The world is the container of all objects and robots.
Definition: PhysicalEngine.h:411
MicrophoneResponseModel micModel
Microphone frequency response model.
Definition: Microphone.h:64
double range
Actual detection range.
Definition: Microphone.h:66
double range
Actual detection range.
Definition: Microphone.h:109
Microphone(Robot *owner, Vector micRelPos, double range, MicrophoneResponseModel micModel, unsigned channels)
Constructor e.g.
Definition: Microphone.cpp:46
Interacts with another object or wall only up to a certain distance.
Definition: Interaction.h:53
double micDist
Distance of the mics from centre of object.
Definition: Microphone.h:105
double(* MicrophoneResponseModel)(double, double)
A function for manipulating acquired sound, normally to model saturation, distance decreasing or freq...
Definition: Microphone.h:50
MicrophoneResponseModel micModel
Microphone frequency response model.
Definition: Microphone.h:107
A robot is a PhysicalObject that has additional interactions and a controller.
Definition: PhysicalEngine.h:379
Vector getMicAbsPos()
Get absolute position of microphone.
Definition: Microphone.cpp:140