Change in gr-gsm[master]: trx/radio_if.py: clarify magic numbers in sample rate calculation

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

Piotr Krysik gerrit-no-reply at lists.osmocom.org
Thu Sep 13 08:34:26 UTC 2018


Piotr Krysik has submitted this change and it was merged. ( https://gerrit.osmocom.org/10880 )

Change subject: trx/radio_if.py: clarify magic numbers in sample rate calculation
......................................................................

trx/radio_if.py: clarify magic numbers in sample rate calculation

Change-Id: I55f283113d0324a0236b7bbf13bce5718003b857
---
M python/trx/radio_if.py
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Harald Welte: Looks good to me, but someone else must approve
  Piotr Krysik: Looks good to me, approved; Verified



diff --git a/python/trx/radio_if.py b/python/trx/radio_if.py
index 2aeb49a..f7f124f 100644
--- a/python/trx/radio_if.py
+++ b/python/trx/radio_if.py
@@ -75,8 +75,8 @@
 	GSM_TS_PERIOD_uS = GSM_SYM_PERIOD_uS * 156.25
 	GSM_UL_DL_SHIFT_uS = -(GSM_TS_PERIOD_uS * 3)
 
-	# TODO: explain where do these values come from?
-	SAMPLE_RATE = 4.0 * 1625000.0 / 6.0
+	GSM_SYM_RATE = (1.0 / GSM_SYM_PERIOD_uS) * 1e6
+	SAMPLE_RATE = GSM_SYM_RATE * osr
 
 	# FIXME: shall be measured (automatically?) for
 	# particular device and particular clock rate.

-- 
To view, visit https://gerrit.osmocom.org/10880
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: gr-gsm
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I55f283113d0324a0236b7bbf13bce5718003b857
Gerrit-Change-Number: 10880
Gerrit-PatchSet: 2
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Piotr Krysik <ptrkrysik at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180913/a336a666/attachment.htm>


More information about the gerrit-log mailing list