General Function
This page provides general utility functions for unit conversions, physical constants, and common calculations.
Unit Conversion
Section titled “Unit Conversion”=ee.CONVERT()
ex) Convert values between different units
=ee.CONVERT(value, from_unit, to_unit)
Temperature Conversion
=ee.CONVERT(100, "C", "F") → 212 °F
=ee.CONVERT(273.15, "K", "C") → 0 °C
Pressure Conversion
=ee.CONVERT(1, "bar", "psi") → 14.504 psi
=ee.CONVERT(101.325, "kPa", "atm") → 1 atm
Length Conversion
=ee.CONVERT(1, "m", "ft") → 3.281 ft
=ee.CONVERT(25.4, "mm", "inch") → 1 inch
Mass Conversion
=ee.CONVERT(1, "kg", "lb") → 2.205 lb
=ee.CONVERT(1000, "kg", "ton") → 1 ton
Supported Unit Categories:
- Temperature: C (Celsius), F (Fahrenheit), K (Kelvin)
- Pressure: bar, psi, Pa, kPa, MPa, atm
- Length: m, cm, mm, km, ft, inch, yard
- Mass: kg, g, mg, lb, oz, ton
- Volume: m3, L, mL, gal, ft3
- Energy: J, kJ, cal, kcal, BTU, kWh
Physical Constants
Section titled “Physical Constants”=ee.CONSTANT()
ex) Get universal physical constants
=ee.CONSTANT(constant_name)
Universal Gas Constant
=ee.CONSTANT("R") → 8.314 J/(mol·K)
Standard Gravity
=ee.CONSTANT("g") → 9.807 m/s²
Avogadro’s Number
=ee.CONSTANT("Na") → 6.022e23 mol⁻¹
Boltzmann Constant
=ee.CONSTANT("k") → 1.381e-23 J/K
Planck Constant
=ee.CONSTANT("h") → 6.626e-34 J·s
Speed of Light
=ee.CONSTANT("c") → 2.998e8 m/s
Stefan-Boltzmann Constant
=ee.CONSTANT("sigma") → 5.670e-8 W/(m²·K⁴)
Available Constants:
- R: Universal gas constant (8.314 J/(mol·K))
- g: Standard gravity (9.807 m/s²)
- Na: Avogadro’s number (6.022e23 mol⁻¹)
- k: Boltzmann constant (1.381e-23 J/K)
- h: Planck constant (6.626e-34 J·s)
- c: Speed of light (2.998e8 m/s)
- sigma: Stefan-Boltzmann constant (5.670e-8 W/(m²·K⁴))
- pi: Pi (3.14159…)
- e: Euler’s number (2.71828…)