Boost.Units: unit type for dBm

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Boost.Units: unit type for dBm

Boost - Users mailing list
Hi,

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.

Any help will be appreciated.

I am already using boost.unit successfully for other units and conversions with the help from the mailing list. I want to now define the correct strong type for this type for consistency. 

Regards,
Carel

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Boost.Units: unit type for dBm

Boost - Users mailing list
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 mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users