<p><a href="https://gerrit.osmocom.org/c/osmo-trx/+/18723">View Change</a></p><p>1 comment:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/osmo-trx/+/18723/2/Transceiver52M/device/uhd/UHDDevice.cpp">File Transceiver52M/device/uhd/UHDDevice.cpp:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-trx/+/18723/2/Transceiver52M/device/uhd/UHDDevice.cpp@216">Patch Set #2, Line 216:</a> <code style="font-family:monospace,monospace">tx_gain_db</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">if you subtract something from gain, then  it is attenuation. […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">AFAIU power attenuation is what you subtract from power to attenuate it, giving a lower power (attenuated power).</p><p style="white-space: pre-wrap; word-wrap: break-word;">So here I'm basically first getting an attenuation by getting the difference between 2 gain values (as in how much do you need to attenuate the nominal UHD Tx Gain to get to the required UHD gain):<br>att = (desc.nom_uhd_tx_gain - tx_gain_db)</p><p style="white-space: pre-wrap; word-wrap: break-word;">Then I'm simply applying that attenuation to get nominal output Tx power (assuming slope is 1:1 with UHD tx Gain values here), by which I get and return an attenuated power:<br>return desc.nom_out_tx_power - att;</p><p style="white-space: pre-wrap; word-wrap: break-word;">I'm happy to change any terminology you feel it's more clear. That's what I'm also trying to do in this commit by also decoupling UHD Tx Gain (internal/implementation specific to the radiODevice class) and the real output power (the one the upper layers are interested in).</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-trx/+/18723">change 18723</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/c/osmo-trx/+/18723"/><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-Change-Id: I6f432465dce5c6ec1f1bc4653f6149efb18c3f43 </div>
<div style="display:none"> Gerrit-Change-Number: 18723 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-CC: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Comment-Date: Tue, 09 Jun 2020 09:51:05 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Comment-In-Reply-To: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>