aboutsummaryrefslogtreecommitdiffstats
path: root/Transceiver52M/Transceiver.cpp
diff options
context:
space:
mode:
authorThomas Tsou <tom@tsou.cc>2013-08-20 21:17:19 -0400
committerThomas Tsou <tom@tsou.cc>2013-10-18 13:10:17 -0400
commit8181b0104acd78f8e4a1ddb6df105cab24bba4c1 (patch)
tree37bd022dc8e8278f08087b3e9fd6dfb1181744fb /Transceiver52M/Transceiver.cpp
parent9471d7635abeb9b5c87227d64e452890da0e65bd (diff)
Transceiver52M: Disable energy detector
The adaptive energy threshold gating suffers a near-far problem at certain gain levels. This is due to exponential threshold raising, but linear decreases. A large signal level followed by a period low signal level causes (comparatively) weak signals to go undetected. Additionally, the algorithm performs differently at multiple RF gain levels. This patch switches solely to correlation based gating for burst detection. The main computational load with this approach is sub-sample width peak interpolation, which we disable for intial detection and run after threshold passing. Signed-off-by: Thomas Tsou <tom@tsou.cc>
Diffstat (limited to 'Transceiver52M/Transceiver.cpp')
-rw-r--r--Transceiver52M/Transceiver.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Transceiver52M/Transceiver.cpp b/Transceiver52M/Transceiver.cpp
index f09f036..ad048ee 100644
--- a/Transceiver52M/Transceiver.cpp
+++ b/Transceiver52M/Transceiver.cpp
@@ -327,6 +327,7 @@ SoftVector *Transceiver::pullRadioVector(GSM::Time &wTime,
complex amplitude = 0.0;
float TOA = 0.0;
float avgPwr = 0.0;
+#ifdef ENERGY_DETECT
if (!energyDetect(*vectorBurst, 20 * mSPS, mEnergyThreshold, &avgPwr)) {
LOG(DEBUG) << "Estimated Energy: " << sqrt(avgPwr) << ", at time " << rxBurst->getTime();
double framesElapsed = rxBurst->getTime()-prevFalseDetectionTime;
@@ -341,7 +342,7 @@ SoftVector *Transceiver::pullRadioVector(GSM::Time &wTime,
return NULL;
}
LOG(DEBUG) << "Estimated Energy: " << sqrt(avgPwr) << ", at time " << rxBurst->getTime();
-
+#endif
// run the proper correlator
bool success = false;
if (corrType==TSC) {