aboutsummaryrefslogtreecommitdiffstats
path: root/Transceiver52M
diff options
context:
space:
mode:
authorAlexander Chemeris <Alexander.Chemeris@gmail.com>2017-03-17 16:13:51 -0700
committerAlexander Chemeris <Alexander.Chemeris@gmail.com>2017-03-28 14:23:56 +0000
commit6e1dffd486745105e4662d4f5009ed0c34c79b66 (patch)
treea5194a963918f875715ba3bedf7cf7380e8c7092 /Transceiver52M
parent0229d22d2edc6b1320b0c71f3c8f54f4b21ed503 (diff)
Move Transceiver::demodulate() to sigProcLib to make it reusable.
Diffstat (limited to 'Transceiver52M')
-rw-r--r--Transceiver52M/Transceiver.cpp14
-rw-r--r--Transceiver52M/Transceiver.h4
-rw-r--r--Transceiver52M/sigProcLib.cpp9
-rw-r--r--Transceiver52M/sigProcLib.h4
4 files changed, 14 insertions, 17 deletions
diff --git a/Transceiver52M/Transceiver.cpp b/Transceiver52M/Transceiver.cpp
index d32967e..4616fea 100644
--- a/Transceiver52M/Transceiver.cpp
+++ b/Transceiver52M/Transceiver.cpp
@@ -533,18 +533,6 @@ CorrType Transceiver::expectedCorrType(GSM::Time currTime,
}
}
-/*
- * Demodulate GMSK by direct rotation and soft slicing.
- */
-SoftVector *Transceiver::demodulate(signalVector &burst, complex amp,
- float toa, CorrType type)
-{
- if (type == EDGE)
- return demodEdgeBurst(burst, mSPSRx, amp, toa);
-
- return demodGmskBurst(burst, mSPSRx, amp, toa);
-}
-
void writeToFile(radioVector *radio_burst, size_t chan)
{
GSM::Time time = radio_burst->getTime();
@@ -656,7 +644,7 @@ SoftVector *Transceiver::pullRadioVector(GSM::Time &wTime, double &RSSI, bool &i
timingOffset = toa;
- bits = demodulate(*burst, amp, toa, type);
+ bits = demodAnyBurst(*burst, mSPSRx, amp, toa, type);
delete radio_burst;
return bits;
diff --git a/Transceiver52M/Transceiver.h b/Transceiver52M/Transceiver.h
index 3c70e5c..6f9cb92 100644
--- a/Transceiver52M/Transceiver.h
+++ b/Transceiver52M/Transceiver.h
@@ -202,10 +202,6 @@ private:
/** send messages over the clock socket */
void writeClockInterface(void);
- /** Demodulate burst and output soft bits */
- SoftVector *demodulate(signalVector &burst,
- complex amp, float toa, CorrType type);
-
int mSPSTx; ///< number of samples per Tx symbol
int mSPSRx; ///< number of samples per Rx symbol
size_t mChans;
diff --git a/Transceiver52M/sigProcLib.cpp b/Transceiver52M/sigProcLib.cpp
index d57f8b4..467a203 100644
--- a/Transceiver52M/sigProcLib.cpp
+++ b/Transceiver52M/sigProcLib.cpp
@@ -2137,6 +2137,15 @@ SoftVector *demodEdgeBurst(signalVector &burst, int sps,
return bits;
}
+SoftVector *demodAnyBurst(signalVector &burst, int sps, complex amp,
+ float toa, CorrType type)
+{
+ if (type == EDGE)
+ return demodEdgeBurst(burst, sps, amp, toa);
+ else
+ return demodGmskBurst(burst, sps, amp, toa);
+}
+
bool sigProcLibSetup()
{
initTrigTables();
diff --git a/Transceiver52M/sigProcLib.h b/Transceiver52M/sigProcLib.h
index da009a5..a10d551 100644
--- a/Transceiver52M/sigProcLib.h
+++ b/Transceiver52M/sigProcLib.h
@@ -325,4 +325,8 @@ SoftVector *demodGmskBurst(signalVector &rxBurst, int sps,
SoftVector *demodEdgeBurst(signalVector &rxBurst, int sps,
complex channel, float TOA);
+/** Demodulate burst basde on type and output soft bits */
+SoftVector *demodAnyBurst(signalVector &burst, int sps,
+ complex amp, float toa, CorrType type);
+
#endif /* SIGPROCLIB_H */