// // si_units.hpp // // Copyright (c) 2001 by Michael S. Kenniston. The most recent // version will be available at www.boost.org. Permission is granted // to use this code without restriction so long as this copyright // notice appears in all source files. // This code is provided as-is, with no warrantee of correctness. // Unless otherwise specified, the definitions of all units in this // file are from NIST Special Publication 811, found online at // http://physics.nist.gov/Document/sp811.pdf #ifndef _BFAFCE60_5FA7_11d5_B9D8_000000000000 #define _BFAFCE60_5FA7_11d5_B9D8_000000000000 #include "quantity_types.hpp" namespace quantities { inline Rep yotta() { return 1e24; } inline Rep zetta() { return 1e21; } inline Rep exa() { return 1e18; } inline Rep peta() { return 1e15; } inline Rep tera() { return 1e12; } inline Rep giga() { return 1e9; } inline Rep mega() { return 1e6; } inline Rep kilo() { return 1e3; } inline Rep hecto() { return 1e2; } inline Rep deka() { return 1e1; } inline Rep deci() { return 1e-1; } inline Rep centi() { return 1e-2; } inline Rep milli() { return 1e-3; } inline Rep micro() { return 1e-6; } inline Rep nano() { return 1e-9; } inline Rep pico() { return 1e-12; } inline Rep femto() { return 1e-15; } inline Rep atto() { return 1e-18; } inline Rep zepto() { return 1e-21; } inline Rep yocto() { return 1e-24; } inline quantity< frequency_d > hertz() { return 1.0 / second(); } inline quantity< force_d > newton() { return meter() * kilogram() / second() / second(); } //inline quantity< pressure_d > pascal() { return newton() / meter() / meter(); } inline quantity< energy_d > joule() { return newton() * meter(); } inline quantity< power_d > watt() { return joule() / second(); } inline quantity< electric_charge_d > coulomb() { return second() * ampere(); } inline quantity< electric_potential_d > volt() { return watt() / ampere(); } inline quantity< capacitance_d > farad() { return coulomb() / volt(); } inline quantity< electric_resistance_d > ohm() { return volt() / ampere(); } inline quantity< electric_conductance_d > siemens() { return ampere() / volt(); } inline quantity< magnetic_flux_d > weber() { return volt() * second(); } inline quantity< magnetic_flux_density_d >tesla() { return weber() / meter() / meter(); } inline quantity< inductance_d > henry() { return weber() / ampere(); } inline quantity< frequency_d > becquerel() { return 1 / second(); } inline quantity< dose_d > gray() { return joule() / kilogram(); } inline quantity< dose_d > sievert() { return joule() / kilogram(); } inline quantity< time_interval_d > minute() { return 60.0 * second(); } inline quantity< time_interval_d > hour() { return 3600.0 * second(); } inline quantity< time_interval_d > day() { return 86400.0 * second(); } inline quantity< volume_d > liter() { return 1e-3 * meter() * meter() * meter(); } inline quantity< mass_d > metric_ton(){ return 1e+3 * kilogram(); } inline quantity< length_d > angstrom() { return 1e-10 * meter(); } inline quantity< area_d > are() { return 1e2 * meter() * meter(); } inline quantity< area_d > hectare() { return 1e4 * meter() * meter(); } inline quantity< area_d > barn() { return 1e-28 * meter() * meter(); } //inline quantity< pressure_d > bar() { return 1e5 * pascal(); } inline quantity< acceleration_d > gal() { return 1e-2 * meter() / second() / second(); } } // namespace quantities #endif // _BFAFCE60_5FA7_11d5_B9D8_000000000000