gramods
|
Estimates the position of sound. More...
#include <Multilateration.hh>
Classes | |
struct | Impl |
Public Types | |
typedef gmCore::Updateable::clock | clock |
![]() | |
typedef std::chrono::steady_clock | clock |
![]() | |
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... | |
![]() | |
virtual std::string | getDefaultKey () override |
Returns the default key, in Configuration, for the Object. More... | |
![]() | |
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... | |
![]() | |
Updateable (int priority=0) | |
Configures the Updateable properties to the specified priority. More... | |
Public Attributes | |
GM_OFI_DECLARE | |
Additional Inherited Members | |
![]() | |
static void | updateAll (clock::time_point t=clock::now(), std::optional< size_t > frame=std::nullopt) |
Updates all currently instanciated updateable objects. More... | |
Estimates the position of sound.
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
|
overridevirtual |
Replaces the contents of p with pose data.
Use sample time to check if data are fresh.
Implements gramods::gmTrack::SinglePoseTracker.
|
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.
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
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
|
overridevirtual |
Propagates the specified visitor.
Reimplemented from gramods::gmCore::Object.
|
overridevirtual |
Called by updateAll to perform the multilateration and set the most current position, if one is detected.
Implements gramods::gmCore::Updateable.