v2.0.0
Loading...
Searching...
No Matches
parksmcclellan.h
Go to the documentation of this file.
1//=============================================================================================================
31
32#ifndef PARKSMCCLELLAN_H
33#define PARKSMCCLELLAN_H
34
35//=============================================================================================================
36// INCLUDES
37//=============================================================================================================
38
39#include "dsp_global.h"
40
41//=============================================================================================================
42// EIGEN INCLUDES
43//=============================================================================================================
44
45#include <Eigen/Core>
46
47//=============================================================================================================
48// QT INCLUDES
49//=============================================================================================================
50
51#include <QObject>
52
53//=============================================================================================================
54// DEFINE NAMESPACE UTILSLIB
55//=============================================================================================================
56
57namespace UTILSLIB
58{
59
67class DSPSHARED_EXPORT ParksMcClellan : public QObject
68{
69 Q_OBJECT
70 Q_ENUMS(TPassType) //makes enum available to the class' Qt meta object
71
72public:
80
82
83 //=========================================================================================================
111 ParksMcClellan(int NumTaps,
112 double OmegaC,
113 double BW,
114 double ParksWidth,
115 TPassType PassType);
116
118
119 //=========================================================================================================
130 void init(int NumTaps,
131 double OmegaC,
132 double BW,
133 double ParksWidth,
134 TPassType PassType);
135
136 //=========================================================================================================
139 void CalcParkCoeff2(int NBANDS, int NFILT);
140
141 //=========================================================================================================
150 double LeGrangeInterp2(int K, int N, int M);
151
152 //=========================================================================================================
161 double GEE2(int K, int N);
162
163 //=========================================================================================================
166 int Remez2(int GridIndex);
167
168 //=========================================================================================================
178 bool ErrTest(int k,
179 int Nut,
180 double Comp,
181 double* Err);
182
183 //=========================================================================================================
188 void CalcCoefficients();
189
190 Eigen::RowVectorXd FirCoeff;
191
192private:
193 int HalfTapCount;
194 Eigen::VectorXi ExchangeIndex;
195 Eigen::VectorXd LeGrangeD;
196 Eigen::VectorXd Alpha;
197 Eigen::VectorXd CosOfGrid;
198 Eigen::VectorXd DesPlus;
199 Eigen::VectorXd Coeff;
200 Eigen::VectorXd Edge;
201 Eigen::VectorXd BandMag;
202 Eigen::VectorXd InitWeight;
203 Eigen::VectorXd DesiredMag;
204 Eigen::VectorXd Grid;
205 Eigen::VectorXd Weight;
206
207 bool InitDone2;
208};
209} // NAMESPACE UTILSLIB
210
211#endif // PARKSMCCLELLAN_H
Export/import macros and namespace declaration for the DSP library.
#define DSPSHARED_EXPORT
Definition dsp_global.h:50
Shared utilities (I/O helpers, spectral analysis, layout management, warp algorithms).
Parks-McClellan equiripple FIR filter design algorithm (Remez exchange).
Eigen::RowVectorXd FirCoeff