Change in osmo-gsm-tester[master]: rfemu_gnuradio_zmq: fix amplitude conversion

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/.

srs_andre gerrit-no-reply at lists.osmocom.org
Thu Oct 15 14:56:00 UTC 2020


srs_andre has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/20664 )


Change subject: rfemu_gnuradio_zmq: fix amplitude conversion
......................................................................

rfemu_gnuradio_zmq: fix amplitude conversion

fix dB to amplitude conversion and adjust max attenuation value

Change-Id: I5a94d5d31e7dc85ab37bd281f95374ad825a41ff
---
M src/osmo_gsm_tester/obj/rfemu_gnuradio_zmq.py
1 file changed, 4 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/64/20664/1

diff --git a/src/osmo_gsm_tester/obj/rfemu_gnuradio_zmq.py b/src/osmo_gsm_tester/obj/rfemu_gnuradio_zmq.py
index c5398a9..3725760 100644
--- a/src/osmo_gsm_tester/obj/rfemu_gnuradio_zmq.py
+++ b/src/osmo_gsm_tester/obj/rfemu_gnuradio_zmq.py
@@ -188,11 +188,12 @@
     def set_attenuation(self, db):
         for cell in self.enb.gen_conf['enb']['cell_list']:
             if int(cell['cell_id']) == self.cell_id:
-                max_att_db = self.get_max_attenuation()
-                self.broker.cmd_set_relative_gain_on_local_port(cell['zmq_enb_peer_port'], (max_att_db - db)/max_att_db)
+                # convert negative dB to amplitude
+                amp = pow(10, -db/20.0)
+                self.broker.cmd_set_relative_gain_on_local_port(cell['zmq_enb_peer_port'], amp)
                 break
 
     def get_max_attenuation(self):
-        return 12 # maximum cell_gain value in srs. Is this correct value?
+        return 200
 
 # vim: expandtab tabstop=4 shiftwidth=4

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/20664
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Change-Id: I5a94d5d31e7dc85ab37bd281f95374ad825a41ff
Gerrit-Change-Number: 20664
Gerrit-PatchSet: 1
Gerrit-Owner: srs_andre <andre at softwareradiosystems.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201015/3ee7a26d/attachment.htm>


More information about the gerrit-log mailing list