transceiver, resamp: insert missing filter values
With transceiver integration, the resampling filter files were dropped. This created a working resampling implementation for the USRP2 / N200, but with spectrum irregulaties that likely caused issues at longer range operation. Simply reinsert the filter files and modify the filter initialization to use them. Signed-off-by: Thomas Tsou <ttsou@vt.edu>
This commit is contained in:
parent
3800745c6a
commit
6445a3bf86
|
@ -69,7 +69,9 @@ noinst_HEADERS = \
|
|||
radioDevice.h \
|
||||
sigProcLib.h \
|
||||
Transceiver.h \
|
||||
USRPDevice.h
|
||||
USRPDevice.h \
|
||||
rcvLPF_651.h \
|
||||
sendLPF_961.h
|
||||
|
||||
USRPping_SOURCES = USRPping.cpp
|
||||
USRPping_LDADD = \
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2008 Free Software Foundation, Inc.
|
||||
* Copyright 2008, 2011 Free Software Foundation, Inc.
|
||||
*
|
||||
* This software is distributed under the terms of the GNU Affero Public License.
|
||||
* See the COPYING file in the main directory for details.
|
||||
|
@ -28,6 +28,8 @@
|
|||
|
||||
#include "sigProcLib.h"
|
||||
#include "GSMCommon.h"
|
||||
#include "sendLPF_961.h"
|
||||
#include "rcvLPF_651.h"
|
||||
|
||||
#include <Logger.h>
|
||||
|
||||
|
@ -1136,7 +1138,7 @@ signalVector *createLPF(float cutoffFreq,
|
|||
int filterLen,
|
||||
float gainDC)
|
||||
{
|
||||
|
||||
#if 0
|
||||
signalVector *LPF = new signalVector(filterLen);
|
||||
LPF->isRealOnly(true);
|
||||
signalVector::iterator itr = LPF->begin();
|
||||
|
@ -1148,6 +1150,29 @@ signalVector *createLPF(float cutoffFreq,
|
|||
*itr++ = (complex) ys*yg*yw;
|
||||
sum += ys*yg*yw;
|
||||
}
|
||||
#else
|
||||
double sum = 0.0;
|
||||
signalVector *LPF;
|
||||
signalVector::iterator itr;
|
||||
if (filterLen == 651) { // receive LPF
|
||||
LPF = new signalVector(651);
|
||||
LPF->isRealOnly(true);
|
||||
itr = LPF->begin();
|
||||
for (int i = 0; i < filterLen; i++) {
|
||||
*itr++ = complex(rcvLPF_651[i],0.0);
|
||||
sum += rcvLPF_651[i];
|
||||
}
|
||||
}
|
||||
else {
|
||||
LPF = new signalVector(961);
|
||||
LPF->isRealOnly(true);
|
||||
itr = LPF->begin();
|
||||
for (int i = 0; i < filterLen; i++) {
|
||||
*itr++ = complex(sendLPF_961[i],0.0);
|
||||
sum += sendLPF_961[i];
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
float normFactor = gainDC/sum; //sqrtf(gainDC/vectorNorm2(*LPF));
|
||||
// normalize power
|
||||
|
|
Reference in New Issue