LASP 1.0
Library for Acoustic Signal Processing
Loading...
Searching...
No Matches
lasp_rtaps.h
Go to the documentation of this file.
1// lasp_threadedaps.h
2//
3// Author: J.A. de Jong - ASCEE
4//
5// Description: Real Time Spectrum Viewer
6#pragma once
8#include "lasp_filter.h"
9#include "lasp_mathtypes.h"
11#include <memory>
12#include <mutex>
13
26class RtAps : public ThreadedInDataHandler<RtAps> {
27
28 std::unique_ptr<Filter> _filterPrototype;
29 std::vector<std::unique_ptr<Filter>> _freqWeightingFilters;
30
34 vd _sens;
35
39 mutable std::mutex _ps_mtx;
41
42public:
52 RtAps(SmgrHandle mgr, const Filter *freqWeightingFilter, const us nfft = 2048,
54 const d overlap_percentage = 50., const d time_constant = -1);
55 ~RtAps();
56
63 ccube getCurrentValue() const;
64
72 void inCallback(const DaqData & d);
73 void reset(const Daq *);
74};
75
Estimate cross-power spectra using Welch' method of spectral estimation. The exact amount of overlap ...
Data coming from / going to DAQ. Non-interleaved format, which means data in buffer is ordered by cha...
Base cass for all DAQ (Data Acquisition) interfaces. A DAQ can be a custom device,...
Definition lasp_daq.h:29
Filter used to pre-filter a double-precision floating point data stream.
Definition lasp_filter.h:10
Real time spectral estimator using Welch method of spectral estimation.
Definition lasp_rtaps.h:26
void reset(const Daq *)
ccube getCurrentValue() const
Get the latest estimate of the power spectra.
void inCallback(const DaqData &d)
Implements the work to to when new DaqData arrives.
A bit of curiously recurring template pattern, to connect the specific handlers and connect the prope...
std::shared_ptr< StreamMgr > SmgrHandle
arma::Col< d > vd
arma::Cube< c > ccube
size_t us
We often use boolean values.
Definition lasp_types.h:29