Code Monkey home page Code Monkey logo

engineering-unit-converter's Introduction

Engineering Unit Converter

Lightweight tool for converting units

Summary

This repository provides the source code for a GUI-based lightweight universal unit conversion software. The engineering unit conversion tool allows the user to type the given and desired units as well as the value(s) to be converted. Typing the units allows greater flexibility and usability compared with picking the units from a drop down menu. This is especially true for specialized units such as MPa*m^(1/2) as seen converted to ksi*in^(1/2) in Figure 1. The tool also allows the user to convert multiple values at once which can speed up conversion of large datasets.

Figure 1. Engineering unit converter GUI

Procedure

The procedure employed in the tool to convert the given units to the desired units includes:

  1. Reduced the given and desired units into their base (fundamental) units
  2. Compare the given and desired base units to ensure consistency
  3. Find the conversion factors between each base unit pair
  4. Compute the overall conversion factor
  5. Apply the overall conversion factor to the given value(s)
  6. Output the value(s) in the desired unit system

As mentioned in Step 1, all units are converted to their based units. The base units used in the conversion tool for the SI and US unit systems are shown in Tables 1 and 2, respectively.

Table 1. SI base units

length mass time temperature
m kg s K

Table 2. US base units

length mass time temperature
in slinch s R

If you desire additional units, they can be added to the Units.csv file which is read upon launching the tool.

Launching Unit Converter

Both python2 and python3 compatible code is provided in this repository. The GUI was developed using the Tkinter library and can be launched by running either of the commands below in the terminal.

python2

python GUIUnitConverter_200119_Py2.py

python3

python3 GUIUnitConverter_200119_Py3.py

engineering-unit-converter's People

Contributors

lbborkowski avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.