Skip to content

v0.3.0 — power, force & torque

Choose a tag to compare

@TYEclipse TYEclipse released this 22 Aug 21:51
· 4 commits to main since this release

v0.3.0 — power, force & torque (the mechanics trio)

Three new categories, still zero runtime dependencies and pure arithmetic — 17 categories in total.

What's new

  • power — mw, kw, w, hp (mechanical = 550 ft·lbf/s), hp(m) (metric PS), hp(e) (electric 746 W), btu/h (IT), ftlb/s. The three different horsepower definitions are kept strictly separate — a classic LLM error point.
  • force — kn, n, dyn, lbf, kgf (kp), gf. lbf/kgf are weight-based forces at standard gravity 9.80665 m/s².
  • torque — n.m, kgf.m, lbfft (pound-force foot), lbfin (pound-force inch). Force × length.

Symbol disambiguation

  • typed kn resolves to knot (speed); use the full name kilonewton for kN.
  • nm is the nanometer (length); the torque newton meter uses the symbol n.m (also n·m or full names).

Examples

convert_unit { value: 150, from: "kw", to: "hp" }    → 150 kw = 201.153313 hp
convert_unit { value: 1, from: "lbf", to: "n" }      → 1 lbf = 4.448222 n
convert_unit { value: 1, from: "lbfft", to: "n.m" }  → 1 lbfft = 1.355818 n.m

Install

dsh plugin --profile default add github:TYEclipse/dsh-units

41 tests green (independent closed-form anchors), oxlint clean, forbidden-word scan clean, install self-test passed.


v0.3.0 — 功率、力、扭矩(力学三件套)

新增 3 个类别,依旧零运行时依赖、纯算术——共 17 个类别。

  • 功率:mw/kw/w/hp(机械马力 = 550 ft·lbf/s)/hp(m)(公制 PS)/hp(e)(电动 746 W)/btu/h/ftlb/s——三种马力定义严格区分,正是大模型高频出错点。
  • :kn/n/dyn/lbf/kgf/gf——lbf/kgf 按标准重力 9.80665 m/s² 计算。
  • 扭矩:n.m/kgf.m/lbfft/lbfin——力×长度。

符号消歧:输入 kn 解析为"节"(速度),千牛请用全名 kilonewtonnm 是纳米(长度),扭矩牛米用 n.m(也支持 n·m 或全名)。

安装:dsh plugin --profile default add github:TYEclipse/dsh-units

41 个测试全绿(独立闭式锚点)、oxlint 零告警、违禁词扫描干净、安装自测通过。