I'm revamping a program which keeps a database of manufactured parts and is 
full of measurements. I am of course converting these measurements to metric, 
but some columns can have a length or a mass (material needed is measured by 
length if it's wire, I guess) and one column (so far) can be in lots or 
pieces as well as in kilograms. To keep track of what unit the quantity was 
entered in, I'm using a four-byte code which also indicates the precision. 
Has such a code already been standardized? If not, to whom would I propose 
this code?

The way I'm thinking of laying it out is like this: The first two bytes 
indicate the quantity (0=length, 1=mass, 2=time, etc.), the third byte 
indicates the unit (10 is the base metric unit, so for length 10 is a meter, 
0f a decimeter, 0c a millimeter, 0b a micrometer, 15 a megameter, etc. and 
non-metric units are assigned numbers from 20 to ff), and the fourth byte 
indicates the number of digits after the decimal point, or if some other 
format (such as base 60 for degrees of arc) is to be used.

phma

Reply via email to