gramods
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
gramods::gmSound::Multilateration Class Reference

Estimates the position of sound. More...

#include <Multilateration.hh>

Inheritance diagram for gramods::gmSound::Multilateration:
Inheritance graph
[legend]
Collaboration diagram for gramods::gmSound::Multilateration:
Collaboration graph
[legend]

Classes

struct  Impl
 

Public Types

typedef gmCore::Updateable::clock clock
 
- Public Types inherited from gramods::gmTrack::PoseTracker
typedef std::chrono::steady_clock clock
 
- Public Types inherited from gramods::gmCore::Updateable
typedef std::chrono::steady_clock clock
 

Public Member Functions

void addPoint (Eigen::Vector3f pt)
 Adds a microphone position for the multilateration. More...
 
void setSpeedOfSound (float v)
 Sets the speed of sound (m/s) to use when estimating the distances from the sound. More...
 
void setSoundDetector (std::shared_ptr< SoundDetector >)
 Sets the capture object to read audio sample data from. More...
 
bool getPose (PoseSample &p) override
 Replaces the contents of p with pose data. More...
 
void update (clock::time_point t, size_t frame) override
 Called by updateAll to perform the multilateration and set the most current position, if one is detected. More...
 
void initialize () override
 Called to initialize the Object. More...
 
void traverse (Visitor *visitor) override
 Propagates the specified visitor. More...
 
- Public Member Functions inherited from gramods::gmTrack::SinglePoseTracker
virtual std::string getDefaultKey () override
 Returns the default key, in Configuration, for the Object. More...
 
- Public Member Functions inherited from gramods::gmCore::Object
 Object ()
 Initializes internal data. More...
 
virtual ~Object ()
 Cleaning up internal data. More...
 
virtual void accept (Visitor *visitor)
 Calls the visitors apply method with this as argument. More...
 
bool isInitialized ()
 Returns true if the Object is initialized. More...
 
- Public Member Functions inherited from gramods::gmCore::Updateable
 Updateable (int priority=0)
 Configures the Updateable properties to the specified priority. More...
 

Public Attributes

 GM_OFI_DECLARE
 

Additional Inherited Members

- Static Public Member Functions inherited from gramods::gmCore::Updateable
static void updateAll (clock::time_point t=clock::now(), std::optional< size_t > frame=std::nullopt)
 Updates all currently instanciated updateable objects. More...
 

Detailed Description

Estimates the position of sound.

Member Function Documentation

◆ addPoint()

void gramods::gmSound::Multilateration::addPoint ( Eigen::Vector3f  pt)

Adds a microphone position for the multilateration.

The number of microphone positions should match the number of channels in the capture.

XML-attribute: point

◆ getPose()

bool gramods::gmSound::Multilateration::getPose ( PoseSample p)
overridevirtual

Replaces the contents of p with pose data.

Use sample time to check if data are fresh.

Implements gramods::gmTrack::SinglePoseTracker.

◆ initialize()

void gramods::gmSound::Multilateration::initialize ( )
overridevirtual

Called to initialize the Object.

This should be called once only!

Sub classes should override this method to make use of set parameter data. They should also always call its base class' implementation as well.

Reimplemented from gramods::gmCore::Object.

◆ setSoundDetector()

void gramods::gmSound::Multilateration::setSoundDetector ( std::shared_ptr< SoundDetector sd)

Sets the capture object to read audio sample data from.

The number of microphone positions should match the number of channels in the capture.

XML-attribute: soundDetector

◆ setSpeedOfSound()

void gramods::gmSound::Multilateration::setSpeedOfSound ( float  v)

Sets the speed of sound (m/s) to use when estimating the distances from the sound.

Default is 343 m/s, which is the speed of sound in air at 20 °C.

XML-attribute: speedOfSound

◆ traverse()

void gramods::gmSound::Multilateration::traverse ( Visitor visitor)
overridevirtual

Propagates the specified visitor.

See also
Object::Visitor

Reimplemented from gramods::gmCore::Object.

◆ update()

void gramods::gmSound::Multilateration::update ( clock::time_point  t,
size_t  frame 
)
overridevirtual

Called by updateAll to perform the multilateration and set the most current position, if one is detected.

Implements gramods::gmCore::Updateable.


The documentation for this class was generated from the following files: