Expand description
Conversion between common units of measure.
Units are looked up by symbol or name, ignoring spaces. An exact, case-sensitive match is tried
first (mW is a milliwatt and MW a megawatt, MB a megabyte and Mb a megabit); otherwise
case is ignored if that leaves only one unit (hz, pa and kwh work), and a spelling that
fits several units, such as mw, is an error rather than a guess. Conversion is allowed only
within one physical dimension; temperatures use affine conversions.
See the book entry Shared types, constants and utilities.
Enums§
- Dimension
- Physical dimension of a unit.
Functions§
- db_
to_ linear_ amplitude - Converts decibels to an amplitude ratio.
- db_
to_ linear_ power - Converts decibels to a power ratio.
- dbm_
to_ watts - dBm to power in watts.
- linear_
amplitude_ to_ db - Converts an amplitude (voltage) ratio to decibels,
20 log10(ratio). - linear_
power_ to_ db - Converts a power ratio to decibels,
10 log10(ratio). - unit_
conversion - Converts
valuefrom unitfromto unitto, e.g.unit_conversion(100.0, "km/h", "mph"). - unit_
dimension - The dimension of a named unit.
- watts_
to_ dbm - Power in watts to dBm.