Transceiver52M: Use multiple SCH correlation ranges

Setup two SCH detection ranges - full search and narrow search. Full
search correlates the full burst length to find for SCH detection.
Narrow uses a reduced search range, which is the same as that used for
RACH detection.

Narrow searching is enabled after the SCH is successfully decoded and
the MS is locked to the frame timing.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
This commit is contained in:
Thomas Tsou
2014-04-16 23:34:21 -04:00
parent 14bb9c923d
commit 98b1af896c
3 changed files with 24 additions and 7 deletions

View File

@@ -391,10 +391,13 @@ bool Transceiver::detectSCH(TransceiverState *state,
signalVector &burst,
complex &amp, float &toa)
{
int shift;
int shift, full;;
float mag, threshold = 7.0;
if (!detectSCHBurst(burst, threshold, mSPSRx, &amp, &toa))
full = (state->mode == TRX_MODE_MS_TRACK) ?
SCH_DETECT_NARROW : SCH_DETECT_FULL;
if (!detectSCHBurst(burst, threshold, mSPSRx, &amp, &toa, full))
return false;
std::cout << "SCH : Timing offset " << toa << " symbols" << std::endl;

View File

@@ -1497,7 +1497,7 @@ int detectSCHBurst(signalVector &burst,
float thresh,
int sps,
complex *amp,
float *toa)
float *toa, int state)
{
int rc, start, target, head, tail, len;
float _toa;
@@ -1508,10 +1508,19 @@ int detectSCHBurst(signalVector &burst,
if ((sps != 1) && (sps != 4))
return -1;
/* Search full length */
target = 3 + 39 + 64;
head = target - 1;
tail = 39 + 3 + 9;
switch (state) {
case SCH_DETECT_NARROW:
head = 4;
tail = 4;
break;
case SCH_DETECT_FULL:
default:
head = target - 1;
tail = 39 + 3 + 9;
break;
}
start = (target - head) * sps - 1;
len = (head + tail) * sps;

View File

@@ -188,11 +188,16 @@ int detectRACHBurst(signalVector &rxBurst,
complex *amplitude,
float* TOA);
enum {
SCH_DETECT_FULL,
SCH_DETECT_NARROW,
};
int detectSCHBurst(signalVector &rxBurst,
float detectThreshold,
int sps,
complex *amplitude,
float* TOA);
float* TOA, int state);
/**
Normal burst correlator, detector, channel estimator.