Method Deck / units

Power conversion

Converts power between W, kW, mechanical hp, metric hp, and BTU/h using exact NIST SP 811 watt-equivalents.

Published for review. The Founder is checking every card himself; anything he strikes comes down the same hour.

Try it

Inputs

Outputs

Steps

  1. Look up the exact watt-equivalent of from_unit and of to_unit.
  2. Convert the input to watts: watts = value * w_per(from_unit).
  3. Convert watts to the target unit: result = watts / w_per(to_unit).
  4. Round result to 6 significant figures.

Constants

Sources

Worked example and test vectors

NameInputsAnswer
worked example{"value":1,"from_unit":"hp_mech","to_unit":"W"}745.700 W
test vector: metric hp to watts{"value":1,"from_unit":"hp_metric","to_unit":"W"}735.499 W
test vector: kW to BTU/h{"value":1,"from_unit":"kW","to_unit":"btu_h"}3,412.14 BTU/h

Published card