[MERGED] osmo-trx[master]: sigProcLib: Fix documentation, sync argument names in .cpp a...

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Alexander Chemeris gerrit-no-reply at lists.osmocom.org
Mon Mar 20 18:43:07 UTC 2017


Alexander Chemeris has submitted this change and it was merged.

Change subject: sigProcLib: Fix documentation, sync argument names in .cpp and .h files.
......................................................................


sigProcLib: Fix documentation, sync argument names in .cpp and .h files.

Documentation in sigProcLib.h was noticeably out of sync with the actual
implementation - e.g. not all arguments were documented and arguments
which are already removed are still in the documentation. Also argument
names were different between declaration in .h and implementation in .cpp
which was confusing.

I've fixed this for detect*Burst() functions.

Change-Id: I4dfd07125d9a1e9a42a78b79faff539f003deb16
---
M Transceiver52M/sigProcLib.cpp
M Transceiver52M/sigProcLib.h
2 files changed, 49 insertions(+), 47 deletions(-)

Approvals:
  Tom Tsou: Looks good to me, approved
  Harald Welte: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/Transceiver52M/sigProcLib.cpp b/Transceiver52M/sigProcLib.cpp
index 2a22e49..c1cf12e 100644
--- a/Transceiver52M/sigProcLib.cpp
+++ b/Transceiver52M/sigProcLib.cpp
@@ -1876,22 +1876,22 @@
  *   head: Search 8 symbols before target
  *   tail: Search 8 symbols + maximum expected delay
  */
