Documentation
Tools for embedded systems
Loading...
Searching...
No Matches
rms.hpp
1
10#ifndef QLIBS_RMS
11#define QLIBS_RMS
12
13#include <include/qlibs_types.hpp>
14#include <include/smoother.hpp>
15
16
20namespace qlibs {
21
30 class rms : public smootherEXPW, public smootherMWM2, public smootherLPF1 {
31 public:
32 virtual ~rms() {}
33 rms() = default;
34
46 real_t update( const real_t x ) noexcept;
47
56 bool setup( real_t * const window,
57 const size_t wsize ) noexcept;
58
65 template <size_t windowSize>
66 bool setup( real_t (&win)[ windowSize ] ) noexcept
67 {
68 return setup( win, windowSize );
69 }
70
83 bool setParams( const real_t l,
84 const real_t a ) noexcept;
85 };
86
88}
89
90
91#endif /*QLIBS_RMS*/
RMS calculator object.
Definition rms.hpp:30
bool setup(real_t *const window, const size_t wsize) noexcept
Initialize the RMS instance by setting the default optimal parameters.
Definition rms.cpp:7
rms()=default
virtual ~rms()
Definition rms.hpp:32
real_t update(const real_t x) noexcept
Computes the moving root mean square (RMS) of the input signal. The object uses both the exponential ...
Definition rms.cpp:22
bool setParams(const real_t l, const real_t a) noexcept
Change the recursive parameters for the moving RMS estimator.
Definition rms.cpp:33
bool setup(real_t(&win)[windowSize]) noexcept
Initialize the RMS instance by setting the default optimal parameters.
Definition rms.hpp:66
An Exponential weighting filter.
Definition smoother.hpp:365
A 1st order Low-Pass Filter.
Definition smoother.hpp:67
A Moving Window Median filter.
Definition smoother.hpp:174
The qLibs++ library namespace.
Definition fp16.cpp:4
float real_t
A type to instantiate a real variable double-precision of 64-bits IEEE 754.
Definition qlibs_types.hpp:43