This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
fixeria gerrit-no-reply at lists.osmocom.orgfixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/22456 )
Change subject: Transceiver: use proper factor for amplitude scaling
......................................................................
Transceiver: use proper factor for amplitude scaling
In Transceiver::addRadioVector() we scale the I/Q samples by scaling
the output voltage of the DAC. A relative factor/divisor/ration in
the voltage domain cannot be used 1:1 in the power domain.
There exist two similar formulas:
a) X_dB = 10 * log10(X_lin / X_ref)
b) Y_db = 20 * log10(Y_lin / Y_ref)
both of them are correct, and according to [1]:
a) If you convert a quantity X that relates to power or energy,
=> the factor is 10.
b) If you convert a quantity Y that relates to amplitude,
=> the factor is 20.
Therefore we should be using 20 instead of 10. This change makes
osmo-trx apply per-lchan attenuation values correctly. Otherwise
it would double the values indicated in TRXD messages.
[1] https://dspillustrations.com/pages/posts/misc/decibel-conversion-factor-10-or-factor-20.html
Change-Id: I98bc00bd25df4913d45e55eb008d715aca76fc7c
Related: SYS#4918
---
M Transceiver52M/Transceiver.cpp
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
Hoernchen: Looks good to me, approved
diff --git a/Transceiver52M/Transceiver.cpp b/Transceiver52M/Transceiver.cpp
index 3188c70..6de266c 100644
--- a/Transceiver52M/Transceiver.cpp
+++ b/Transceiver52M/Transceiver.cpp
@@ -396,7 +396,7 @@
else
burst = modulateBurst(bits, 8 + (wTime.TN() % 4 == 0), cfg->tx_sps);
- scaleVector(*burst, txFullScale * pow(10, (double) -RSSI / 10));
+ scaleVector(*burst, txFullScale * pow(10, (double) -RSSI / 20));
radio_burst = new radioVector(wTime, burst);
--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/22456
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I98bc00bd25df4913d45e55eb008d715aca76fc7c
Gerrit-Change-Number: 22456
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: Hoernchen <ewild at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210127/ccd35c41/attachment.htm>