Units and Quantities

GIN file version 3.24+

It is now possible to specify the quantity to which a unit belongs. In some cases, this will avoid ambiguities of what the unit really is (for example a ‘%’ unit would be difficult to interpret and is not obvious that it may mean ‘% load’.

To specify a quantity in a unit field, use a colon character. If just specifying a unit, omit the colon as per the existing behaviour.

These are valid examples: distance:m acceleration:m/s/s volume:m3 volume: m3

If possible, use only quantities and units that are found in the following list. Clearly this is not always possible but do at least try to include a known quantity. Don’t make up quantities if there is not one available – get it added into GWv4 first.

List of GWv4 built in Units and Quantities:

The first quantity name should be used by your code. In some cases, there is a separate display unit from the script unit (e.g. “µG” or “uG”). Use one of these in your units – don’t use the unit name as this will not be recognised.

Quantity: unitless ("-")

Null “”, 1.0

Quantity: acceleration (“Acceleration / Gravity”), “acceleration:”

Metres / Second Squared “m/s²”, “m/s/s”, 1.0

G Force “G”, 0.101971621

Milli G Force “mG”, 101.971621

Micro G Force “µG”, “uG”, 101971.621

Millimetres / Second Squared “mm/s²”, “mm/s/s”, 1000.0

Feet / Second Squared “ft/s²”, “ft/s/s”, 3.2808399

Inches / Second Squared “in/s²”, “in/s/s”, 39.3700787

Quantity: afr (“Air Fuel Ratio”), “afr:”

Lambda “λ”, “LA”, 1.0

AFR Ethanol “AFR Ethanol”, 9.0

AFR Methanol “AFR Methanol”, 6.4

AFR Gasoline “AFR Gasoline”, 14.7

AFR Diesel “AFR Diesel”, 14.5

AFR Propane “AFR Propane”, 15.5

AFR Hydrogen “AFR H2”, 34.0

Quantity: angle (“Angle”), “angle:”

Radian “rad”, 1.0

Degree “°”, “deg”, 57.2957795

Revolution “rev”, 0.159154943

Quantity: angular_accel (“Angular Acceleration”), “angular_accel:”

Radians / Second Squared “rad/s²”, “rad/s/s”, 1.0

Degrees / Second Squared “deg/s²”, “deg/s/s”, 57.2957795

Revolutions / Second Squared “rev/s²”, “rev/s/s”, 0.159154943

Quantity: angular_speed (“Angular Speed”), " angular_speed:"

Radians / Second “ω”, “rad/s”, 1.0

Degrees / Second “°/s”, “deg/s”, 57.2957795

Revolutions / Second “rps”, 0.159154943

Revolutions / Minute “rpm”, 9.54929659

Revolutions / Hour “rph”, 572.957795

Hertz “Hz”, 0.159154943

Quantity: area (“Area”), “area:”

Square Metres “m²”, “m2”, 1.0

Square Kilometres “km²”, “km2”, 1e-6

Square Millimetres “mm²”, “mm2”, 1000000.0

Square Feet “ft²”, “ft2”, 10.7639104

Quantity: current (“Current”), “current:”

Amp “A”, 1.0

Kiloamp “kA”, 0.001

Milliamp “mA”, 1000.0

Microamp “µA”, “uA”, 1000000.0

Quantity: data_size (“Data Size”), “data_size:”

Byte “B”, 1.0

Kilobyte “kB”, 0.001

Megabyte “MB”, 0.000001

Gigabyte “GB”, 0.000000001

Terabyte “TB”, 0.000000000001

Kibibyte “KiB”, 0.0009765625

Mebibyte “MiB”, 0.000000953674316406251

Gibibyte “GiB”, 0.000000000931322574615478515625

Tebibyte “TiB”, 9.094947017729282379150390625e-13

Quantity: distance (“Distance”), “distance:”

Metre “m”, 1.0

Kilometre “km”, 0.001

Centimetre “cm”, 100.0

Millimetre “mm”, 1000.0

Mile “mi”, 0.000621371192

Yard “yd”, 1.0936133

Foot “ft”, 3.2808399

Inch “in”, 39.3700787

Light Year “ly”, 1.05702341e-16

Quantity: energy (“Energy”), “energy:”

Joule “J”, 1.0

Kilojoule “kJ”, 0.001

Megajoule “MJ”, 0.001

Calorie “ca”, 0.239005736

Kilocalorie “kca”, 0.000239005736

Quantity: force (“Force”), “force:”

Newton “N”, 1.0

Quantity: fraction (“Fraction / Percent”), “fraction:”

Fraction “frac”, 1.0

Percent “%”, 100.0

Quantity: fuel_economy (“Fuel Economy”), “fuel_economy:”

Kilometres / litre “km/L”, 1.0

Miles / UK Gallon “mpg UK”, 2.82481053

Miles / US Gallon “mpg US”, 2.35214583

Quantity: fuel_consumption (“Fuel Consumption”), “fuel_consuption:”

Litres / Kilometre “L/km”, 1.0

Litres / 100 Kilometres “L/100km”, 100.0

UK Gallons / Mile “UK g/mile”, 0.354006044

US Gallons / Mile “US g/mile”, 0.425143707

Quantity: heart_rate (“Heart Rate”), “heart_rate:”

Beats / Second “Beats/s”, 1.0

Beats / Minute “bpm”, 60.0

Beats / Hour “Beats/h”, 3600.0

Hertz “Hz”, 1.0

Quantity: mass (“Mass”), “mass:”

Gram “g”, 1.0

Kilogram “kg”, 0.001

Metric Tonne “t”, 1e-6

Milligram “mg”, 1000.0

Microgram “µg”, “ug”, 1000000.0

Ounce “oz”, 0.0352739619

Pound “lb”, 0.00220462262

Quantity: mass_flow (“Mass Flow”), “mass_flow:”

Grams / Second “g/s”, 1.0

Grams / Minute “g/min”, 60.0

Grams / Hour “g/h”, 3600.0

Kilograms / Second “kg/s”, 0.001

Kilograms / Minute “kg/min”, 0.060

Kilograms / Hour “kg/h”, 3.6

Pounds / Second “lb/s”, 0.00220462262

Pounds / Minute “lb/min”, 0.132277357

Pounds / Hour “lb/h”, 7.93664144

Ounce / Second “oz/s”, 0.03527396192

Ounce / Minute “oz/min”, 2.11643772

Ounce / Hour “oz/h”, 126.986263

Quantity: power (“Power”), “power:”

Watt “W”, 1.0

Milliwatt “mW”, 1000.0

Kilowatt “kW”, 0.001

Megawatt “MW”, 0.000001

Horsepower “hp”, 0.00134102209

Calories / Second “cal/s”, 0.239005736

Calories / Minute “cal/min”, 14.340344

Calories / Hour “cal/hour”, 860.42065

Kilocalories / Second “kcal/s”, 0.000239005736

Kilocalories / Minute “kcal/min”, 0.014340344

Kilocalories / Hour “kcal/hour”, 0.86042065

Quantity: pressure (“Pressure”), “pressure:”

Pascal “Pa”, 1.0

Kilopascal “kPa”, 0.001

Megapascal “MPa”, 0.000001

Bar “bar”, 0.00001

Millibar “mbar”, 0.01

Pounds / Square Inch “PSI”, 0.000145037738

Millimetres of Mercury “mmHg”, 0.007500637

Quantity: resistance (“Resistance”), “resistance:”

Ohm “Ω”, “ohm”, 1.0

Kiloohm “kΩ “, “kohm”, 1000.0

Megaohm “MΩ “, “Mohm”, 100000.0

Quantity: respiratory_rate (“Respiratory Rate”), “respiratory_rate:”

Breaths / Second “Breaths/s”, 1.0

Breaths / Minute “Breaths/min”, 60.0

Breaths / Hour “Breaths/h”, 3600.0

Hertz “Hz”, 1.0

Quantity: speed (“Speed”), “speed:”

Metres / Second “m/s”, 1.0

Kilometres / Hour “km/h”, 3.6

Miles / Hour “mph”, 2.23693629

Knots “kt”, 1.94384449

Quantity: temperature (“Temperature”), “temperature:”

Celcius “°C”, “C”, 1.0

Fahrenheit “°F”, “F”, 1.8, 32

Kelvin “K”, 1.0, 273.15

Quantity: throughput (“Throughput”), “throughput:”

Packets / Second “Packets/s”, 1.0

Quantity: time (“Time”), “time:”

Second “s”, 1.0

Millisecond “ms”, 1000.0

Microsecond “µs”, “us”, 1000000.0

Minute “min”, 0.016666666667

Hour “h”, 0.000277777778

Day “day”, 1.15740741e-5

Quantity: torque (“Torque”), “torque:”

Newton Metre “N.m”, 1.0

Newton Centimetre “N.cm”, 100.0

Foot Pound “ft.lb”, 0.7375621

Dyne Centimetre “dyn.cm”, 1e7

Quantity: voltage (“Voltage”), “voltage:”

Volt “V”, 1.0

Millivolt “mV”, 1000.0

Microvolt “µ"“V”, “mV”, 1000000.0

Quantity: volume (“Volume”), “volume:”

Cubic Metre “m³”, “m3”, 1.0

Cubic Centimetre “cc”, 1000000.0

Litre “L”, 1000.0

Millilitre “ml”, 1000000.0

Microlitre “µl”, “ul”, 1000000000.0

Cubic Foot “ft³”, “cft”, 35.31466672

Cubic Inch “in³”, “cin”, 61023.74409

UK Gallon “UKga”, 219.969157

US Gallon “USga”, 264.172052

Quantity: volume_flow (“Volume Flow”), “volume_flow:”

Cubic Metre / Second “m³/s”, “m3/s”, 1.0

Litre / Second “L/s”, 1000.0

Millilitre / Second “ml/s”, 1000000.0

Cubic Metre / Minute “m³/min”, “m3/min”, 60.0

Litre / Minute “L/min”, 60000.0

Millilitre / Minute “ml/min”, 60000000.0

Cubic Metre / Hour “m³/h”, “m3/h”, 3600.0

Litre / Hour “L/h”, 3600000.0

Millilitre / Hour “ml/h”, 3600000000.0