<p>Harald Welte has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/12006">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">lms: User correct scale factor for transmit samples<br><br>Due to (I believe) a copy+paste mistake from the USRP1 code,<br>we were using only a scale range of up to 9830 when transmitting<br>samples, rather than the full 16 bit signed integer range up to<br>32767.<br><br>As a result, we were loosing almost two bits (MSBs) of resolution<br>as well as a lot of transmit power.<br><br>This changes the scale factor to 0.707 (1/sqrt(2)).<br><br>Please note that the much higher DAC output level means that the analog<br>gain should be reduced.  The theoretic range of up to 73dB should not<br>be used, but Lime Microsystems suggest a value of 61..67 dB.  This can<br>be achieved by using a "osmotrx tx-attenuation" value of 6..12 inside<br>the osmo-bts-trx configuration file.<br><br>Change-Id: I71702feaa11f53e7614a6938a984dd748405474a<br>---<br>M Transceiver52M/device/lms/LMSDevice.h<br>1 file changed, 8 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/06/12006/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/Transceiver52M/device/lms/LMSDevice.h b/Transceiver52M/device/lms/LMSDevice.h</span><br><span>index 349efbb..6635c13 100644</span><br><span>--- a/Transceiver52M/device/lms/LMSDevice.h</span><br><span>+++ b/Transceiver52M/device/lms/LMSDevice.h</span><br><span>@@ -28,7 +28,14 @@</span><br><span> #include <iostream></span><br><span> #include <lime/LimeSuite.h></span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-#define LIMESDR_TX_AMPL  0.3</span><br><span style="color: hsl(120, 100%, 40%);">+/* Definition of LIMESDR_TX_AMPL limits maximum amplitude of I and Q</span><br><span style="color: hsl(120, 100%, 40%);">+ * channels separately. Hence LIMESDR_TX_AMPL value must be 1/sqrt(2) =</span><br><span style="color: hsl(120, 100%, 40%);">+ * 0.7071.... to get an amplitude of 1 of the complex signal:</span><br><span style="color: hsl(120, 100%, 40%);">+ *     A^2 = I^2 + Q^2</span><br><span style="color: hsl(120, 100%, 40%);">+ *     A^2 = (1/sqrt(2))^2 + (1/sqrt(2))^2</span><br><span style="color: hsl(120, 100%, 40%);">+ *         A^2 = 1/2 + 1/2</span><br><span style="color: hsl(120, 100%, 40%);">+ *     A^2 = 1 */</span><br><span style="color: hsl(120, 100%, 40%);">+#define LIMESDR_TX_AMPL  0.707</span><br><span> </span><br><span> /** A class to handle a LimeSuite supported device */</span><br><span> class LMSDevice:public RadioDevice {</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/12006">change 12006</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/12006"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-trx </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I71702feaa11f53e7614a6938a984dd748405474a </div>
<div style="display:none"> Gerrit-Change-Number: 12006 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Harald Welte <laforge@gnumonks.org> </div>