Documentation for the Conversion Editor of the FRAMEwork System (FRAMES)


Title Page
Legal Notice
Table of Contents
Introduction
Requirements
Design
Quality Assurance and Testing
 

Design of the FRAMES Conversion Editor

The Conversion Editor is designed to function with measures and units. The following sections describe these in more detail.

Measures

A measure categorizes a collection of units that inherit the same measuring properties. For example, Time is a measure, with seconds, minutes, hours, and days being related units. In FRAMES 2.0, each measure has a base unit that all other units must relate their scaling properties back to. Using Time as a measure, seconds is a logical choice for the base unit. Every unit within the measure Time needs to base its scaling properties on how many seconds per minute, hour, days, etc. Once a unit has been added and the scaling properties defined down to the base unit, the unit is capable of converting to every related unit. For example, if millisecond was added to the collection of Time and scaled to the base unit (seconds), with seconds, minutes, hours, and days already in the collection, then milliseconds could be converted to or from any other unit in Time. This approach reduces the complexity in defining relationships between units because not every combination of units needs to be defined.

Defining Base Units

Each measure must have a base unit defined. Therefore, the Conversion Editor automatically prompts the user to define a base unit after adding a measure. When converting units, the base unit is used as a scaling link between all other units within the measure.

Adding a Measure

To add a measure, the FRAMEwork Development Environment must know not only the name of the measure but also the base unit to which every other unit will base its calculations. Therefore, the Conversion Editor requires that the user provide both name and base-unit name for the new measure.

Deleting a Measure

To delete a measure, the Conversion Editor includes a button to delete a measure. Once the user clicks the button, a message box seeks confirmation. When the user confirms the deletion by clicking "yes," the selected measure is removed.

Units

A unit is an identifier with scaling properties. The scaling properties define how units are related to each other and converted from one unit to another.

Converting Values

Converting values is the process of changing values of data from one unit of measure to another. Converting values from the original unit to a designated unit is a two-step process:

  1. The initial value associated with the original unit is converted to the base unit.
  2. The value is converted from the base unit to the final unit (see figure below).

Example of Conversion

Adding a Unit

To add a unit, the user selects a measure from the list of measures, from which a panel displays the list of units belonging to that measure and the current properties of the selected measure. Clicking the "Add Unit" button allows the user to enter a name for the new unit. On confirmation, the user may enter a name for the abbreviated version of the new unit. On confirmation, the new unit appears with the list of all other units belonging to the measure in question.

Deleting a Unit

To delete a unit, the user selects a measure from the list of measures, from which a panel displays the list of units belonging to that measure and the current properties of the selected measure. After highlighting a unit, the user clicks on the "Delete Unit" button. On confirmation, the selected unit is removed from that list.

Scaling Properties

A unit's scaling properties describe how a unit is related to other units within a measure. The scaling properties consist of a factor scalar and an offset scalar. When defining a unit's factor and offset scalars, they are related directly to the base unit. The formula used for converting values to the base unit is

Intermediate Value = (Initial Value B Initial Unit's Offset) * Initial Unit's Factor


The formula used for converting values from the base unit to the final unit is

Final Value = (Intermediate Value / Final Unit's Factor) + Final Unit's Offset

A unit's factor value describes the number of base units per unit. For example, in the case of measure Time with unit hour and the base unit in seconds, the factor value should equal 3600 (the number of seconds within an hour).

A unit's offset value describes a conversion value to be added after factor conversion. Most units have an offset of zero; however, in the case of temperatures, an offset value is needed to convert values from and to Fahrenheit and Celsius.


Battelle Logo
Home | Security and Privacy | Contact Us