Boost logo

Boost :

From: Ken Shaw (ken_at_[hidden])
Date: 2001-08-30 12:33:14


----- Original Message -----
From: "George A. Heintzelman" <georgeh_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Thursday, August 30, 2001 12:11 PM
Subject: Re: [boost] Re: Re: quantity libraries

>
> > Simple first reason, what is the conversion of kilograms to pounds? 2.2
> > pounds to the kilogram right? WRONG! There is no conversion between the
two,
> > kilograms measure mass ( a constant ) and pounds measure weight ( a
> > relative measure of mass * gravity ). If the quantity library allows
both
> > systems some compiler manufacturer will implement that wrong conversion
and
> > it will inevitably sneek into some calculation where it does matter.
>
> A correct quantity library will of course supply conversions between
> kilograms and slugs (the English unit of mass; a mass of 1 slug weighs
> ~32 pounds at nominal Earth-gravity) and Newtons and pounds
> respectively. On the other hand, since pounds are frequently conflated
> with mass in colloquial usage, it would probably not be inaccurate to
> supply the constant pound_mass = 1/32 slug (= 1/2.2 kg).
>
> Of course, a correct quantity library will quickly detect an error in
> useage, as any attempt to use something measured in the force unit of
> 'pounds' where a mass was required will trigger a compile-time error.
>

As I'm sure the guys at JPL thought when different groups mixed radians and
seconds of arc in the guidance software for the Mars Climate Orbiter.

> Any quantity library desiring to be useful to US engineers, craftsmen,
> and builders will *at least* have to supply instances of the constants
> 'pound' and 'inch' and so forth. Thus this error is potentially present
> in either case. Most likely a library will also have to supply a value
> for 'g', the earth's acceleration due to gravity, in order to be useful
> for earth-bound systems anyway.
>
> I don't think that this complaint is a reason to restrict users to SI
> units.
>
I think it should restrict the user to one set of measures or the other with
no mixing or conversion possible. Allowing both in the same calculation will
insert conversion errors because of the inherent dissimularities of the 2
systems.

Ken Shaw


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk