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
1 file changed
tree: 54d5ed98c0303e384d81fe52ffc9d1bcb0de3bce
  1. CommonLibs/
  2. config/
  3. contrib/
  4. debian/
  5. doc/
  6. GSM/
  7. tests/
  8. Transceiver52M/
  9. utils/
  10. .clang-format
  11. .gitignore
  12. .gitreview
  13. configure.ac
  14. COPYING
  15. git-version-gen
  16. LEGAL
  17. Makefile.am
  18. Makefile.common
  19. README.md
  20. TODO-RELEASE
README.md

About OsmoTRX

OsmoTRX is a software-defined radio transceiver that implements the Layer 1 physical layer of a BTS comprising the following 3GPP specifications:

  • TS 05.01 "Physical layer on the radio path"
  • TS 05.02 "Multiplexing and Multiple Access on the Radio Path"
  • TS 05.04 "Modulation"
  • TS 05.10 "Radio subsystem synchronization"

OsmoTRX is originally based on the transceiver code from the OpenBTS project, but setup to operate independently with the purpose of using with non-OpenBTS software and projects, specifically within the Osmocom stack. Used together with OsmoBTS you can get a pretty standard GSM BTS with Abis interface as per the relevant 3GPP specifications.

Homepage

The official homepage of the project is https://osmocom.org/projects/osmotrx/wiki/OsmoTRX

GIT Repository

You can clone from the official osmo-trx.git repository using

    git clone git://git.osmocom.org/osmo-trx.git

There is a cgit interface at https://git.osmocom.org/osmo-trx/

Documentation

Doxygen-generated API documentation is generated during the build process, but also available online for each of the sub-libraries at User Manual for OsmoTRX can be generated during the build process, and is also available online at https://ftp.osmocom.org/docs/latest/osmotrx-usermanual.pdf.

Mailing List

Discussions related to OsmoTRX are happening on the openbsc@lists.osmocom.org mailing list, please see https://lists.osmocom.org/mailman/listinfo/openbsc for subscription options and the list archive.

Please observe the Osmocom Mailing List Rules when posting.

Contributing

Our coding standards are described at https://osmocom.org/projects/cellular-infrastructure/wiki/Coding_standards

We us a gerrit based patch submission/review process for managing contributions. Please see https://osmocom.org/projects/cellular-infrastructure/wiki/Gerrit for more details

The current patch queue for OsmoTRX can be seen at https://gerrit.osmocom.org/q/project:osmo-trx+status:open