dburgess | b3a0ca4 | 2011-10-12 07:44:40 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2008 Free Software Foundation, Inc. |
| 3 | * |
| 4 | * This software is distributed under multiple licenses; see the COPYING file in the main directory for licensing information for this specific distribuion. |
| 5 | * |
| 6 | * This use of this software may be subject to additional restrictions. |
| 7 | * See the LEGAL file in the main directory for details. |
| 8 | |
| 9 | This program is distributed in the hope that it will be useful, |
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 12 | |
| 13 | */ |
| 14 | |
kurtis.heimerl | 8aea56e | 2011-11-26 03:18:30 +0000 | [diff] [blame] | 15 | #ifndef SIGPROCLIB_H |
| 16 | #define SIGPROCLIB_H |
dburgess | b3a0ca4 | 2011-10-12 07:44:40 +0000 | [diff] [blame] | 17 | |
| 18 | #include "Vector.h" |
| 19 | #include "Complex.h" |
Alexander Chemeris | d734e2d | 2013-06-16 14:30:58 +0400 | [diff] [blame] | 20 | #include "BitVector.h" |
Thomas Tsou | 20eb6d6 | 2013-11-09 14:30:41 -0500 | [diff] [blame] | 21 | #include "signalVector.h" |
dburgess | b3a0ca4 | 2011-10-12 07:44:40 +0000 | [diff] [blame] | 22 | |
Tom Tsou | b0aefcb | 2016-03-06 03:44:34 -0800 | [diff] [blame] | 23 | /* Burst lengths */ |
Alexander Chemeris | 0229d22 | 2017-03-17 16:03:17 -0700 | [diff] [blame^] | 24 | #define NORMAL_BURST_NBITS 148 |
| 25 | #define EDGE_BURST_NBITS 444 |
| 26 | #define EDGE_BURST_NSYMS (EDGE_BURST_NBITS / 3) |
Tom Tsou | b0aefcb | 2016-03-06 03:44:34 -0800 | [diff] [blame] | 27 | |
dburgess | b3a0ca4 | 2011-10-12 07:44:40 +0000 | [diff] [blame] | 28 | /** Convolution type indicator */ |
kurtis.heimerl | 3b8ad24 | 2011-11-26 03:18:19 +0000 | [diff] [blame] | 29 | enum ConvType { |
Thomas Tsou | 3eaae80 | 2013-08-20 19:31:14 -0400 | [diff] [blame] | 30 | START_ONLY, |
| 31 | NO_DELAY, |
| 32 | CUSTOM, |
| 33 | UNDEFINED, |
dburgess | b3a0ca4 | 2011-10-12 07:44:40 +0000 | [diff] [blame] | 34 | }; |
| 35 | |
Alexander Chemeris | f9e78be | 2017-03-17 15:00:34 -0700 | [diff] [blame] | 36 | /** Codes for burst types of received bursts*/ |
| 37 | enum CorrType{ |
| 38 | OFF, ///< timeslot is off |
| 39 | TSC, ///< timeslot should contain a normal burst |
| 40 | RACH, ///< timeslot should contain an access burst |
| 41 | EDGE, ///< timeslot should contain an EDGE burst |
| 42 | IDLE ///< timeslot is an idle (or dummy) burst |
| 43 | }; |
Alexander Chemeris | f7717ac | 2017-03-17 15:32:26 -0700 | [diff] [blame] | 44 | std::string corrTypeToString(CorrType corr); |
| 45 | std::ostream& operator<<(std::ostream& os, CorrType corr); |
Alexander Chemeris | f9e78be | 2017-03-17 15:00:34 -0700 | [diff] [blame] | 46 | |
Alexander Chemeris | 4aa548f | 2017-03-17 15:23:06 -0700 | [diff] [blame] | 47 | enum SignalError { |
Tom Tsou | 577cd02 | 2015-05-18 13:57:54 -0700 | [diff] [blame] | 48 | SIGERR_NONE, |
| 49 | SIGERR_BOUNDS, |
| 50 | SIGERR_CLIP, |
| 51 | SIGERR_UNSUPPORTED, |
| 52 | SIGERR_INTERNAL, |
| 53 | }; |
| 54 | |
Alexander Chemeris | b34e60c | 2017-03-17 15:29:09 -0700 | [diff] [blame] | 55 | /* |
| 56 | * Burst detection threshold |
| 57 | * |
| 58 | * Decision threshold value for burst gating on peak-to-average value of |
| 59 | * correlated synchronization sequences. Lower values pass more bursts up |
| 60 | * to upper layers but will increase the false detection rate. |
| 61 | */ |
| 62 | #define BURST_THRESH 4.0 |
| 63 | |
dburgess | b3a0ca4 | 2011-10-12 07:44:40 +0000 | [diff] [blame] | 64 | /** Convert a linear number to a dB value */ |
| 65 | float dB(float x); |
| 66 | |
| 67 | /** Convert a dB value into a linear value */ |
| 68 | float dBinv(float x); |
| 69 | |
| 70 | /** Compute the energy of a vector */ |
| 71 | float vectorNorm2(const signalVector &x); |
| 72 | |
| 73 | /** Compute the average power of a vector */ |
| 74 | float vectorPower(const signalVector &x); |
| 75 | |
| 76 | /** Setup the signal processing library */ |
Tom Tsou | 2079a3c | 2016-03-06 00:58:56 -0800 | [diff] [blame] | 77 | bool sigProcLibSetup(); |
dburgess | b3a0ca4 | 2011-10-12 07:44:40 +0000 | [diff] [blame] | 78 | |
| 79 | /** Destroy the signal processing library */ |
| 80 | void sigProcLibDestroy(void); |
| 81 | |
Alexander Chemeris | 0229d22 | 2017-03-17 16:03:17 -0700 | [diff] [blame^] | 82 | /** |
| 83 | Convolve two vectors. |
| 84 | @param a,b The vectors to be convolved. |
| 85 | @param c, A preallocated vector to hold the convolution result. |
| 86 | @param spanType The type/span of the convolution. |
| 87 | @return The convolution result or NULL on error. |
dburgess | b3a0ca4 | 2011-10-12 07:44:40 +0000 | [diff] [blame] | 88 | */ |
Thomas Tsou | 3f32ab5 | 2013-11-15 16:32:54 -0500 | [diff] [blame] | 89 | signalVector *convolve(const signalVector *a, const signalVector *b, |
| 90 | signalVector *c, ConvType spanType, |
| 91 | size_t start = 0, size_t len = 0, |
| 92 | size_t step = 1, int offset = 0); |
dburgess | b3a0ca4 | 2011-10-12 07:44:40 +0000 | [diff] [blame] | 93 | |
Alexander Chemeris | 0229d22 | 2017-03-17 16:03:17 -0700 | [diff] [blame^] | 94 | /** |
dburgess | b3a0ca4 | 2011-10-12 07:44:40 +0000 | [diff] [blame] | 95 | Frequency shift a vector. |
Alexander Chemeris | 0229d22 | 2017-03-17 16:03:17 -0700 | [diff] [blame^] | 96 | @param y The frequency shifted vector. |
| 97 | @param x The vector to-be-shifted. |
| 98 | @param freq The digital frequency shift |
| 99 | @param startPhase The starting phase of the oscillator |
| 100 | @param finalPhase The final phase of the oscillator |
| 101 | @return The frequency shifted vector. |
dburgess | b3a0ca4 | 2011-10-12 07:44:40 +0000 | [diff] [blame] | 102 | */ |
| 103 | signalVector* frequencyShift(signalVector *y, |
Alexander Chemeris | 0229d22 | 2017-03-17 16:03:17 -0700 | [diff] [blame^] | 104 | signalVector *x, |
| 105 | float freq = 0.0, |
| 106 | float startPhase = 0.0, |
| 107 | float *finalPhase=NULL); |
dburgess | b3a0ca4 | 2011-10-12 07:44:40 +0000 | [diff] [blame] | 108 | |
Alexander Chemeris | 0229d22 | 2017-03-17 16:03:17 -0700 | [diff] [blame^] | 109 | /** |
| 110 | Correlate two vectors. |
dburgess | b3a0ca4 | 2011-10-12 07:44:40 +0000 | [diff] [blame] | 111 | @param a,b The vectors to be correlated. |
| 112 | @param c, A preallocated vector to hold the correlation result. |
| 113 | @param spanType The type/span of the correlation. |
| 114 | @return The correlation result. |
| 115 | */ |
| 116 | signalVector* correlate(signalVector *a, |
Alexander Chemeris | 0229d22 | 2017-03-17 16:03:17 -0700 | [diff] [blame^] | 117 | signalVector *b, |
| 118 | signalVector *c, |
| 119 | ConvType spanType, |
dburgess | b3a0ca4 | 2011-10-12 07:44:40 +0000 | [diff] [blame] | 120 | bool bReversedConjugated = false, |
Alexander Chemeris | 0229d22 | 2017-03-17 16:03:17 -0700 | [diff] [blame^] | 121 | unsigned startIx = 0, |
| 122 | unsigned len = 0); |
dburgess | b3a0ca4 | 2011-10-12 07:44:40 +0000 | [diff] [blame] | 123 | |
Alexander Chemeris | 132fb24 | 2017-03-17 17:22:33 -0700 | [diff] [blame] | 124 | /** Operate soft slicer on a soft-bit vector */ |
| 125 | bool vectorSlicer(SoftVector *x); |
dburgess | b3a0ca4 | 2011-10-12 07:44:40 +0000 | [diff] [blame] | 126 | |
| 127 | /** GMSK modulate a GSM burst of bits */ |
| 128 | signalVector *modulateBurst(const BitVector &wBurst, |
Alexander Chemeris | 0229d22 | 2017-03-17 16:03:17 -0700 | [diff] [blame^] | 129 | int guardPeriodLength, |
| 130 | int sps, bool emptyPulse = false); |
dburgess | b3a0ca4 | 2011-10-12 07:44:40 +0000 | [diff] [blame] | 131 | |
Tom Tsou | d325343 | 2016-03-06 03:08:01 -0800 | [diff] [blame] | 132 | /** 8-PSK modulate a burst of bits */ |
| 133 | signalVector *modulateEdgeBurst(const BitVector &bits, |
| 134 | int sps, bool emptyPulse = false); |
| 135 | |
| 136 | /** Generate a EDGE burst with random payload - 4 SPS (625 samples) only */ |
| 137 | signalVector *generateEdgeBurst(int tsc); |
| 138 | |
Tom Tsou | 8ee2f38 | 2016-03-06 20:57:34 -0800 | [diff] [blame] | 139 | /** Generate an empty burst - 4 or 1 SPS */ |
| 140 | signalVector *generateEmptyBurst(int sps, int tn); |
| 141 | |
| 142 | /** Generate a normal GSM burst with random payload - 4 or 1 SPS */ |
| 143 | signalVector *genRandNormalBurst(int tsc, int sps, int tn); |
| 144 | |
Alexander Chemeris | 5efe050 | 2016-03-23 17:06:32 +0300 | [diff] [blame] | 145 | /** Generate an access GSM burst with random payload - 4 or 1 SPS */ |
Alexander Chemeris | 37c52c7 | 2016-03-25 18:28:34 +0300 | [diff] [blame] | 146 | signalVector *genRandAccessBurst(int delay, int sps, int tn); |
Alexander Chemeris | 5efe050 | 2016-03-23 17:06:32 +0300 | [diff] [blame] | 147 | |
Tom Tsou | 8ee2f38 | 2016-03-06 20:57:34 -0800 | [diff] [blame] | 148 | /** Generate a dummy GSM burst - 4 or 1 SPS */ |
| 149 | signalVector *generateDummyBurst(int sps, int tn); |
| 150 | |
dburgess | b3a0ca4 | 2011-10-12 07:44:40 +0000 | [diff] [blame] | 151 | /** Sinc function */ |
| 152 | float sinc(float x); |
| 153 | |
| 154 | /** Delay a vector */ |
Thomas Tsou | 94edaae | 2013-11-09 22:19:19 -0500 | [diff] [blame] | 155 | signalVector *delayVector(signalVector *in, signalVector *out, float delay); |
dburgess | b3a0ca4 | 2011-10-12 07:44:40 +0000 | [diff] [blame] | 156 | |
| 157 | /** Add two vectors in-place */ |
| 158 | bool addVector(signalVector &x, |
Alexander Chemeris | 0229d22 | 2017-03-17 16:03:17 -0700 | [diff] [blame^] | 159 | signalVector &y); |
dburgess | b3a0ca4 | 2011-10-12 07:44:40 +0000 | [diff] [blame] | 160 | |
| 161 | /** Multiply two vectors in-place*/ |
| 162 | bool multVector(signalVector &x, |
| 163 | signalVector &y); |
| 164 | |
| 165 | /** Generate a vector of gaussian noise */ |
| 166 | signalVector *gaussianNoise(int length, |
| 167 | float variance = 1.0, |
| 168 | complex mean = complex(0.0)); |
| 169 | |
| 170 | /** |
Alexander Chemeris | 0229d22 | 2017-03-17 16:03:17 -0700 | [diff] [blame^] | 171 | Given a non-integer index, interpolate a sample. |
| 172 | @param inSig The signal from which to interpolate. |
| 173 | @param ix The index. |
| 174 | @return The interpolated signal value. |
dburgess | b3a0ca4 | 2011-10-12 07:44:40 +0000 | [diff] [blame] | 175 | */ |
| 176 | complex interpolatePoint(const signalVector &inSig, |
Alexander Chemeris | 0229d22 | 2017-03-17 16:03:17 -0700 | [diff] [blame^] | 177 | float ix); |
dburgess | b3a0ca4 | 2011-10-12 07:44:40 +0000 | [diff] [blame] | 178 | |
| 179 | /** |
Alexander Chemeris | 0229d22 | 2017-03-17 16:03:17 -0700 | [diff] [blame^] | 180 | Given a correlator output, locate the correlation peak. |
| 181 | @param rxBurst The correlator result. |
| 182 | @param peakIndex Pointer to value to receive interpolated peak index. |
| 183 | @param avgPower Power to value to receive mean power. |
| 184 | @return Peak value. |
dburgess | b3a0ca4 | 2011-10-12 07:44:40 +0000 | [diff] [blame] | 185 | */ |
| 186 | complex peakDetect(const signalVector &rxBurst, |
Alexander Chemeris | 0229d22 | 2017-03-17 16:03:17 -0700 | [diff] [blame^] | 187 | float *peakIndex, |
| 188 | float *avgPwr); |
dburgess | b3a0ca4 | 2011-10-12 07:44:40 +0000 | [diff] [blame] | 189 | |
| 190 | /** |
| 191 | Apply a scalar to a vector. |
| 192 | @param x The vector of interest. |
| 193 | @param scale The scalar. |
| 194 | */ |
| 195 | void scaleVector(signalVector &x, |
Alexander Chemeris | 0229d22 | 2017-03-17 16:03:17 -0700 | [diff] [blame^] | 196 | complex scale); |
dburgess | b3a0ca4 | 2011-10-12 07:44:40 +0000 | [diff] [blame] | 197 | |
dburgess | b3a0ca4 | 2011-10-12 07:44:40 +0000 | [diff] [blame] | 198 | /** |
Alexander Chemeris | 1dd05cf | 2017-03-15 23:23:36 +0300 | [diff] [blame] | 199 | Rough energy estimator. |
| 200 | @param rxBurst A GSM burst. |
dburgess | b3a0ca4 | 2011-10-12 07:44:40 +0000 | [diff] [blame] | 201 | @param windowLength The number of burst samples used to compute burst energy |
Alexander Chemeris | 1dd05cf | 2017-03-15 23:23:36 +0300 | [diff] [blame] | 202 | @return The average power of the received burst. |
dburgess | b3a0ca4 | 2011-10-12 07:44:40 +0000 | [diff] [blame] | 203 | */ |
Alexander Chemeris | 1dd05cf | 2017-03-15 23:23:36 +0300 | [diff] [blame] | 204 | float energyDetect(signalVector &rxBurst, |
| 205 | unsigned windowLength); |
dburgess | b3a0ca4 | 2011-10-12 07:44:40 +0000 | [diff] [blame] | 206 | |
| 207 | /** |
Alexander Chemeris | 14d13b6 | 2017-03-17 15:12:17 -0700 | [diff] [blame] | 208 | RACH aka Access Burst correlator/detector. |
| 209 | @param burst The received GSM burst of interest. |
| 210 | @param threshold The threshold that the received burst's post-correlator SNR is compared against to determine validity. |
Thomas Tsou | d24cc2c | 2013-08-20 15:41:45 -0400 | [diff] [blame] | 211 | @param sps The number of samples per GSM symbol. |
dburgess | b3a0ca4 | 2011-10-12 07:44:40 +0000 | [diff] [blame] | 212 | @param amplitude The estimated amplitude of received RACH burst. |
Alexander Chemeris | 14d13b6 | 2017-03-17 15:12:17 -0700 | [diff] [blame] | 213 | @param toa The estimate time-of-arrival of received RACH burst. |
| 214 | @param max_toa The maximum expected time-of-arrival |
| 215 | @return 1 if threshold value is reached, |
| 216 | negative value (-SignalError) on error, |
| 217 | zero (SIGERR_NONE) if no burst is detected |
dburgess | b3a0ca4 | 2011-10-12 07:44:40 +0000 | [diff] [blame] | 218 | */ |
Alexander Chemeris | 14d13b6 | 2017-03-17 15:12:17 -0700 | [diff] [blame] | 219 | int detectRACHBurst(signalVector &burst, |
| 220 | float threshold, |
Thomas Tsou | 3eaae80 | 2013-08-20 19:31:14 -0400 | [diff] [blame] | 221 | int sps, |
Alexander Chemeris | 130a800 | 2015-06-09 20:52:11 -0400 | [diff] [blame] | 222 | complex &litude, |
Alexander Chemeris | 14d13b6 | 2017-03-17 15:12:17 -0700 | [diff] [blame] | 223 | float &toa, |
| 224 | unsigned max_toa); |
dburgess | b3a0ca4 | 2011-10-12 07:44:40 +0000 | [diff] [blame] | 225 | |
| 226 | /** |
Alexander Chemeris | 14d13b6 | 2017-03-17 15:12:17 -0700 | [diff] [blame] | 227 | GMSK Normal Burst correlator/detector. |
dburgess | b3a0ca4 | 2011-10-12 07:44:40 +0000 | [diff] [blame] | 228 | @param rxBurst The received GSM burst of interest. |
Alexander Chemeris | 14d13b6 | 2017-03-17 15:12:17 -0700 | [diff] [blame] | 229 | @param tsc Midamble type (0..7) also known as TSC |
| 230 | @param threshold The threshold that the received burst's post-correlator SNR is compared against to determine validity. |
Thomas Tsou | d24cc2c | 2013-08-20 15:41:45 -0400 | [diff] [blame] | 231 | @param sps The number of samples per GSM symbol. |
dburgess | b3a0ca4 | 2011-10-12 07:44:40 +0000 | [diff] [blame] | 232 | @param amplitude The estimated amplitude of received TSC burst. |
Alexander Chemeris | 14d13b6 | 2017-03-17 15:12:17 -0700 | [diff] [blame] | 233 | @param toa The estimate time-of-arrival of received TSC burst. |
| 234 | @param max_toa The maximum expected time-of-arrival |
| 235 | @return 1 if threshold value is reached, |
| 236 | negative value (-SignalError) on error, |
| 237 | zero (SIGERR_NONE) if no burst is detected |
dburgess | b3a0ca4 | 2011-10-12 07:44:40 +0000 | [diff] [blame] | 238 | */ |
Alexander Chemeris | 14d13b6 | 2017-03-17 15:12:17 -0700 | [diff] [blame] | 239 | int analyzeTrafficBurst(signalVector &burst, |
| 240 | unsigned tsc, |
| 241 | float threshold, |
Alexander Chemeris | 130a800 | 2015-06-09 20:52:11 -0400 | [diff] [blame] | 242 | int sps, |
| 243 | complex &litude, |
Alexander Chemeris | 14d13b6 | 2017-03-17 15:12:17 -0700 | [diff] [blame] | 244 | float &toa, |
| 245 | unsigned max_toa); |
dburgess | b3a0ca4 | 2011-10-12 07:44:40 +0000 | [diff] [blame] | 246 | |
| 247 | /** |
Alexander Chemeris | 14d13b6 | 2017-03-17 15:12:17 -0700 | [diff] [blame] | 248 | EDGE/8-PSK Normal Burst correlator/detector |
Tom Tsou | d325343 | 2016-03-06 03:08:01 -0800 | [diff] [blame] | 249 | @param burst The received GSM burst of interest |
Alexander Chemeris | 14d13b6 | 2017-03-17 15:12:17 -0700 | [diff] [blame] | 250 | @param tsc Midamble type (0..7) also known as TSC |
| 251 | @param threshold The threshold that the received burst's post-correlator SNR is compared against to determine validity. |
Tom Tsou | d325343 | 2016-03-06 03:08:01 -0800 | [diff] [blame] | 252 | @param sps The number of samples per GSM symbol. |
| 253 | @param amplitude The estimated amplitude of received TSC burst. |
Alexander Chemeris | 14d13b6 | 2017-03-17 15:12:17 -0700 | [diff] [blame] | 254 | @param toa The estimate time-of-arrival of received TSC burst. |
| 255 | @param max_toa The maximum expected time-of-arrival |
| 256 | @return 1 if threshold value is reached, |
| 257 | negative value (-SignalError) on error, |
| 258 | zero (SIGERR_NONE) if no burst is detected |
Tom Tsou | d325343 | 2016-03-06 03:08:01 -0800 | [diff] [blame] | 259 | */ |
| 260 | int detectEdgeBurst(signalVector &burst, |
Alexander Chemeris | 14d13b6 | 2017-03-17 15:12:17 -0700 | [diff] [blame] | 261 | unsigned tsc, |
| 262 | float threshold, |
Tom Tsou | d325343 | 2016-03-06 03:08:01 -0800 | [diff] [blame] | 263 | int sps, |
| 264 | complex &litude, |
Alexander Chemeris | 14d13b6 | 2017-03-17 15:12:17 -0700 | [diff] [blame] | 265 | float &toa, |
| 266 | unsigned max_toa); |
Tom Tsou | d325343 | 2016-03-06 03:08:01 -0800 | [diff] [blame] | 267 | |
| 268 | /** |
Alexander Chemeris | 4e6c938 | 2017-03-17 15:24:18 -0700 | [diff] [blame] | 269 | 8-PSK/GMSK/RACH burst detector |
| 270 | @param burst The received GSM burst of interest |
| 271 | @param tsc Midamble type (0..7) also known as TSC |
| 272 | @param threshold The threshold that the received burst's post-correlator SNR is compared against to determine validity. |
| 273 | @param sps The number of samples per GSM symbol. |
| 274 | @param amplitude The estimated amplitude of received TSC burst. |
| 275 | @param toa The estimate time-of-arrival of received TSC burst (in symbols). |
| 276 | @param max_toa The maximum expected time-of-arrival (in symbols). |
| 277 | @return positive value (CorrType) if threshold value is reached, |
| 278 | negative value (-SignalError) on error, |
| 279 | zero (SIGERR_NONE) if no burst is detected |
| 280 | */ |
| 281 | int detectAnyBurst(signalVector &burst, |
| 282 | unsigned tsc, |
| 283 | float threshold, |
| 284 | int sps, |
| 285 | CorrType type, |
| 286 | complex &, |
| 287 | float &toa, |
| 288 | unsigned max_toa); |
| 289 | |
| 290 | /** |
Alexander Chemeris | 0229d22 | 2017-03-17 16:03:17 -0700 | [diff] [blame^] | 291 | Downsample 4 SPS to 1 SPS using a polyphase filterbank |
Tom Tsou | d325343 | 2016-03-06 03:08:01 -0800 | [diff] [blame] | 292 | @param burst Input burst of at least 624 symbols |
| 293 | @return Decimated signal vector of 156 symbols |
| 294 | */ |
Tom Tsou | d325343 | 2016-03-06 03:08:01 -0800 | [diff] [blame] | 295 | signalVector *downsampleBurst(signalVector &burst); |
| 296 | |
| 297 | /** |
Alexander Chemeris | 0229d22 | 2017-03-17 16:03:17 -0700 | [diff] [blame^] | 298 | Decimate a vector. |
dburgess | b3a0ca4 | 2011-10-12 07:44:40 +0000 | [diff] [blame] | 299 | @param wVector The vector of interest. |
Thomas Tsou | 94edaae | 2013-11-09 22:19:19 -0500 | [diff] [blame] | 300 | @param factor Decimation factor. |
dburgess | b3a0ca4 | 2011-10-12 07:44:40 +0000 | [diff] [blame] | 301 | @return The decimated signal vector. |
| 302 | */ |
Thomas Tsou | 94edaae | 2013-11-09 22:19:19 -0500 | [diff] [blame] | 303 | signalVector *decimateVector(signalVector &wVector, size_t factor); |
dburgess | b3a0ca4 | 2011-10-12 07:44:40 +0000 | [diff] [blame] | 304 | |
| 305 | /** |
Alexander Chemeris | 1c0b8b3 | 2017-03-17 16:12:47 -0700 | [diff] [blame] | 306 | Demodulates a GMSK burst using a soft-slicer. |
| 307 | @param rxBurst The burst to be demodulated. |
dburgess | b3a0ca4 | 2011-10-12 07:44:40 +0000 | [diff] [blame] | 308 | @param gsmPulse The GSM pulse. |
Thomas Tsou | d24cc2c | 2013-08-20 15:41:45 -0400 | [diff] [blame] | 309 | @param sps The number of samples per GSM symbol. |
dburgess | b3a0ca4 | 2011-10-12 07:44:40 +0000 | [diff] [blame] | 310 | @param channel The amplitude estimate of the received burst. |
| 311 | @param TOA The time-of-arrival of the received burst. |
| 312 | @return The demodulated bit sequence. |
| 313 | */ |
Alexander Chemeris | 1c0b8b3 | 2017-03-17 16:12:47 -0700 | [diff] [blame] | 314 | SoftVector *demodGmskBurst(signalVector &rxBurst, int sps, |
| 315 | complex channel, float TOA); |
Tom Tsou | d325343 | 2016-03-06 03:08:01 -0800 | [diff] [blame] | 316 | |
| 317 | /** |
| 318 | Demodulate 8-PSK EDGE burst with soft symbol ooutput |
Alexander Chemeris | 0229d22 | 2017-03-17 16:03:17 -0700 | [diff] [blame^] | 319 | @param rxBurst The burst to be demodulated. |
Tom Tsou | d325343 | 2016-03-06 03:08:01 -0800 | [diff] [blame] | 320 | @param sps The number of samples per GSM symbol. |
| 321 | @param channel The amplitude estimate of the received burst. |
| 322 | @param TOA The time-of-arrival of the received burst. |
| 323 | @return The demodulated bit sequence. |
| 324 | */ |
| 325 | SoftVector *demodEdgeBurst(signalVector &rxBurst, int sps, |
| 326 | complex channel, float TOA); |
| 327 | |
kurtis.heimerl | 8aea56e | 2011-11-26 03:18:30 +0000 | [diff] [blame] | 328 | #endif /* SIGPROCLIB_H */ |