laforge
/
openbts-osmo
Archived
1
0
Fork 0

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>
master
Thomas Tsou 11 years ago
parent 3800745c6a
commit 6445a3bf86
  1. 4
      public-trunk/Transceiver52M/Makefile.am
  2. 28
      public-trunk/Transceiver52M/rcvLPF_651.h
  3. 27
      public-trunk/Transceiver52M/sendLPF_961.h
  4. 31
      public-trunk/Transceiver52M/sigProcLib.cpp

@ -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,7 +1150,30 @@ 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
itr = LPF->begin();