RKM Codes – Number format for compact robust labels

RKM is a way of denoting component values that that gets rid of the decimal point. This is useful for two reasons. Originally it largely used when marking values on components and schematics because the tiny decimal point could be lost either by a printing issue or because it was scratched off. In this case the interpreted value could be one or two orders of magnitude different from the actual value. That is less of an issue these days, but another application has arisen. Occasionally it is desirable to create an identifier that contains a numerical value, and identifiers cannot contain decimal points.

Resistance examples:

R47 → 0.47 Ω
4R7 → 4.7 Ω
470R → 470 Ω
4K7 → 4.7 kΩ
47K → 47 kΩ
47K3 → 47.3 kΩ
470K → 470 kΩ
4M7 → 4.7 MΩ

This package provide a way of converting number to and from RKM codes.

You can find the latest version of the source code on Github.