gentooboontoo / js-quantities

JavaScript library for quantity calculation and unit conversion
http://gentooboontoo.github.io/js-quantities/
MIT License
396 stars 102 forks source link

Qty.parse('10 lb').kind() says 'mass', should be force. #71

Closed sheam closed 7 years ago

sheam commented 7 years ago

For some reason Qty.parse('10 lb').kind() is reporting mass. Obviously the 10 is insignificant.

gentooboontoo commented 7 years ago

It seems there is a confusion between lb which is usually the unit of the pound as a mass and lbf, the unit of the pound as a force. So reporting mass for lb is correct here since it is its common use.

Of course, the meaning of the symbol of a unit could also be different depending on its domain of use. For the moment, the library does not support «contexts» but define units according to their most general meaning.

I am closing this issue but it could be eventually reopened to discuss about it in case I misunderstood it or if you have any further proposition.

sheam commented 7 years ago

Ok. In engineering a pound is a force, the corresponding mass is the slug. I have never heard of a pound-force before. Learn something new every day.

sheam commented 7 years ago

I should add that maybe non-candian engineering universities use different units.