aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Wild <ewild@sysmocom.de>2022-05-08 20:14:14 +0200
committerEric Wild <ewild@sysmocom.de>2022-05-09 01:18:20 +0200
commit46bbdf0ace983dfe1ed7c7310b976ea863adf885 (patch)
treeca13b1a1128275a8cf3b46e3bd1105e8e0d9f2da
parentd40300ec63a80c2d8babd8926dbb72ba1a2a8e4a (diff)
rename noisevector class -> avgvector
The vectors feature is averaging, and not adding noise.
-rw-r--r--Transceiver52M/Transceiver.h2
-rw-r--r--Transceiver52M/Transceiver2.h2
-rw-r--r--Transceiver52M/radioVector.cpp10
-rw-r--r--Transceiver52M/radioVector.h4
4 files changed, 9 insertions, 9 deletions
diff --git a/Transceiver52M/Transceiver.h b/Transceiver52M/Transceiver.h
index 45a4159..0389e60 100644
--- a/Transceiver52M/Transceiver.h
+++ b/Transceiver52M/Transceiver.h
@@ -80,7 +80,7 @@ struct TransceiverState {
/* Received noise energy levels */
float mNoiseLev;
- noiseVector mNoises;
+ avgVector mNoises;
/* Shadowed downlink attenuation */
int mPower;
diff --git a/Transceiver52M/Transceiver2.h b/Transceiver52M/Transceiver2.h
index e5579f4..913ee1e 100644
--- a/Transceiver52M/Transceiver2.h
+++ b/Transceiver52M/Transceiver2.h
@@ -69,7 +69,7 @@ struct TransceiverState {
bool mRetrans;
/* Received noise energy levels */
- noiseVector mFreqOffsets;
+ avgVector mFreqOffsets;
/* Store pointers to previous frame */
radioVector *prevFrame[8];
diff --git a/Transceiver52M/radioVector.cpp b/Transceiver52M/radioVector.cpp
index 2e85d7a..ceff2ad 100644
--- a/Transceiver52M/radioVector.cpp
+++ b/Transceiver52M/radioVector.cpp
@@ -76,12 +76,12 @@ bool radioVector::setVector(signalVector *vector, size_t chan)
return true;
}
-noiseVector::noiseVector(size_t size)
+avgVector::avgVector(size_t size)
: std::vector<float>(size), itr(0)
{
}
-float noiseVector::avg() const
+float avgVector::avg() const
{
float val = 0.0;
@@ -94,7 +94,7 @@ float noiseVector::avg() const
return val / (float) size();
}
-bool noiseVector::insert(float val)
+bool avgVector::insert(float val)
{
if (size() < max) {
push_back(val);
@@ -109,12 +109,12 @@ bool noiseVector::insert(float val)
return true;
}
-bool noiseVector::full() const
+bool avgVector::full() const
{
return size() >= max;
}
-void noiseVector::reset()
+void avgVector::reset()
{
resize(0);
}
diff --git a/Transceiver52M/radioVector.h b/Transceiver52M/radioVector.h
index 2cb2806..8b90a63 100644
--- a/Transceiver52M/radioVector.h
+++ b/Transceiver52M/radioVector.h
@@ -48,9 +48,9 @@ private:
GSM::Time mTime;
};
-class noiseVector : std::vector<float> {
+class avgVector : std::vector<float> {
public:
- noiseVector(size_t size = 0);
+ avgVector(size_t size = 0);
bool insert(float val);
bool full() const;
float avg() const;