ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> boost
boost
[boost] Re: Physical Quantities revisited
by Andy Little other posts by this author
Oct 21 2003 1:21PM messages near this date
[boost] Re: Re: Physical Quantities revisited | [boost] A Physical Quantity Type (was Re: Physical Quantity a definition )
"Paul A. Bristow" <boost@[...].com>  wrote in message
news:AHEJIHEOOOBMJPAGPLIPEEIJEHAA.boost@[...]..
>  | -----Original Message-----
>  | From: boost-bounces@[...].org
>  | [mailto:boost-bounces@[...].org]On Behalf Of Andy Little
>  | Sent: Saturday, October 18, 2003 12:13 PM
>  | To: boost@[...].org
>  | Subject: [boost] Re: Re: Physical Quantities revisited

>  I have only expressed a view on one fundamental premise - that all values
are
>  held internally as SI units - but I may be wrong in this view.

Within SI units there are various units within 1 dimension.
ie length has units from nanometres to kilometres (and beyond).

Although not clear I presume you mean that if you were working in say
kilometres you
 would convert to some internal metres value_type in your constructor.
I would argue however that each unit is best suited to one purpose.

The astronomer might use mainly kilometres (or ... ok lets not go there yet
:-)  )
 while the microbiologist uses mainly (say) nanometres.
Within each unit best resolution is maintained by
keeping the internal valuetype at the scale of the unit.
 If you used say metres internally for everything then the users
who need very big or small lengths lose resolution.

More accuracy can be gained by switching units where necessary...

A simple example might be a spacecraft.
 At launch with large distances from the landing point the  journey might be
measured in kilometres.
At some predetermined point the spacecraft will have to prepare for landing.
 At that point it might be better to switch to units of metres and finally
even of millimetres if its has a delicate cargo.
 From a practical point of view it might just  be possible due to the lower
resolution required
to use a smaller microprocessor at
lower mips (which uses less electrical power) to do the calcs thus saving
precious power and hence weight.

Assuming the specialisations previously discussed, if you really need to use
(say) feet
and stay only with feet, in my system  you will not get unit conversion
errors,
whereas if you keep everything internally as metres you will have a large
number of conversions which you have no control over.
( Though my demo makes a lot of play of converting from feet to metres etc,
 in practise it is obviously best to select the unit best suited to the
application and keep such conversions under as tight control as possible. )
Even within SI,  f.p. division by 1000 is not necessarily clean.


regards
Andy Little
andy@[...].uk




_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Thread:
Andy Little
Andy Little
Andy Little
Andy Little
Andy Little
Andy Little
Andy Little
Jan Langer
Andy Little
Deane Yang
Paul A. Bristow
Phil Richards
Rene Jager
Deane Yang
Phil Richards
Andy Little
Deane Yang
Brock Peabody
Paul A. Bristow
Andy Little
Andy Little
Matthias Troyer
Paul A. Bristow
Ross MacGregor
Deane Yang
Paul A. Bristow
Deane Yang
Paul A. Bristow
Paul A. Bristow
David Abrahams
Jonathan de Halleux
Philip Miller
Deane Yang
Paul A. Bristow
Paul A. Bristow
David Abrahams

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved