diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2019-07-04 13:02:12 +0200 |
---|---|---|
committer | pespin <pespin@sysmocom.de> | 2019-07-19 11:44:13 +0000 |
commit | 7ee2d10113700f0b3711ba99dfe1cd6abd4407b9 (patch) | |
tree | 38e50a4c4d520dc739a34cbdcb5485eb04a7693f /Transceiver52M/sigProcLib.h | |
parent | 252564b50ea585c02d30d422aa3afcff9df9a7f8 (diff) |
sigProcLib: detectAnyBurst() family: Use struct to gather all out params
Currently we have 2 out parameters, but in forthcoming commits will add
a third one. All those functions already have too many parameters, so
let's put together all the output params in a struct to pass them easily
and make it easier to understand they are the estimated output values.
Related: OS#4006
Change-Id: I05cfa0ceaa2e633a5e6e404e2eae497ff4442dea
Diffstat (limited to 'Transceiver52M/sigProcLib.h')
-rw-r--r-- | Transceiver52M/sigProcLib.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/Transceiver52M/sigProcLib.h b/Transceiver52M/sigProcLib.h index bae2127..8442cfc 100644 --- a/Transceiver52M/sigProcLib.h +++ b/Transceiver52M/sigProcLib.h @@ -101,15 +101,23 @@ void scaleVector(signalVector &x, */ float energyDetect(const signalVector &rxBurst, unsigned windowLength); + +/** 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). +*/ +struct estim_burst_params { + complex amp; + float toa; +}; /** 8-PSK/GMSK/RACH burst detector @param burst The received GSM burst of interest @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 (in symbols). @param max_toa The maximum expected time-of-arrival (in symbols). + @param ebp The estimated parameters of the detected burst. @return positive value (CorrType) if threshold value is reached, negative value (-SignalError) on error, zero (SIGERR_NONE) if no burst is detected @@ -119,9 +127,8 @@ int detectAnyBurst(const signalVector &burst, float threshold, int sps, CorrType type, - complex &, - float &toa, - unsigned max_toa); + unsigned max_toa, + struct estim_burst_params *ebp); /** Demodulate burst basde on type and output soft bits */ SoftVector *demodAnyBurst(const signalVector &burst, int sps, |