mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-23 01:55:48 -05:00
PlutoSDR: FIR filter calculation: allow normalized BW down to 0.05 and use Hamming window below 0.2
This commit is contained in:
parent
c59b04a68f
commit
f30b049546
@ -27,7 +27,7 @@ const uint32_t DevicePlutoSDR::bbLPRxHighLimitFreq = 14000000U; // 14 MHz
|
|||||||
const uint32_t DevicePlutoSDR::bbLPTxLowLimitFreq = 625000U; // 625 kHz
|
const uint32_t DevicePlutoSDR::bbLPTxLowLimitFreq = 625000U; // 625 kHz
|
||||||
const uint32_t DevicePlutoSDR::bbLPTxHighLimitFreq = 16000000U; // 16 MHz
|
const uint32_t DevicePlutoSDR::bbLPTxHighLimitFreq = 16000000U; // 16 MHz
|
||||||
|
|
||||||
const float DevicePlutoSDR::firBWLowLimitFactor = 0.1f;
|
const float DevicePlutoSDR::firBWLowLimitFactor = 0.05f;
|
||||||
const float DevicePlutoSDR::firBWHighLimitFactor = 0.9f;
|
const float DevicePlutoSDR::firBWHighLimitFactor = 0.9f;
|
||||||
|
|
||||||
DevicePlutoSDR::DevicePlutoSDR()
|
DevicePlutoSDR::DevicePlutoSDR()
|
||||||
|
@ -572,7 +572,7 @@ void DevicePlutoSDRBox::formatFIRHeader(std::ostringstream& ostr,uint32_t intdec
|
|||||||
void DevicePlutoSDRBox::formatFIRCoefficients(std::ostringstream& ostr, uint32_t nbTaps, double normalizedBW)
|
void DevicePlutoSDRBox::formatFIRCoefficients(std::ostringstream& ostr, uint32_t nbTaps, double normalizedBW)
|
||||||
{
|
{
|
||||||
double *fcoeffs = new double[nbTaps];
|
double *fcoeffs = new double[nbTaps];
|
||||||
WFIR::BasicFIR(fcoeffs, nbTaps, WFIR::LPF, normalizedBW, 0.0, WFIR::wtBLACKMAN_HARRIS, 0.0);
|
WFIR::BasicFIR(fcoeffs, nbTaps, WFIR::LPF, normalizedBW, 0.0, normalizedBW < 0.2 ? WFIR::wtHAMMING : WFIR::wtBLACKMAN_HARRIS, 0.0);
|
||||||
|
|
||||||
for (unsigned int i = 0; i < nbTaps; i++) {
|
for (unsigned int i = 0; i < nbTaps; i++) {
|
||||||
ostr << (int16_t) (fcoeffs[i] * 32768.0) << ", " << (int16_t) (fcoeffs[i] * 32768.0) << std::endl;
|
ostr << (int16_t) (fcoeffs[i] * 32768.0) << ", " << (int16_t) (fcoeffs[i] * 32768.0) << std::endl;
|
||||||
|
Loading…
Reference in New Issue
Block a user