aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Tsou <tom@tsou.cc>2013-11-15 16:13:59 -0500
committerThomas Tsou <tom@tsou.cc>2013-11-15 23:35:07 -0500
commit477b77c558d3294cd3170fcea04ebe98a11465d9 (patch)
tree263e40a4e99448ad377e3b2ca305dbfca6f70540
parentd3fccea05fba7cb89bd467ccbfca63404507395a (diff)
Transceiver52M: Remove unused code
This includes unknown and unused variables, functions, and non-relevant documentation. Signed-off-by: Thomas Tsou <tom@tsou.cc>
-rw-r--r--Transceiver52M/README.Talgorithm15
-rw-r--r--Transceiver52M/Transceiver.cpp22
-rw-r--r--Transceiver52M/radioInterface.cpp2
-rw-r--r--Transceiver52M/radioInterface.h4
-rw-r--r--Transceiver52M/sigProcLib.cpp20
-rw-r--r--Transceiver52M/sigProcLib.h8
6 files changed, 3 insertions, 68 deletions
diff --git a/Transceiver52M/README.Talgorithm b/Transceiver52M/README.Talgorithm
deleted file mode 100644
index 037d613..0000000
--- a/Transceiver52M/README.Talgorithm
+++ /dev/null
@@ -1,15 +0,0 @@
-Basic model:
-
-Have channel H = {h_0, h_1, ..., h_{K-1}}.
-Have received sequence Y = {y_0, ..., y_{K+N}}.
-Have transmitted sequence X = {x_0, ..., x_{N-1}}.
-Denote state S_n = {x_n, x_{n-1}, ..., x_{n-L}}.
-
-Define a bag as an unordered collection with two operations, add and take.
-We have three bags:
- S: a bag of survivors.
- F: a bag of available data structures.
-
-At time n, start with a non-empty bag S of survivors from time n-1.
-Take a member out of S, and create all possible branches and their corresponding metrics. If metric ratio is above T, discard branch. Otherwise, check branch against entry in pruning table P. If branch metric is smaller than the existing entry's metric in P, then replace entry with branch. Otherwise, discard branch.
-Once all possible branches of S have been created and pruned, S should be empty.Empty pruning table back into S, thus P is now empty. Repeat.
diff --git a/Transceiver52M/Transceiver.cpp b/Transceiver52M/Transceiver.cpp
index b31498b..e5f62bb 100644
--- a/Transceiver52M/Transceiver.cpp
+++ b/Transceiver52M/Transceiver.cpp
@@ -628,12 +628,11 @@ void Transceiver::driveControl(size_t chan)
sprintf(response, "RSP ADJPOWER 0 %d", mPower);
}
}
-#define FREQOFFSET 0//11.2e3
else if (strcmp(command,"RXTUNE")==0) {
// tune receiver
int freqKhz;
sscanf(buffer,"%3s %s %d",cmdcheck,command,&freqKhz);
- mRxFreq = freqKhz*1.0e3+FREQOFFSET;
+ mRxFreq = freqKhz * 1e3;
if (!mRadioInterface->tuneRx(mRxFreq, chan)) {
LOG(ALERT) << "RX failed to tune";
sprintf(response,"RSP RXTUNE 1 %d",freqKhz);
@@ -645,8 +644,7 @@ void Transceiver::driveControl(size_t chan)
// tune txmtr
int freqKhz;
sscanf(buffer,"%3s %s %d",cmdcheck,command,&freqKhz);
- //freqKhz = 890e3;
- mTxFreq = freqKhz*1.0e3+FREQOFFSET;
+ mTxFreq = freqKhz * 1e3;
if (!mRadioInterface->tuneTx(mTxFreq, chan)) {
LOG(ALERT) << "TX failed to tune";
sprintf(response,"RSP TXTUNE 1 %d",freqKhz);
@@ -706,23 +704,7 @@ bool Transceiver::driveTxPriorityQueue(size_t chan)
uint64_t frameNum = 0;
for (int i = 0; i < 4; i++)
frameNum = (frameNum << 8) | (0x0ff & buffer[i+1]);
-
- /*
- if (GSM::Time(frameNum,timeSlot) > mTransmitDeadlineClock + GSM::Time(51,0)) {
- // stale burst
- //LOG(DEBUG) << "FAST! "<< GSM::Time(frameNum,timeSlot);
- //writeClockInterface();
- }*/
-/*
- DAB -- Just let these go through the demod.
- if (GSM::Time(frameNum,timeSlot) < mTransmitDeadlineClock) {
- // stale burst from GSM core
- LOG(NOTICE) << "STALE packet on GSM->TRX interface at time "<< GSM::Time(frameNum,timeSlot);
- return false;
- }
-*/
-
// periodically update GSM core clock
LOG(DEBUG) << "mTransmitDeadlineClock " << mTransmitDeadlineClock
<< " mLastClockUpdateTime " << mLastClockUpdateTime;
diff --git a/Transceiver52M/radioInterface.cpp b/Transceiver52M/radioInterface.cpp
index 5bddb5c..ece92b9 100644
--- a/Transceiver52M/radioInterface.cpp
+++ b/Transceiver52M/radioInterface.cpp
@@ -38,7 +38,7 @@ RadioInterface::RadioInterface(RadioDevice *wRadio,
int wReceiveOffset, GSM::Time wStartTime)
: mRadio(wRadio), mSPSTx(sps), mSPSRx(1), mChans(chans), mMIMO(diversity),
sendCursor(0), recvCursor(0), underrun(false), overrun(false),
- receiveOffset(wReceiveOffset), mOn(false), loadTest(false)
+ receiveOffset(wReceiveOffset), mOn(false)
{
mClock.set(wStartTime);
}
diff --git a/Transceiver52M/radioInterface.h b/Transceiver52M/radioInterface.h
index b3f6b15..b88fe6b 100644
--- a/Transceiver52M/radioInterface.h
+++ b/Transceiver52M/radioInterface.h
@@ -59,10 +59,6 @@ protected:
bool mOn; ///< indicates radio is on
- bool loadTest;
- int mNumARFCNs;
- signalVector *finalVec, *finalVec9;
-
private:
/** format samples to USRP */
diff --git a/Transceiver52M/sigProcLib.cpp b/Transceiver52M/sigProcLib.cpp
index 3d2bba6..61bfe5b 100644
--- a/Transceiver52M/sigProcLib.cpp
+++ b/Transceiver52M/sigProcLib.cpp
@@ -1135,26 +1135,6 @@ bool multVector(signalVector &x,
return true;
}
-
-void offsetVector(signalVector &x,
- complex offset)
-{
- signalVector::iterator xP = x.begin();
- signalVector::iterator xPEnd = x.end();
- if (!x.isReal()) {
- while (xP < xPEnd) {
- *xP += offset;
- xP++;
- }
- }
- else {
- while (xP < xPEnd) {
- *xP = xP->real() + offset;
- xP++;
- }
- }
-}
-
bool generateMidamble(int sps, int tsc)
{
bool status = true;
diff --git a/Transceiver52M/sigProcLib.h b/Transceiver52M/sigProcLib.h
index 4df7b3f..7dedee4 100644
--- a/Transceiver52M/sigProcLib.h
+++ b/Transceiver52M/sigProcLib.h
@@ -146,14 +146,6 @@ complex peakDetect(const signalVector &rxBurst,
void scaleVector(signalVector &x,
complex scale);
-/**
- Add a constant offset to a vecotr.
- @param x The vector of interest.
- @param offset The offset.
-*/
-void offsetVector(signalVector &x,
- complex offset);
-
/**
Generate a modulated GSM midamble, stored within the library.
@param gsmPulse The GSM pulse used for modulation.