Unit Objects


Unit objects are the only kind of objects that can be created in Schema Definitions. They are derived from the Unit intrinsic class, defining a conversion table of measuring units. Each unit object represents a dimension of measurement, such as mass, length, temperature, force, or any unit that you need to incorporate in your simulator.

For an introduction to unit handling in SansGUI, please see the User Extensible Unit Conversion section in the SansGUI User's Guide. Here we discuss unit objects in Schema Definitions from the simulation developer's point of view.

Unit Table

Each unit object contains a unit table with the number of entries decided by the simulation developer. The table can be locked during the Object Library generation, or opened (default) for users to add their own favorite units. Locked unit objects can be modified only in service sessions, entered through the password set in the simulator identification. Indexed to the unit table, three unit entries are more significant:

From the above definition, a unit table contains unit entries with a Base unit. The Spec and User units are stored on a per attribute basis. If the user changes a User unit, all data values associated with such attribute in the objects, parts, or links will be converted accordingly.

Unit Conversions

Except for temperature, all the units are linearly scaled. That is, the data of the source unit is divided by the source unit multiplier and then multiplied by the target unit multiplier.

TargetValue = (SourceValue / SourceUnitMultiplier) × TargetUnitMultiplier

The temperature units are handled specially for its "offset in addition to scaling" nature. For example, to convert 100 degree Celsius to Fahrenheit, we multiply 1.8 and then add 32 to the result:

100 degree Celsius = 100 × 1.8 + 32 degree Fahrenheit = 212 degree Fahrenheit

 



C:\FH_Suite\htmlgifs\home.gif Class Schema Version Control Object Library

SansGUI Modeling and Simulation Environment Version 1.2

Copyright © 2000-2003 ProtoDesign, Inc. All rights reserved.

http://protodesign-inc.com