[
Lists Home |
Date Index |
Thread Index
]
Hi Folks,
I will use this acronym: UOM = unit-of-measure
The subject line of this message is:
An approach to defining the relationship between units-of-measure
Thanks to gentle prodding by David Carlisle and Pete Kirkham
I now realize that defining *pairs of relationships* is
not a good idea. The reason is complexity. Defining the
relationship between "N" UOMs will require N**2 definitions.
Instead, a better approach is to define the relationship between
a UOM and its canonical form. This approach has much less
complexity, on the order of N.
Let's discuss this idea ...
Some things to note:
All UOMs are with respect to a reference UOM. For example:
- All Distance UOMs are with respect to a reference
Distance UOM (meters).
- All Location UOMs are with respect to a reference
Location UOM (cartesian-coordinates).
- All Temperature UOMs are with respect to a reference
Temperature UOM (celsius).
- All Time UOMs are with respect to a reference
Time UOM (seconds).
Recap: Don't state the relationship between different UOMs!
Instead, state the relationship between a UOM and its
reference standard.
kilometer, mile, inches, centimeter, furlong are all Distance UOMs.
The reference standard for Distance is meter. Thus, for each of
these UOMs we need to specify a formula to convert it into
canonical form, e.g.,
canonical(kilometer) = $value * 1000
"The canonical form of a kilometer UOM is its numeric value times 1000"
The canonical form of this:
<River id="Yangtze">
<length>
<kilometer>6340</kilometer>
</length>
</River>
is this:
<River id="Yangtze">
<length>
<meter>6340000</meter>
</length>
</River>
Likewise, for mile:
canonical(mile) = $value * 1620
So, the canonical form of this:
<River id="Yangtze">
<length>
<mile>3914</mile>
</length>
</River>
is this:
<River id="Yangtze">
<length>
<meter>6340680</meter>
</length>
</River>
To determine if two Distances are equivalent we do this:
- convert both Distances into their canonical form.
- if their canonical forms are equivalent (or, within an
acceptable tolerance) then we accept the Distances as
equivalent.
The next issue is: how do we syntactically specify the formula
for the canonical form for each UOM? A simple approach is this:
<Property id="kilometer">
<canonicalForm>$value * 1000</canonicalForm>
</Property>
What are the problems with this simple approach? Can you suggest
a better approach to specifying the canonical formula?
Somehow precision must be specified in the canonical formula. How?
Question: what is the canonical form of compound UOMs, such as:
- m**2 (meters squared)
- m/sec (meters per second)
- m/sec**2 (meters per second squared)
/Roger
|