> Of Pierre Abbat

>I'm using a four-byte code which also indicates the precision.

>Has such a code already been standardized?

 

Yes. When you buy a bottle of shampoo it will probably have a code in EAN UCC format.

 

 

>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 decimetre

 

EAN uses a 4 digit 'application identifier'. The first 3 digits specify the measure (e.g. width) plus a 4th digit specifies how many place to move the decimal point left.

 

The application identifier for weight in kilograms is 3100. Weight in grams is 3103.

The application identifier for length in metres is 3110. Length in mm is 3113.

 

The ‘applicable value’ is coded in a 6 digit number. So a cable that is 3560.52 metres long would be coded as 3112 (= length in cm) 356052

 

 

Other application identifiers (without the decimal digit) are:

310       Net weight         Kilograms

311       Length or first dimension Metres

312       Width, diameter, or second dimension      Metres

313       Depth, thickness, height, or third dimension          Metres

314       Area     Square metres

315       Net volume        Litres

316       Net volume        Cubic metres

320       Net weight         Pounds

321       Length or first dimension Inches

322       Length or first dimension Feet

323       Length or first dimension Yards

324       Width, diameter, or second dimension      Inches

325       Width, diameter, or second dimension      Feet

326       Width, diameter, or second dimension      Yards

327       Depth, thickness, height, or third dimension          Inches

328       Depth, thickness, height, or third dimension          Feet

329       Depth, thickness, height, or third dimension          Yards

350       Area     Square inches

351       Area     Square feet

352       Area     Square yards

356       Net weight         Troy ounces

357       Net weight (or volume)   Ounces

360       Net volume        Quarts

361       Net volume        Gallons (U.S.)

364       Net volume        Cubic inches

365       Net volume        Cubic feet

366       Net volume        Cubic yards

Reply via email to