aboutsummaryrefslogtreecommitdiffstats
path: root/Transceiver52M/radioVector.h
diff options
context:
space:
mode:
authorThomas Tsou <tom@tsou.cc>2013-10-17 21:23:34 -0400
committerThomas Tsou <tom@tsou.cc>2013-10-18 13:10:18 -0400
commitfa3a787ccbb250d929ebf78993047dd05e8765cb (patch)
tree4f14ca9fd9b87824ada664593cc24a70eadc1c54 /Transceiver52M/radioVector.h
parent010fff783bf658e79b0b32ad64a44af4e3f22b1e (diff)
Transceiver52M: Update noise measurement calculation
Previous removal of the energy detector requirement broke the noise level calculation loop. The previous adaptive approach was finicky - noticably at high gain levels. Since we no longer use the energy threshold for primary burst gating, we can return to a simpler world. In the new approach, we compute a running average of energy levels and track them with a noise vector. A timeslot that passes the correlator threshold is a valid burst. These are not used in the noise calculation. Everything else is considered noise and used to compute the noise level with respect to full scale input level, which for almost all supported devices is 2^15. Signed-off-by: Thomas Tsou <tom@tsou.cc>
Diffstat (limited to 'Transceiver52M/radioVector.h')
-rw-r--r--Transceiver52M/radioVector.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/Transceiver52M/radioVector.h b/Transceiver52M/radioVector.h
index 8de4493..8dc1c13 100644
--- a/Transceiver52M/radioVector.h
+++ b/Transceiver52M/radioVector.h
@@ -37,6 +37,16 @@ private:
GSM::Time mTime;
};
+class noiseVector : std::vector<float> {
+public:
+ noiseVector(size_t len = 0);
+ bool insert(float val);
+ float avg();
+
+private:
+ std::vector<float>::iterator it;
+};
+
class VectorFIFO {
public:
unsigned size();