gramods
Multilateration.hh
1 
2 #ifndef GRAMODS_SOUND_MULTILATERATION
3 #define GRAMODS_SOUND_MULTILATERATION
4 
5 // Required before gmCore/OFactory.hh for some compilers
6 #include <gmCore/io_eigen.hh>
7 
8 #include <gmSound/SoundDetector.hh>
9 
10 #include <gmCore/Updateable.hh>
11 #include <gmTrack/SinglePoseTracker.hh>
12 
13 namespace gramods {
14 namespace gmSound {
15 
20  public gmCore::Updateable {
21 
22 public:
23  typedef gmCore::Updateable::clock clock;
24 
26  virtual ~Multilateration();
27 
35  void addPoint(Eigen::Vector3f pt);
36 
44  void setSpeedOfSound(float v);
45 
53  void setSoundDetector(std::shared_ptr<SoundDetector>);
54 
59  bool getPose(PoseSample &p) override;
60 
65  void update(clock::time_point t, size_t frame) override;
66 
67  void initialize() override;
68 
74  void traverse(Visitor *visitor) override;
75 
76  GM_OFI_DECLARE;
77 
78 private:
79  struct Impl;
80  std::unique_ptr<Impl> _impl;
81 };
82 }
83 }
84 
85 #endif
The Updateable class defines an interface for objects that may be updated, for example each execution...
Definition: Updateable.hh:18
Estimates the position of sound.
Definition: Multilateration.hh:20
void traverse(Visitor *visitor) override
Propagates the specified visitor.
Definition: Multilateration.cpp:158
void setSoundDetector(std::shared_ptr< SoundDetector >)
Sets the capture object to read audio sample data from.
Definition: Multilateration.cpp:45
void initialize() override
Called to initialize the Object.
Definition: Multilateration.cpp:60
void addPoint(Eigen::Vector3f pt)
Adds a microphone position for the multilateration.
Definition: Multilateration.cpp:39
void update(clock::time_point t, size_t frame) override
Called by updateAll to perform the multilateration and set the most current position,...
Definition: Multilateration.cpp:56
bool getPose(PoseSample &p) override
Replaces the contents of p with pose data.
Definition: Multilateration.cpp:49
void setSpeedOfSound(float v)
Sets the speed of sound (m/s) to use when estimating the distances from the sound.
Definition: Multilateration.cpp:43
The base of SinglePoseTrackers.
Definition: SinglePoseTracker.hh:13
Gramods, short for Graphics Modules, is a collection of weakly inter dependent and useful APIs for Vi...
Definition: config.hh:25
The visitor of a design pattern for automatic traversal.
Definition: Object.hh:75
Definition: Multilateration.cpp:19
Definition: PoseTracker.hh:23