2018-10-25 09:43:21 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "GenericFilter.h"
|
2018-12-14 10:04:41 +00:00
|
|
|
#include "typedefs.h"
|
2018-10-25 09:43:21 +00:00
|
|
|
|
|
|
|
namespace fratio {
|
|
|
|
|
2019-01-04 08:15:03 +00:00
|
|
|
/*! \brief Basic digital filter.
|
|
|
|
*
|
|
|
|
* This filter allows you to set any digital filter based on its coefficients.
|
|
|
|
* \tparam T Floating type.
|
|
|
|
*/
|
2018-10-25 09:43:21 +00:00
|
|
|
template <typename T>
|
|
|
|
class DigitalFilter : public GenericFilter<T> {
|
|
|
|
public:
|
2019-01-04 08:15:03 +00:00
|
|
|
/*! \brief Default uninitialized constructor. */
|
2018-10-25 09:43:21 +00:00
|
|
|
DigitalFilter() = default;
|
2019-01-04 08:15:03 +00:00
|
|
|
/*! \brief Constructor.
|
|
|
|
* \param aCoeff Denominator coefficients of the filter in decreasing order.
|
|
|
|
* \param bCoeff Numerator coefficients of the filter in decreasing order.
|
|
|
|
*/
|
2018-12-17 08:16:01 +00:00
|
|
|
DigitalFilter(const vectX_t<T>& aCoeff, const vectX_t<T>& bCoeff)
|
2018-12-14 10:04:41 +00:00
|
|
|
: GenericFilter<T>(aCoeff, bCoeff)
|
2018-10-25 09:43:21 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2018-12-14 11:30:44 +00:00
|
|
|
} // namespace fratio
|