mirror of
				https://github.com/fairwaves/openbts-2.8.git
				synced 2025-11-03 21:43:16 +00:00 
			
		
		
		
	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> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2689 19bc5d8c-e614-43d4-8b26-e1612bc8e597
This commit is contained in:
		@@ -72,7 +72,9 @@ noinst_HEADERS = \
 | 
			
		||||
	sigProcLib.h \
 | 
			
		||||
	Transceiver.h \
 | 
			
		||||
	USRPDevice.h \
 | 
			
		||||
	DummyLoad.h
 | 
			
		||||
	DummyLoad.h \
 | 
			
		||||
	rcvLPF_651.h \
 | 
			
		||||
	sendLPF_961.h
 | 
			
		||||
 | 
			
		||||
USRPping_SOURCES = USRPping.cpp
 | 
			
		||||
USRPping_LDADD = \
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										28
									
								
								Transceiver52M/rcvLPF_651.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								Transceiver52M/rcvLPF_651.h
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										27
									
								
								Transceiver52M/sendLPF_961.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								Transceiver52M/sendLPF_961.h
									
									
									
									
									
										Normal file
									
								
							
										
											
												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>
 | 
			
		||||
 | 
			
		||||
@@ -1171,7 +1173,7 @@ signalVector *createLPF(float cutoffFreq,
 | 
			
		||||
			int filterLen,
 | 
			
		||||
			float gainDC)
 | 
			
		||||
{
 | 
			
		||||
  
 | 
			
		||||
#if 0
 | 
			
		||||
  signalVector *LPF = new signalVector(filterLen-1);
 | 
			
		||||
  LPF->isRealOnly(true);
 | 
			
		||||
  LPF->setSymmetry(ABSSYM);
 | 
			
		||||
@@ -1187,11 +1189,34 @@ 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();
 | 
			
		||||
  for (int i = 1; i < filterLen; i++) {
 | 
			
		||||
  for (int i = 0; i < filterLen; i++) {
 | 
			
		||||
    *itr = *itr*normFactor;
 | 
			
		||||
    itr++;
 | 
			
		||||
  }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user