Core Concepts

Units of Measurement

Introduction

Various quantities must be read and acted upon in any physical system. One challenge is how to keep track of the units a particular value is measured in? For example, is a temperature reading in Celsius or Fahrenheit? Is a volume measurment in fluid ounces or milliliters? In this artical, we’ll take a look at how KOS handles these issues.

Overview

This article gives a synopsis of the two main classes associated with units of measurement: Unit and UnitSystem.

Unit

The base (abstract) class that all units of measurement must extend is Unit. In KOS, there are a number of built-in units, which are shown in the following class diagram.

Unit class diagram

As you can see, it’s possible to derive your own units. For example, you could create units for "length" called "meters" or "feet".

UnitSystem

A UnitSystem provides a complete set of units. There are two built-in unit systems in KOS: SI (metric system) and US (United States customary).

UnitSystem class diagram

Summary

In this brief article, we took a quick look at measurement units and systems in KOS.

For more details, please see the app note Working with Regions.

Previous
Next
On this page
Java Development
Seamlessly transition from Legacy+ systems to Freestyle microdosing and advanced distributed dispense systems.
UI Development
Using KOS SDKs, integrating Consumer and Non-consumer facing UIs becomes seamless, giving you less hassle and more time to create.
Video Library
Meet some of our development team, as they lead you through the tools, features, and tips and tricks of various KOS tools.
Resources
Familiarize yourself with KOS terminology, our reference materials, and explore additional resources that complement your KOS journey.
Copyright © 2024 TCCC. All rights reserved.