Closed jmpenn closed 7 years ago
What do you propose? Should there be a "trick-units" perl script in 'bin' that users can run to receive a print-out of all the units they can use? Should Trick throw warnings and direct the user to the appropriate documentation when it receives values for units that it doesn't recognize?
Will the list of available units change significantly over time? If not, simply adding the list of available units to the documentation would be a simple and immediate benefit to the user. If so, creating a program to display the available unit types might be a better solution.
A stand alone script or program would be fine. Perl would be an excellent choice. This was the previous output when we ran "ICG -u". Just reproducing something similar is what we are currently looking for. And to answer your question, the list of units won't change much.
Trick Measurement Units Summary
-------------------------------
Time: s min hr day
Angular Displacement: r d as am rev
Voltage: v
Amperage: amp
Resistance: ohm
Sound: dB
Unitless: -- cnt one mol
English System Units
--------------------
Linear Displacement: ft in yd mi n.m.
Mass: sl lbm
Force: oz lbf
Temperature: R F
Energy: BTU
Power: hp
Pressure: psi
Metric System Units
-------------------
Linear Displacement: m
Mass: g mt
Force: N
Temperature: C K
Energy: J TNT
Power: W
Pressure: Pa atm
Prefixes for Multiples and Submultiples
(Not valid for English system units)
---------------------------------------
10**-1 d 10 da
10**-2 c 10**2 h
10**-3 m 10**3 k
10**-6 u 10**6 M
10**-9 n 10**9 G
10**-12 p 10**12 T
10**-15 f 10**15 P
10**-18 a 10**18 E
10**-21 z 10**21 Z
10**-24 y 10**24 Y
Cool. This will give me a chance to play with Perl too. I'll start working on the script now.
Updated the script to better reflect the units Trick currently uses.
Since we moved to udunits, we don't have a way to display a list of available units that a user can use in their simulation, short of digging into the udunits xml units database.
The way to find the database is to invoke "udunits2 -h", and then find the default [[ath to the database at the bottom of the printout.