aboutsummaryrefslogtreecommitdiffstats
path: root/Transceiver52M/Transceiver.h
diff options
context:
space:
mode:
authorAlexander Chemeris <Alexander.Chemeris@gmail.com>2015-06-04 15:39:41 -0400
committerAlexander Chemeris <Alexander.Chemeris@gmail.com>2015-06-05 23:32:41 -0400
commitded68da44f1b9641e920231be596a4ca8add198b (patch)
tree4c585fdd97c91253d066e32f5c911073ac0d9ae7 /Transceiver52M/Transceiver.h
parent37bbfa21250e36efd88139f11e89089b4117db40 (diff)
Transceiver: Fix clipping detection.
There are two primary changes in this commit: 1) Return values of detect functions changed form bool to int to actually pass the return value from the inner function and notify higher levels about clipping. Previously the information was lost due to conversion to bool. 2) Clipping level is not the final verdict now. We still try to demod a burst and mark it as clipped only if the level is above the clipping level AND we can't demod it. The reasoning for this is that in real life we want to do as much as possible to demod the burst, because we want to get as much from our dynamic range as possible. So a little bit of clipping is fine and is expected. We just don't want too much of it to break our demod.
Diffstat (limited to 'Transceiver52M/Transceiver.h')
-rw-r--r--Transceiver52M/Transceiver.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/Transceiver52M/Transceiver.h b/Transceiver52M/Transceiver.h
index 1639d0d..a7b04ed 100644
--- a/Transceiver52M/Transceiver.h
+++ b/Transceiver52M/Transceiver.h
@@ -209,14 +209,14 @@ private:
void writeClockInterface(void);
/** Detect RACH bursts */
- bool detectRACH(TransceiverState *state,
- signalVector &burst,
- complex &amp, float &toa);
+ int detectRACH(TransceiverState *state,
+ signalVector &burst,
+ complex &amp, float &toa);
/** Detect normal bursts */
- bool detectTSC(TransceiverState *state,
- signalVector &burst,
- complex &amp, float &toa, GSM::Time &time);
+ int detectTSC(TransceiverState *state,
+ signalVector &burst,
+ complex &amp, float &toa, GSM::Time &time);
/** Demodulat burst and output soft bits */
SoftVector *demodulate(TransceiverState *state,