4 ms·
Do GNU Units handle units with implicit parameters? For example, 1500 mAh (milliamp∗hours) could be converted to 5.55 Wh (watt∗hours), or 19.98 kJ in SI units,
by nousermane 6y ago
Do GNU Units handle units with implicit parameters?
For example, 1500 mAh (milliamp∗hours) could be converted to 5.55 Wh (watt∗hours), or 19.98 kJ in SI units, in the context of a 3.7-volt battery.
Naive approach fails:
$ units "1500 milliampere*hours at 3.7 volts" "watt*hours"
conformability error
1.9593687e+09 kg^2 m / s^4
3600 kg m^2 / s^2
- johnisgood 6y agoYou have: 1500 mA * hr * 3.7 V You want: kJ * 19.98 / 0.05005005 You have: 1500 mA * hr * 3.7 V You want: watt * hours * 5.55 / 0.18018018
- fanf2 6y agoYou are multiplying mAh, volts, and atmospheres. (“at” is a unit not an operator.) You want to just multiply mAh and V like You have: 1500 mA hours * 3.7V You want: W hours * 5.55 / 0.18018018
- sls 6y agoYou have: 1500 mA * hours * 3.7 V You want: watt * hours * 5.55 / 0.18018018