D23103: Add decibel power units (dBW and multiples)

2019-08-11 Thread Ismael Asensio
iasensio created this revision.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
iasensio requested review of this revision.

REVISION SUMMARY
  Add decibel power units (dBW and mulitples)
  
  Decibel power units are widely used in the fields of signal trasnmission and 
radiofrequency. 
  This patch adds decibel units to the Power category (dBm, dbW, dBµW and dBk).
  
  The decibel calculation might be also interesting to other categories such as 
voltage or pressure (acoustics)

TEST PLAN
  - Check the units of the power category on krunner
  - The reference unit: 1W = 0dBW = 30dBm = 60dBµW = -30dBk
  - The decibel is a logarithmic scale so multiplying on natural units implies 
addition in decibel units:
  
  10W = 10dBW = 40dBm = 70dBµW = -20dBk

REPOSITORY
  R292 KUnitConversion

BRANCH
  log_power_units

REVISION DETAIL
  https://phabricator.kde.org/D23103

AFFECTED FILES
  src/power.cpp
  src/unit.h

To: iasensio
Cc: kde-frameworks-devel, LeGast00n, michaelh, ngraham, bruns


D23103: Add decibel power units (dBW and multiples)

2019-08-11 Thread Ismael Asensio
iasensio edited the test plan for this revision.

REPOSITORY
  R292 KUnitConversion

REVISION DETAIL
  https://phabricator.kde.org/D23103

To: iasensio
Cc: kde-frameworks-devel, LeGast00n, michaelh, ngraham, bruns


D23103: Add decibel power units (dBW and multiples)

2019-08-11 Thread Ismael Asensio
iasensio added a reviewer: broulik.

REPOSITORY
  R292 KUnitConversion

REVISION DETAIL
  https://phabricator.kde.org/D23103

To: iasensio, broulik
Cc: kde-frameworks-devel, LeGast00n, michaelh, ngraham, bruns


D23103: Add decibel power units (dBW and multiples)

2019-08-11 Thread Nathaniel Graham
ngraham added inline comments.

INLINE COMMENTS

> unit.h:143
>  Femtowatt, Attowatt, Zeptowatt, Yoctowatt, Horsepower,
> +/** @since 5.xx */
> +DecibelKilowatt, DecibelWatt, DecibelMilliwatt, DecibelMicrowatt,

This will (hopefully) land in 5.62, so use that for the number

REPOSITORY
  R292 KUnitConversion

REVISION DETAIL
  https://phabricator.kde.org/D23103

To: iasensio, broulik
Cc: ngraham, kde-frameworks-devel, LeGast00n, michaelh, bruns


D23103: Add decibel power units (dBW and multiples)

2019-08-11 Thread Ismael Asensio
iasensio updated this revision to Diff 63588.
iasensio added a comment.


  - Set frameworks version

REPOSITORY
  R292 KUnitConversion

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D23103?vs=63575&id=63588

BRANCH
  log_power_units

REVISION DETAIL
  https://phabricator.kde.org/D23103

AFFECTED FILES
  src/power.cpp
  src/unit.h

To: iasensio, broulik
Cc: ngraham, kde-frameworks-devel, LeGast00n, michaelh, bruns


D23103: Add decibel power units (dBW and multiples)

2019-08-14 Thread Nathaniel Graham
ngraham added a comment.


  Works just fine, but by adding dBm as a common unit, it's now the first t 
hing that shows up when I convert watts:
  
  F7247005: Screenshot_20190814_070401.png 

  
  Seems a little odd to me, not being an audio professional. Does it really 
make sense to display dBm when I convert 5 terawatts? :p
  
  F7247009: Screenshot_20190814_070623.png 


REPOSITORY
  R292 KUnitConversion

REVISION DETAIL
  https://phabricator.kde.org/D23103

To: iasensio, broulik
Cc: ngraham, kde-frameworks-devel, LeGast00n, michaelh, bruns


D23103: Add decibel power units (dBW and multiples)

2019-08-14 Thread Ismael Asensio
iasensio marked an inline comment as done.
iasensio added a comment.


  Well, in my field of work (telephony, radar and radio signal transmission) it 
makes totally sense (altought Terawatts would be major words 😄). It is a non 
trivial conversion that we make quite frequently.
  
  If the question is between dBm and dBW as a common unit, I would go for dBm 
with no doubt. In my experience dBm is widely more used that its counterpart 
dBW. Also, as a quick and dirty comparison, one can check the difference in 
length and quality of those two articles: https://en.wikipedia.org/wiki/DBm and 
https://en.wikipedia.org/wiki/Decibel_watt.
  
  If it is wether decibel power units are common globally, I would say (knowing 
that I have a field bias) that at least as important as horsepower on a 
different field. 
  Of course, I will gently (and happily) accept your decision. Just wanted to 
provide some context.

REPOSITORY
  R292 KUnitConversion

REVISION DETAIL
  https://phabricator.kde.org/D23103

To: iasensio, broulik
Cc: ngraham, kde-frameworks-devel, LeGast00n, michaelh, bruns


D23103: Add decibel power units (dBW and multiples)

2019-08-14 Thread Nathaniel Graham
ngraham accepted this revision.
ngraham added a comment.
This revision is now accepted and ready to land.


  Since there are only two common units in the list right now, adding a third 
doesn't seem like a disaster. :)
  
  @broulik, what do you think?

REPOSITORY
  R292 KUnitConversion

BRANCH
  log_power_units

REVISION DETAIL
  https://phabricator.kde.org/D23103

To: iasensio, broulik, ngraham
Cc: ngraham, kde-frameworks-devel, LeGast00n, michaelh, bruns


D23103: Add decibel power units (dBW and multiples)

2019-08-27 Thread Ismael Asensio
iasensio added a comment.


  Friendly ping

REPOSITORY
  R292 KUnitConversion

BRANCH
  log_power_units

REVISION DETAIL
  https://phabricator.kde.org/D23103

To: iasensio, broulik, ngraham
Cc: ngraham, kde-frameworks-devel, LeGast00n, GB_2, michaelh, bruns


D23103: Add decibel power units (dBW and multiples)

2019-08-27 Thread Kai Uwe Broulik
broulik accepted this revision.

REPOSITORY
  R292 KUnitConversion

BRANCH
  log_power_units

REVISION DETAIL
  https://phabricator.kde.org/D23103

To: iasensio, broulik, ngraham
Cc: ngraham, kde-frameworks-devel, LeGast00n, GB_2, michaelh, bruns


D23103: Add decibel power units (dBW and multiples)

2019-08-27 Thread Nathaniel Graham
This revision was automatically updated to reflect the committed changes.
Closed by commit R292:edca5ae10796: Add decibel power units (dBW and multiples) 
(authored by iasensio, committed by ngraham).

REPOSITORY
  R292 KUnitConversion

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D23103?vs=63588&id=64741

REVISION DETAIL
  https://phabricator.kde.org/D23103

AFFECTED FILES
  src/power.cpp
  src/unit.h

To: iasensio, broulik, ngraham
Cc: ngraham, kde-frameworks-devel, LeGast00n, GB_2, michaelh, bruns