mirror of
https://github.com/PentHertz/OpenBTS.git
synced 2026-05-18 23:40:47 +00:00
Transceiver52M: Remove unused and unmaintained files
Test applications sigProcLibTest and USRPping are not used or maintained in Transceiver52M. This has been the case for many years. Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
This commit is contained in:
parent
42cc2d123d
commit
fdf71fb552
5 changed files with 1 additions and 336 deletions
|
|
@ -64,9 +64,7 @@ libtransceiver_la_SOURCES = \
|
||||||
radioInterfaceResamp.cpp
|
radioInterfaceResamp.cpp
|
||||||
|
|
||||||
noinst_PROGRAMS = \
|
noinst_PROGRAMS = \
|
||||||
USRPping \
|
transceiver
|
||||||
transceiver \
|
|
||||||
sigProcLibTest
|
|
||||||
|
|
||||||
noinst_HEADERS = \
|
noinst_HEADERS = \
|
||||||
Complex.h \
|
Complex.h \
|
||||||
|
|
@ -84,35 +82,20 @@ noinst_HEADERS = \
|
||||||
convolve.h \
|
convolve.h \
|
||||||
convert.h
|
convert.h
|
||||||
|
|
||||||
USRPping_SOURCES = USRPping.cpp
|
|
||||||
USRPping_LDADD = \
|
|
||||||
libtransceiver.la \
|
|
||||||
$(COMMON_LA) $(SQLITE_LA)
|
|
||||||
|
|
||||||
transceiver_SOURCES = runTransceiver.cpp
|
transceiver_SOURCES = runTransceiver.cpp
|
||||||
transceiver_LDADD = \
|
transceiver_LDADD = \
|
||||||
libtransceiver.la \
|
libtransceiver.la \
|
||||||
$(GSM_LA) \
|
$(GSM_LA) \
|
||||||
$(COMMON_LA) $(SQLITE_LA)
|
$(COMMON_LA) $(SQLITE_LA)
|
||||||
|
|
||||||
sigProcLibTest_SOURCES = sigProcLibTest.cpp
|
|
||||||
sigProcLibTest_LDADD = \
|
|
||||||
libtransceiver.la \
|
|
||||||
$(GSM_LA) \
|
|
||||||
$(COMMON_LA) $(SQLITE_LA)
|
|
||||||
|
|
||||||
#uhd wins
|
#uhd wins
|
||||||
if UHD
|
if UHD
|
||||||
libtransceiver_la_SOURCES += UHDDevice.cpp
|
libtransceiver_la_SOURCES += UHDDevice.cpp
|
||||||
transceiver_LDADD += $(UHD_LIBS)
|
transceiver_LDADD += $(UHD_LIBS)
|
||||||
USRPping_LDADD += $(UHD_LIBS)
|
|
||||||
sigProcLibTest_LDADD += $(UHD_LIBS)
|
|
||||||
else
|
else
|
||||||
if USRP1
|
if USRP1
|
||||||
libtransceiver_la_SOURCES += USRPDevice.cpp
|
libtransceiver_la_SOURCES += USRPDevice.cpp
|
||||||
transceiver_LDADD += $(USRP_LIBS)
|
transceiver_LDADD += $(USRP_LIBS)
|
||||||
USRPping_LDADD += $(USRP_LIBS)
|
|
||||||
sigProcLibTest_LDADD += $(USRP_LIBS)
|
|
||||||
else
|
else
|
||||||
#we should never be here, as one of the above mustbe defined for us to build
|
#we should never be here, as one of the above mustbe defined for us to build
|
||||||
endif
|
endif
|
||||||
|
|
@ -134,12 +117,3 @@ else
|
||||||
#we should never be here, as one of the above mustbe defined for us to build
|
#we should never be here, as one of the above mustbe defined for us to build
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
MOSTLYCLEANFILES +=
|
|
||||||
|
|
||||||
#radioInterface.cpp
|
|
||||||
#ComplexTest.cpp
|
|
||||||
#sigProcLibTest.cpp
|
|
||||||
#sweepGenerator.cpp
|
|
||||||
#testRadio.cpp
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,95 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright 2008, 2009 Free Software Foundation, Inc.
|
|
||||||
*
|
|
||||||
* This software is distributed under the terms of the GNU Public License.
|
|
||||||
* See the COPYING file in the main directory for details.
|
|
||||||
*
|
|
||||||
* This use of this software may be subject to additional restrictions.
|
|
||||||
* See the LEGAL file in the main directory for details.
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <Logger.h>
|
|
||||||
#include <Configuration.h>
|
|
||||||
#include "radioDevice.h"
|
|
||||||
|
|
||||||
ConfigurationTable gConfig;
|
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
int main(int argc, char *argv[]) {
|
|
||||||
|
|
||||||
// Configure logger.
|
|
||||||
if (argc>1) gLogInit(argv[1]);
|
|
||||||
else gLogInit("DEBUG");
|
|
||||||
//if (argc>2) gSetLogFile(argv[2]);
|
|
||||||
|
|
||||||
RadioDevice *usrp = RadioDevice::make(52.0e6/192.0, 1);
|
|
||||||
|
|
||||||
usrp->open();
|
|
||||||
|
|
||||||
TIMESTAMP timestamp;
|
|
||||||
|
|
||||||
usrp->setTxFreq(825.4e6);
|
|
||||||
usrp->setRxFreq(825.4e6);
|
|
||||||
|
|
||||||
usrp->start();
|
|
||||||
|
|
||||||
usrp->setRxGain(57);
|
|
||||||
|
|
||||||
LOG(INFO) << "Looping...";
|
|
||||||
bool underrun;
|
|
||||||
|
|
||||||
short data[]={0x00,0x02};
|
|
||||||
|
|
||||||
usrp->updateAlignment(20000);
|
|
||||||
usrp->updateAlignment(21000);
|
|
||||||
|
|
||||||
int numpkts = 1;
|
|
||||||
short data2[512*2*numpkts];
|
|
||||||
for (int i = 0; i < 512*numpkts; i++) {
|
|
||||||
data2[i<<1] = 10000;//4096*cos(2*3.14159*(i % 126)/126);
|
|
||||||
data2[(i<<1) + 1] = 10000;//4096*sin(2*3.14159*(i % 126)/126);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int i = 0; i < 1; i++)
|
|
||||||
usrp->writeSamples((short*) data2,512*numpkts,&underrun,102000+i*1000);
|
|
||||||
|
|
||||||
timestamp = 19000;
|
|
||||||
double sum = 0.0;
|
|
||||||
unsigned long num = 0;
|
|
||||||
while (1) {
|
|
||||||
short readBuf[512*2];
|
|
||||||
int rd = usrp->readSamples(readBuf,512,&underrun,timestamp);
|
|
||||||
if (rd) {
|
|
||||||
LOG(INFO) << "rcvd. data@:" << timestamp;
|
|
||||||
for (int i = 0; i < 512; i++) {
|
|
||||||
uint32_t *wordPtr = (uint32_t *) &readBuf[2*i];
|
|
||||||
printf ("%llu: %d %d\n", timestamp+i,readBuf[2*i],readBuf[2*i+1]);
|
|
||||||
sum += (readBuf[2*i+1]*readBuf[2*i+1] + readBuf[2*i]*readBuf[2*i]);
|
|
||||||
num++;
|
|
||||||
//if (num % 10000 == 0) printf("avg pwr: %f\n",sum/num);
|
|
||||||
}
|
|
||||||
timestamp += rd;
|
|
||||||
//usrp->writeSamples((short*) data2,512*numpkts,&underrun,timestamp+1000);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,159 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright 2011 Free Software Foundation, Inc.
|
|
||||||
* Copyright 2008, 2010 Kestrel Signal Processing, Inc.
|
|
||||||
*
|
|
||||||
* This software is distributed under the terms of the GNU Affero Public License.
|
|
||||||
* See the COPYING file in the main directory for details.
|
|
||||||
*
|
|
||||||
* This use of this software may be subject to additional restrictions.
|
|
||||||
* See the LEGAL file in the main directory for details.
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU Affero General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU Affero General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Affero General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
Contributors:
|
|
||||||
Harvind S. Samra, hssamra@kestrelsp.com
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#include "sigProcLib.h"
|
|
||||||
//#include "radioInterface.h"
|
|
||||||
#include <Logger.h>
|
|
||||||
#include <Configuration.h>
|
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
ConfigurationTable gConfig;
|
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
|
||||||
|
|
||||||
gLogInit("sigProcLibTest","DEBUG");
|
|
||||||
|
|
||||||
int samplesPerSymbol = 1;
|
|
||||||
|
|
||||||
int TSC = 2;
|
|
||||||
|
|
||||||
sigProcLibSetup(samplesPerSymbol);
|
|
||||||
|
|
||||||
BitVector RACHBurstStart = "01010101";
|
|
||||||
BitVector RACHBurstRest = "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";
|
|
||||||
|
|
||||||
BitVector RACHBurst(BitVector(RACHBurstStart,gRACHSynchSequence),RACHBurstRest);
|
|
||||||
|
|
||||||
|
|
||||||
signalVector *RACHSeq = modulateBurst(RACHBurst,
|
|
||||||
9,
|
|
||||||
samplesPerSymbol);
|
|
||||||
|
|
||||||
complex a; float t;
|
|
||||||
detectRACHBurst(*RACHSeq, 5, samplesPerSymbol,&a,&t);
|
|
||||||
|
|
||||||
//cout << *RACHSeq << endl;
|
|
||||||
//signalVector *autocorr = correlate(RACHSeq,RACHSeq,NULL,NO_DELAY);
|
|
||||||
|
|
||||||
//cout << *autocorr;
|
|
||||||
|
|
||||||
//exit(1);
|
|
||||||
|
|
||||||
|
|
||||||
/*signalVector x(6500);
|
|
||||||
x.fill(1.0);
|
|
||||||
|
|
||||||
frequencyShift(&x,&x,0.48*M_PI);
|
|
||||||
|
|
||||||
signalVector *y = polyphaseResampleVector(x,96,65,NULL);
|
|
||||||
|
|
||||||
cout << *y << endl;
|
|
||||||
|
|
||||||
exit(1);*/
|
|
||||||
|
|
||||||
//CommSig normalBurstSeg = "0000000000000000000000000000000000000000000000000000000000000";
|
|
||||||
|
|
||||||
BitVector normalBurstSeg = "0000101010100111110010101010010110101110011000111001101010000";
|
|
||||||
|
|
||||||
BitVector normalBurst(BitVector(normalBurstSeg,gTrainingSequence[TSC]),normalBurstSeg);
|
|
||||||
|
|
||||||
generateMidamble(samplesPerSymbol,TSC);
|
|
||||||
|
|
||||||
signalVector *modBurst = modulateBurst(normalBurst,0,samplesPerSymbol);
|
|
||||||
|
|
||||||
|
|
||||||
//delayVector(*rsVector2,6.932);
|
|
||||||
|
|
||||||
complex ampl = 1;
|
|
||||||
float TOA = 0;
|
|
||||||
|
|
||||||
//modBurst = rsVector2;
|
|
||||||
//delayVector(*modBurst,0.8);
|
|
||||||
|
|
||||||
/*
|
|
||||||
signalVector channelResponse(4);
|
|
||||||
signalVector::iterator c=channelResponse.begin();
|
|
||||||
*c = (complex) 9000.0; c++;
|
|
||||||
*c = (complex) 0.4*9000.0; c++; c++;
|
|
||||||
*c = (complex) -1.2*0;
|
|
||||||
|
|
||||||
signalVector *guhBurst = convolve(modBurst,&channelResponse,NULL,NO_DELAY);
|
|
||||||
delete modBurst; modBurst = guhBurst;
|
|
||||||
*/
|
|
||||||
|
|
||||||
signalVector *chanResp;
|
|
||||||
/*
|
|
||||||
double noisePwr = 0.001/sqrtf(2);
|
|
||||||
signalVector *noise = gaussianNoise(modBurst->size(),noisePwr);
|
|
||||||
*/
|
|
||||||
float chanRespOffset;
|
|
||||||
analyzeTrafficBurst(*modBurst,TSC,8.0,samplesPerSymbol,&l,&TOA,1,true,&chanResp,&chanRespOffset);
|
|
||||||
//addVector(*modBurst,*noise);
|
|
||||||
|
|
||||||
cout << "ampl:" << ampl << endl;
|
|
||||||
cout << "TOA: " << TOA << endl;
|
|
||||||
//cout << "chanResp: " << *chanResp << endl;
|
|
||||||
SoftVector *demodBurst = demodulateBurst(*modBurst,samplesPerSymbol,(complex) ampl, TOA);
|
|
||||||
|
|
||||||
cout << *demodBurst << endl;
|
|
||||||
|
|
||||||
/*
|
|
||||||
COUT("chanResp: " << *chanResp);
|
|
||||||
|
|
||||||
signalVector *w,*b;
|
|
||||||
designDFE(*chanResp,1.0/noisePwr,7,&w,&b);
|
|
||||||
COUT("w: " << *w);
|
|
||||||
COUT("b: " << *b);
|
|
||||||
|
|
||||||
|
|
||||||
SoftSig *DFEBurst = equalizeBurst(*modBurst,TOA-chanRespOffset,samplesPerSymbol,*w,*b);
|
|
||||||
COUT("DFEBurst: " << *DFEBurst);
|
|
||||||
|
|
||||||
delete gsmPulse;
|
|
||||||
delete RACHSeq;
|
|
||||||
delete modBurst;
|
|
||||||
delete sendLPF;
|
|
||||||
delete rcvLPF;
|
|
||||||
delete rsVector;
|
|
||||||
//delete rsVector2;
|
|
||||||
delete autocorr;
|
|
||||||
delete chanResp;
|
|
||||||
delete noise;
|
|
||||||
delete demodBurst;
|
|
||||||
delete w;
|
|
||||||
delete b;
|
|
||||||
delete DFEBurst;
|
|
||||||
*/
|
|
||||||
|
|
||||||
sigProcLibDestroy();
|
|
||||||
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue