aboutsummaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2017-04-19 15:46:11 +0200
committerPhilipp Maier <pmaier@sysmocom.de>2017-05-17 14:41:52 +0200
commit22704a88e2caa28a231d6f4f4fbb6181fab48e93 (patch)
treec60f0d7bb4f13b87549be90cb7d66839da8e068d /src/common
parent2d848a061e5dd82ca95d1e18e5f1a5f615653a6c (diff)
measurement/cosmetic: Fixup source code comment
the function ber10k_to_rxqual() has only a very brief comment with the spec reference. This commit adds a more explainatory comment that makes it easier to understand from where the ber10k constants are taken. Change-Id: I3d3488c97d0bffa7d449d3675afcc75b2a6a2703
Diffstat (limited to 'src/common')
-rw-r--r--src/common/measurement.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/common/measurement.c b/src/common/measurement.c
index 6a118880..0814bf10 100644
--- a/src/common/measurement.c
+++ b/src/common/measurement.c
@@ -114,7 +114,20 @@ int lchan_new_ul_meas(struct gsm_lchan *lchan, struct bts_ul_meas *ulm)
/* input: BER in steps of .01%, i.e. percent/100 */
static uint8_t ber10k_to_rxqual(uint32_t ber10k)
{
- /* 05.08 / 8.2.4 */
+ /* Eight levels of Rx quality are defined and are mapped to the
+ * equivalent BER before channel decoding, as per in 3GPP TS 45.008,
+ * secton 8.2.4.
+ *
+ * RxQual: BER Range:
+ * RXQUAL_0 BER < 0,2 % Assumed value = 0,14 %
+ * RXQUAL_1 0,2 % < BER < 0,4 % Assumed value = 0,28 %
+ * RXQUAL_2 0,4 % < BER < 0,8 % Assumed value = 0,57 %
+ * RXQUAL_3 0,8 % < BER < 1,6 % Assumed value = 1,13 %
+ * RXQUAL_4 1,6 % < BER < 3,2 % Assumed value = 2,26 %
+ * RXQUAL_5 3,2 % < BER < 6,4 % Assumed value = 4,53 %
+ * RXQUAL_6 6,4 % < BER < 12,8 % Assumed value = 9,05 %
+ * RXQUAL_7 12,8 % < BER Assumed value = 18,10 % */
+
if (ber10k < 20)
return 0;
if (ber10k < 40)