-int detectRACHBurst(signalVector &rxBurst,
-            float thresh,
+int detectRACHBurst(signalVector &burst,
+            float threshold,
             int sps,
-            complex &amp,
+            complex &amplitude,
             float &toa,
-            unsigned maxTOA)
+            unsigned max_toa)
 {
   int rc, target, head, tail;
   CorrelationSequence *sync;
 
   target = 8 + 40;
   head = 8;
-  tail = 8 + maxTOA;
+  tail = 8 + max_toa;
   sync = gRACHSequence;
 
-  rc = detectGeneralBurst(rxBurst, thresh, sps, amp, toa,
+  rc = detectGeneralBurst(burst, threshold, sps, amplitude, toa,
                           target, head, tail, sync);
 
   return rc;
@@ -1905,8 +1905,8 @@
  *   head: Search 6 symbols before target
  *   tail: Search 6 symbols + maximum expected delay
  */
-int analyzeTrafficBurst(signalVector &rxBurst, unsigned tsc, float thresh,
-                        int sps, complex &amp, float &toa, unsigned max_toa)
+int analyzeTrafficBurst(signalVector &burst, unsigned tsc, float threshold,
+                        int sps, complex &amplitude, float &toa, unsigned max_toa)
 {
   int rc, target, head, tail;
   CorrelationSequence *sync;
@@ -1919,13 +1919,13 @@
   tail = 6 + max_toa;
   sync = gMidambles[tsc];
 
-  rc = detectGeneralBurst(rxBurst, thresh, sps, amp, toa,
+  rc = detectGeneralBurst(burst, threshold, sps, amplitude, toa,
                           target, head, tail, sync);
   return rc;
 }
 
-int detectEdgeBurst(signalVector &rxBurst, unsigned tsc, float thresh,
-                    int sps, complex &amp, float &toa, unsigned max_toa)
+int detectEdgeBurst(signalVector &burst, unsigned tsc, float threshold,
+                    int sps, complex &amplitude, float &toa, unsigned max_toa)
 {
   int rc, target, head, tail;
   CorrelationSequence *sync;
@@ -1938,7 +1938,7 @@
   tail = 6 + max_toa;
   sync = gEdgeMidambles[tsc];
 
-  rc = detectGeneralBurst(rxBurst, thresh, sps, amp, toa,
+  rc = detectGeneralBurst(burst, threshold, sps, amplitude, toa,
                           target, head, tail, sync);
   return rc;
 }
diff --git a/Transceiver52M/sigProcLib.h b/Transceiver52M/sigProcLib.h
index b4aee93..1b646cd 100644
--- a/Transceiver52M/sigProcLib.h
+++ b/Transceiver52M/sigProcLib.h
@@ -189,69 +189,71 @@
                   float *avgPwr = NULL);
 
 /**
-        RACH correlator/detector.
-        @param rxBurst The received GSM burst of interest.
-        @param detectThreshold The threshold that the received burst's post-correlator SNR is compared against to determine validity.
+        RACH aka Access Burst correlator/detector.
+        @param burst The received GSM burst of interest.
+        @param threshold The threshold that the received burst's post-correlator SNR is compared against to determine validity.
         @param sps The number of samples per GSM symbol.
         @param amplitude The estimated amplitude of received RACH burst.
-        @param TOA The estimate time-of-arrival of received RACH burst.
-        @param maxTOA The maximum expected time-of-arrival
-        @return positive if threshold value is reached, negative on error, zero otherwise
+        @param toa The estimate time-of-arrival of received RACH burst.
+        @param max_toa The maximum expected time-of-arrival
+        @return 1 if threshold value is reached,
+                negative value (-SignalError) on error,
+                zero (SIGERR_NONE) if no burst is detected
 */
-int detectRACHBurst(signalVector &rxBurst,
-                    float detectThreshold,
+int detectRACHBurst(signalVector &burst,
+                    float threshold,
                     int sps,
                     complex &amplitude,
-                    float &TOA,
-                    unsigned maxTOA);
+                    float &toa,
+                    unsigned max_toa);
 
 /**
-        Normal burst correlator, detector, channel estimator.
+        GMSK Normal Burst correlator/detector.
         @param rxBurst The received GSM burst of interest.
- 
-        @param detectThreshold The threshold that the received burst's post-correlator SNR is compared against to determine validity.
+        @param tsc Midamble type (0..7) also known as TSC
+        @param threshold The threshold that the received burst's post-correlator SNR is compared against to determine validity.
         @param sps The number of samples per GSM symbol.
         @param amplitude The estimated amplitude of received TSC burst.
-        @param TOA The estimate time-of-arrival of received TSC burst.
-        @param maxTOA The maximum expected time-of-arrival
-        @param requestChannel Set to true if channel estimation is desired.
-        @param channelResponse The estimated channel.
-        @param channelResponseOffset The time offset b/w the first sample of the channel response and the reported TOA.
-        @return positive if threshold value is reached, negative on error, zero otherwise
+        @param toa The estimate time-of-arrival of received TSC burst.
+        @param max_toa The maximum expected time-of-arrival
+        @return 1 if threshold value is reached,
+                negative value (-SignalError) on error,
+                zero (SIGERR_NONE) if no burst is detected
 */
-int analyzeTrafficBurst(signalVector &rxBurst,
-                        unsigned TSC,
-                        float detectThreshold,
+int analyzeTrafficBurst(signalVector &burst,
+                        unsigned tsc,
+                        float threshold,
                         int sps,
                         complex &amplitude,
-                        float &TOA,
-                        unsigned maxTOA);
+                        float &toa,
+                        unsigned max_toa);
 
 /**
-        EDGE burst detector
+        EDGE/8-PSK Normal Burst correlator/detector
         @param burst The received GSM burst of interest
- 
-        @param detectThreshold The threshold that the received burst's post-correlator SNR is compared against to determine validity.
+        @param tsc Midamble type (0..7) also known as TSC
+        @param threshold The threshold that the received burst's post-correlator SNR is compared against to determine validity.
         @param sps The number of samples per GSM symbol.
         @param amplitude The estimated amplitude of received TSC burst.
-        @param TOA The estimate time-of-arrival of received TSC burst.
-        @param maxTOA The maximum expected time-of-arrival
-        @return positive if threshold value is reached, negative on error, zero otherwise
+        @param toa The estimate time-of-arrival of received TSC burst.
+        @param max_toa The maximum expected time-of-arrival
+        @return 1 if threshold value is reached,
+                negative value (-SignalError) on error,
+                zero (SIGERR_NONE) if no burst is detected
 */
 int detectEdgeBurst(signalVector &burst,
-                    unsigned TSC,
-                    float detectThreshold,
+                    unsigned tsc,
+                    float threshold,
                     int sps,
                     complex &amplitude,
-                    float &TOA,
-                    unsigned maxTOA);
+                    float &toa,
+                    unsigned max_toa);
 
 /**
 	Downsample 4 SPS to 1 SPS using a polyphase filterbank
         @param burst Input burst of at least 624 symbols
         @return Decimated signal vector of 156 symbols
 */
-
 signalVector *downsampleBurst(signalVector &burst);
 
 /**

-- 
To view, visit https://gerrit.osmocom.org/2128
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I4dfd07125d9a1e9a42a78b79faff539f003deb16
Gerrit-PatchSet: 3
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: Alexander Chemeris <Alexander.Chemeris at gmail.com>
Gerrit-Reviewer: Alexander Chemeris <Alexander.Chemeris at gmail.com>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Tom Tsou <tom at tsou.cc>



More information about the gerrit-log mailing list