Si_units

Pretty print physical values in properly scaled metric (SI) units.

Website
Author: Vinzent "Jellix" Saranen
Maintainer: vinzent@heisenbug.eu
License: WTFPL
Version: 0.2.0
Dependencies: No dependency.
Tags: utilities formatting
Badge:

Provides generic conversion (Image) functions that convert values into human readable strings with appropriate SI prefixes. This is especially convenient when you have to deal with printing values from a potentially large interval, and you need to represent such values as something an average human will easily be able to read. Then you can use SI_Units to take care of the conversion into an appropriate string representation for you.

Converting values into a string is supported with all SI prefixes which are a power of 1000 (yocto .. Yotta), additionally there is a generic that can deal with binary prefixes (i.e. prefixes that denote powers of 1024).

Scaling (i.e. conversion between different prefixes, like from kilo(meter) to centi(meter)) between all defined SI prefixes is also supported, similar for binary prefixes.

See the project’s website for more details.

Version 0.2.0 is source code identical to the previous 0.1.3 release, but adds full support for Alire integration. In the process, the provided gnat project files have been streamlined, so if you upgrade to this version from a previous release, you will need to adjust your own project files accordingly.