From: Kevlin Henney (kevlin_at_[hidden])
Date: 2001-09-03 02:26:40
> From: Anatoli Tubman <anatoli_at_[hidden]>
>No, such cast should not be provided. Provide pound-mass
>instead. (A mass of one pound-mass weighs one pound at
>nominal Earth gravity.)
>By the way, the "units" Unix program tells me that pound (lb) is
>mass, and pound-force (lbf) is weight. I guess there's no
>one true definition of pound.
Yes there is, and the "units" program is correct. In the FPS (foot-
pound-second) system the pound is defined as a unit of mass, not of
weight, and is defined in terms of the kilogram. In other words, pounds
and kilos are freely convertible as they measure the same quantity but
are expressed in terms of different constants.
>> I haven't looked at the quantity library in a while, but
>> perhaps there's a way to specialize the error message in
>> this case:
>> Attempt to convert [e.g.] pounds (a unit of weight) to
>> kilograms (a unit of mass). Convert to newtons and divide
>> by the appropriate gravitational constant instead--G at
>> sea level on Earth, for example.
>That would be nice.
I think g rather than G was intended :-> The former is around 9.81 m/s^2
and is the acceleration due to gravity on this planet. It is not that
constant, and varies by about 4% over the surface of the Earth: you
weigh more at the North and South Pole than you do at the Equator. The
latter figure is the gravitational constant (which may not actually be
constant, but to all intents and purposes...).
I don't believe that conversions that assume a particular value of g are
necessarily that good an idea. However, as mentioned before, at least in
the case of lb <-> kg there is no need for such a conversion anyway.
Kevlin Henney phone: +44 117 942 2990
mailto:kevlin_at_[hidden] mobile: +44 7801 073 508
http://www.curbralan.com fax: +44 870 052 2289
Curbralan: Consultancy + Training + Development + Review
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk