diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2021-09-03 13:48:29 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2021-09-03 13:52:02 +0200 |
commit | 985694175dca0a2a9670aab75f178898be4e184b (patch) | |
tree | c8676d13b9b8cf4bc485afa9b6a5e8780e491500 | |
parent | ac8a4e72970f42833abadc8c30d28a27418506b8 (diff) |
computeCI: Document hardcoded multiplier
Logarithm change of base rule is used. Document it so it's clear where
it comes from.
Change-Id: Ia588e8dafda4e1abe0721f12491661949339a1ba
-rw-r--r-- | Transceiver52M/sigProcLib.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Transceiver52M/sigProcLib.cpp b/Transceiver52M/sigProcLib.cpp index 21978ff..df87f94 100644 --- a/Transceiver52M/sigProcLib.cpp +++ b/Transceiver52M/sigProcLib.cpp @@ -1478,7 +1478,13 @@ static float computeCI(const signalVector *burst, const CorrelationSequence *syn /* Esimate Carrier power */ C = xcorr.norm2() / ((N - 1) * sync->gain.abs()); - /* Interference = Signal - Carrier, so C/I = C / (S - C) */ + /* Interference = Signal - Carrier, so C/I = C / (S - C). + * Calculated in dB: + * C/I_dB = 10 * log10(C/I) + * C/I_dB = 10 * (1/log2(10)) * log2(C/I) + * C/I_dB = 10 * 0.30103 * log2(C/I) + * C/I_dB = 3.0103 * log2(C/I) + */ return 3.0103f * log2f(C / (S - C)); } |