aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Chemeris <Alexander.Chemeris@gmail.com>2017-03-17 15:12:17 -0700
committerAlexander Chemeris <Alexander.Chemeris@gmail.com>2017-03-20 18:42:32 +0000
commit14d13b67dcd4fa35b03cbbef0c5ddd2622b89155 (patch)
tree73764441ba3d5a5c1eefdb96ab0a2d4f585c16e4
parent89bca9b2de2b1336ca405df5e881b5c2d98c3a36 (diff)
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
-rw-r--r--Transceiver52M/sigProcLib.cpp24
-rw-r--r--Transceiver52M/sigProcLib.h72
2 files changed, 49 insertions, 47 deletions
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 @@ int detectGeneralBurst(signalVector &rxBurst,
* 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 @@ int detectRACHBurst(signalVector &rxBurst,
* 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 @@ int analyzeTrafficBurst(signalVector &rxBurst, unsigned tsc, float thresh,
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 @@ int detectEdgeBurst(signalVector &rxBurst, unsigned tsc, float thresh,
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 @@ bool energyDetect(signalVector &rxBurst,
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);
/**