Re: quantity database

Bill,

>Date: Wed, 15 Apr 1998 05:45 CST 
>From: "William L. Hibbard" <WHIBBARD@xxxxxxxxxxxxx>
>To: visad-list@xxxxxxxxxxxxx
>Subject: Re: quantity database 

In the above message, you wrote:

> I may have misinterpreted your original posting by confusing
> quantity with RealType.  Perhaps by quantity you mean a
> generalization of the quantityName field in BaseUnit to
> DerivedUnit (BaseUnits are things like meter, kilogram and
> second whereas DerivedUnits include the combinations Tom was
> talking about, like meter * second^-2).
>  
> These quantities are distinct from RealTypes.  For example,
> the quantity 'density' (kilogram * meter^-3) can apply to
> the densities of many different substances, which would each
> be RealTypes.
>  
> To continue the example we discussed yesterday, 'speed' is
> the quantity for the DerivedUnit meter * second^-1, whereas
> 'wind speed' and 'current speed' would likely have different
> RealTypes.  Giving these different RealTypes allows them to
> have different display roles, for example different magnitude
> scalings for flow rendering.

I don't think you misinterpreted my original posting on creating a
quantity database.  Tom's comment yesterday on (basically) dimensional
analysis was something of a tangent.  I responded further along that
tangent by noting that the Unit classes already have partial support
for such stuff.  My "quantity database", however, is orthogonal to
dimensional analysis.  Currently, I view it as an customizable mapping
between names and MathTypes.  For example, the following entries would
exist (interpret them imaginatively rather than rigorously):

    "energy" -> RealType("energy", "joules", FloatSet(, null, "joules"))

    "velocity" -> RealTupleType("velocity", "meters/second", 
                    FloatSet(, null, {"m/s", "m/s", "m/s"}))

Naturally, I'll have to handle the circular dependency between the
various MathTypes and their associated Sets.

I envision a standard set of quantities coming with VisAD together with
the ability to create and add others.  I'm currently thinking about
disallowing modifying the "standard" set of quantities so as to prevent
a "standard" quantity from having two different definitions at two
different places.

--------
Steve Emmerson   <http://www.unidata.ucar.edu>