aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-07-04 16:27:47 +0200
committerpespin <pespin@sysmocom.de>2019-07-19 11:44:13 +0000
commitc3d68c159ff3a301f50bb95cd7d8248f2a766806 (patch)
tree4725564eae63eede9e5e3479dd78338f7c39812c
parent7ee2d10113700f0b3711ba99dfe1cd6abd4407b9 (diff)
sigProcLib: detectAnyBurst(): make TSC used to detect burst available to caller
This value will be sent in TRXDv1 protocol. Related: OS#4006 Change-Id: I603b7b52f957cf897b036dbaeb22c01a55de08c3
-rw-r--r--Transceiver52M/sigProcLib.cpp6
-rw-r--r--Transceiver52M/sigProcLib.h2
2 files changed, 7 insertions, 1 deletions
diff --git a/Transceiver52M/sigProcLib.cpp b/Transceiver52M/sigProcLib.cpp
index 52a6701..c22009a 100644
--- a/Transceiver52M/sigProcLib.cpp
+++ b/Transceiver52M/sigProcLib.cpp
@@ -1595,8 +1595,10 @@ static int detectRACHBurst(const signalVector &burst, float threshold, int sps,
for (i = 0; i < num_seq; i++) {
rc = detectGeneralBurst(burst, threshold, sps, target, head, tail,
gRACHSequences[i], ebp);
- if (rc > 0)
+ if (rc > 0) {
+ ebp->tsc = i;
break;
+ }
}
return rc;
@@ -1624,6 +1626,7 @@ static int analyzeTrafficBurst(const signalVector &burst, unsigned tsc, float th
tail = 6 + max_toa;
sync = gMidambles[tsc];
+ ebp->tsc = tsc;
rc = detectGeneralBurst(burst, threshold, sps, target, head, tail, sync, ebp);
return rc;
}
@@ -1642,6 +1645,7 @@ static int detectEdgeBurst(const signalVector &burst, unsigned tsc, float thresh
tail = 6 + max_toa;
sync = gEdgeMidambles[tsc];
+ ebp->tsc = tsc;
rc = detectGeneralBurst(burst, threshold, sps,
target, head, tail, sync, ebp);
return rc;
diff --git a/Transceiver52M/sigProcLib.h b/Transceiver52M/sigProcLib.h
index 8442cfc..6d4ca9b 100644
--- a/Transceiver52M/sigProcLib.h
+++ b/Transceiver52M/sigProcLib.h
@@ -105,10 +105,12 @@ float energyDetect(const signalVector &rxBurst,
/** Struct used to fill out parameters in detectAnyBurst(): estimated burst parameters
@param amplitude The estimated amplitude of received TSC burst.
@param toa The estimated time-of-arrival of received TSC burst (in symbols).
+@param tsc The TSC used to detect the burst.
*/
struct estim_burst_params {
complex amp;
float toa;
+ uint8_t tsc;
};
/**
8-PSK/GMSK/RACH burst detector