aboutsummaryrefslogtreecommitdiffstats
path: root/Transceiver52M/sigProcLibTest.cpp
diff options
context:
space:
mode:
authorThomas Tsou <tom@tsou.cc>2013-09-02 13:24:13 +0800
committerThomas Tsou <tom@tsou.cc>2013-09-02 13:27:11 +0800
commite01e1b3fa825cf7d80d5f0bb35062cb6db7cdc49 (patch)
tree2123a7ea2e4707c55e7c1a9aa890b75b6abac832 /Transceiver52M/sigProcLibTest.cpp
parentdbd27a60b6ed99fd6fd2339ffafccc0d759fa2fc (diff)
Transceiver52M: Rename samples-per-symbol variable names
Because repeatedly typing mSamplesPerSymbol is giving me carpal tunnel syndrome. Replace with the much shorter, easier to type, and just as clear name of 'sps'. Signed-off-by: Thomas Tsou <tom@tsou.cc>
Diffstat (limited to 'Transceiver52M/sigProcLibTest.cpp')
-rw-r--r--Transceiver52M/sigProcLibTest.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/Transceiver52M/sigProcLibTest.cpp b/Transceiver52M/sigProcLibTest.cpp
index 4f92717..f673fcd 100644
--- a/Transceiver52M/sigProcLibTest.cpp
+++ b/Transceiver52M/sigProcLibTest.cpp
@@ -44,13 +44,13 @@ int main(int argc, char **argv) {
gLogInit("sigProcLibTest","DEBUG");
- int samplesPerSymbol = 1;
+ int sps = 1;
int TSC = 2;
- sigProcLibSetup(samplesPerSymbol);
+ sigProcLibSetup(sps);
- signalVector *gsmPulse = generateGSMPulse(2,samplesPerSymbol);
+ signalVector *gsmPulse = generateGSMPulse(2,sps);
cout << *gsmPulse << endl;
BitVector RACHBurstStart = "01010101";
@@ -62,12 +62,12 @@ int main(int argc, char **argv) {
signalVector *RACHSeq = modulateBurst(RACHBurst,
*gsmPulse,
9,
- samplesPerSymbol);
+ sps);
- generateRACHSequence(*gsmPulse,samplesPerSymbol);
+ generateRACHSequence(*gsmPulse,sps);
complex a; float t;
- detectRACHBurst(*RACHSeq, 5, samplesPerSymbol,&a,&t);
+ detectRACHBurst(*RACHSeq, 5, sps,&a,&t);
//cout << *RACHSeq << endl;
//signalVector *autocorr = correlate(RACHSeq,RACHSeq,NULL,NO_DELAY);
@@ -95,11 +95,11 @@ int main(int argc, char **argv) {
BitVector normalBurst(BitVector(normalBurstSeg,gTrainingSequence[TSC]),normalBurstSeg);
- generateMidamble(*gsmPulse,samplesPerSymbol,TSC);
+ generateMidamble(*gsmPulse,sps,TSC);
signalVector *modBurst = modulateBurst(normalBurst,*gsmPulse,
- 0,samplesPerSymbol);
+ 0,sps);
//delayVector(*rsVector2,6.932);
@@ -127,13 +127,13 @@ int main(int argc, char **argv) {
signalVector *noise = gaussianNoise(modBurst->size(),noisePwr);
*/
float chanRespOffset;
- analyzeTrafficBurst(*modBurst,TSC,8.0,samplesPerSymbol,&ampl,&TOA,1,true,&chanResp,&chanRespOffset);
+ analyzeTrafficBurst(*modBurst,TSC,8.0,sps,&ampl,&TOA,1,true,&chanResp,&chanRespOffset);
//addVector(*modBurst,*noise);
cout << "ampl:" << ampl << endl;
cout << "TOA: " << TOA << endl;
//cout << "chanResp: " << *chanResp << endl;
- SoftVector *demodBurst = demodulateBurst(*modBurst,*gsmPulse,samplesPerSymbol,(complex) ampl, TOA);
+ SoftVector *demodBurst = demodulateBurst(*modBurst,*gsmPulse,sps,(complex) ampl, TOA);
cout << *demodBurst << endl;
@@ -146,7 +146,7 @@ int main(int argc, char **argv) {
COUT("b: " << *b);
- SoftSig *DFEBurst = equalizeBurst(*modBurst,TOA-chanRespOffset,samplesPerSymbol,*w,*b);
+ SoftSig *DFEBurst = equalizeBurst(*modBurst,TOA-chanRespOffset,sps,*w,*b);
COUT("DFEBurst: " << *DFEBurst);
delete gsmPulse;