Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2015
    Posts
    2

    SI units of measurement dataset

    Hi,

    for my application I'm looking for a dataset of the SI units of measurement. In SQL or a csv/xml file for instance.
    So I can implement it in my PHP/MySQL project.

    I've been looking all over and while I do find a few libraries to work with units (and convert them),
    I can't find a full list in cvs/xml, a database, or any list I can import into MySQL.
    I asume lots of people with online shops/product CMS use some form of units table. So there must be somthing like this around.

    thanks

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    so roll your own


    measurement_types /* determines the type of measurement unit (eg linear, area, weight, time, volume.....)
    code CHAR(5)
    description

    measurment_units /* determines individual measurement units and how they relate back to a specified base unit (eg there woudl be 1000 mm in the base unit of 1 metere, 39.37 inches in a base unit of 1 metre, and so on....
    type_Code
    code
    description
    is_base_unit /there and only be one base unit for any one measurment type
    qty_in_base_unit

    or another variation is to have a formula in place of number in base uint
    Code:
    	unit_id	unit_type	unit_text	unit_formula	is_default	precision
    	1	wind_speed	m/s	x	1	2
    	2	wind_speed	km/h	x*3.6	0	2
    	3	wind_speed	mph 	x*2.236936	0	2
    	4	wind_speed	knots	x*1.943844	0	2
    	5	wind_speed	ft/s	x*3.28084	0	2
    	6	wind_direction		x	1	2
    	7	wind_direction	4 Cardinal	x	0	2
    	8	wind_direction	8 Cardinal	x	0	2
    	9	wind_direction	16 Cardinal	x	0	2
    	10	temperature	K	x	0	2
    	11	temperature	C	x-273.15	1	2
    	12	temperature	F	1.8*x-459.67	0	2
    	13	pressure	Pa	x	1	2
    	14	pressure	hPa	x/100	0	2
    	15	pressure	kPa 	x/1000	0	2
    	16	pressure	mBar	x/100	0	2
    	17	pressure	Bar	x/100000	0	2
    	18	pressure	inHg	x*0.0002953	0	2
    	19	pressure	inH2O	x*0.00401463	0	2
    	20	pressure	cmHg	x*0.00075006	0	2
    	21	pressure	cmH2O	x*0.01019716	0	2
    	22	pressure	mmHg	x*0.0075006	0	2
    	23	pressure	mmH2O	x*0.1019716	0	2
    	24	pressure	atm	x*0.00000986923	0	2
    	25	pressure	Torr	x*0.0075006	0	2
    	26	density	kg/m<sup>3</sup>	x	1	2
    	27	density	g/cm<sup>3</sup>	x/1000	0	4
    	28	density	slugs/ft<sup>3</sup>	x/515.3788	0	5
    	29	density	lbm/ft<sup>3</sup>	x/16.01846	0	4
    	30	dew_point	K	x	0	2
    	31	dew_point	C	x-273.15	1	2
    	32	dew_point	F	1.8*x-459.67	0	2
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Jun 2015
    Posts
    2
    yeah I think I better do that.

    thanks healdem !

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •