Boost logo

Boost Users :

From: Gavin Lambert (boost_at_[hidden])
Date: 2019-06-17 00:14:14


On 13/06/2019 22:54, Carel Combrink wrote:
> I have a system that uses dBm to indicate Signal Amplitude, how do I
> create a type using Boost.Units for this?
>
> At the moment I am not concerned about any type of conversions between
> power and this ratio.

See
https://www.boost.org/doc/libs/1_70_0/doc/html/boost_units/Dimensional_Analysis.html
and https://www.boost.org/doc/libs/1_70_0/doc/html/boost_units/Units.html.

If you're not interested in any conversions, then you can simply define
a new system containing a single new dimension and new base unit. These
will happily coexist with other systems and units, as long as you never
try to mix values from the two.

Things get more complicated if you want to perform conversions from
other units, however.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net