aboutsummaryrefslogtreecommitdiffstats
path: root/Transceiver52M/Transceiver.cpp
diff options
context:
space:
mode:
authorAlexander Chemeris <Alexander.Chemeris@gmail.com>2017-03-17 15:24:18 -0700
committerAlexander Chemeris <Alexander.Chemeris@gmail.com>2017-03-24 14:59:24 -0700
commit4e6c938024031f2dc6d891b75cdd48c5846afba8 (patch)
tree18e2e3e1176cc28cf780a61d1de2620fadc0b1da /Transceiver52M/Transceiver.cpp
parent4aa548f0c2da2c505624807b3b027eaccf5aa98a (diff)
Move Transceiver::detectBurst() to sigProcLib to make it reusable.
Diffstat (limited to 'Transceiver52M/Transceiver.cpp')
-rw-r--r--Transceiver52M/Transceiver.cpp35
1 files changed, 2 insertions, 33 deletions
diff --git a/Transceiver52M/Transceiver.cpp b/Transceiver52M/Transceiver.cpp
index c1a63fd..e37c08e 100644
--- a/Transceiver52M/Transceiver.cpp
+++ b/Transceiver52M/Transceiver.cpp
@@ -542,38 +542,6 @@ CorrType Transceiver::expectedCorrType(GSM::Time currTime,
}
}
-int Transceiver::detectBurst(signalVector &burst,
- complex &amp, float &toa, CorrType type)
-{
- int rc = 0;
-
- switch (type) {
- case EDGE:
- rc = detectEdgeBurst(burst, mTSC, BURST_THRESH, mSPSRx,
- amp, toa, mMaxExpectedDelayNB);
- if (rc > 0)
- break;
- else
- type = TSC;
- case TSC:
- rc = analyzeTrafficBurst(burst, mTSC, BURST_THRESH, mSPSRx,
- amp, toa, mMaxExpectedDelayNB);
- break;
- case RACH:
- rc = detectRACHBurst(burst, BURST_THRESH, mSPSRx, amp, toa,
- mMaxExpectedDelayAB);
- break;
- default:
- LOG(ERR) << "Invalid correlation type";
- }
-
- if (rc > 0)
- return type;
-
- return rc;
-}
-
-
/*
* Demodulate GMSK by direct rotation and soft slicing.
*/
@@ -679,7 +647,8 @@ SoftVector *Transceiver::pullRadioVector(GSM::Time &wTime, double &RSSI, bool &i
}
/* Detect normal or RACH bursts */
- rc = detectBurst(*burst, amp, toa, type);
+ rc = detectAnyBurst(*burst, mTSC, BURST_THRESH, mSPSRx, type, amp, toa,
+ (type==RACH)?mMaxExpectedDelayAB:mMaxExpectedDelayNB);
if (rc > 0) {
type = (CorrType) rc;