gissehel / BarLauncher-UnitConverter

A simple but powerfull physical units converter for BarLauncher application (like Wox and Flow Launcher).
MIT License
0 stars 0 forks source link

# Wox-UnitConverter

A simple but powerfull physical units converter for Wox.

Usage by example

Simple usage

unit 2cm

(unit 2cm)

unit 50 g

(unit 50 g)

Note that as weird as is may be, standard SI unit for mass is kilogram and not gram.

Composite unit

unit 2cm/s

(unit 2cm/s)

unit 2cm/h

(unit 2cm/h)

Conversion between SI and US unit systems

unit 70 kg -> lbm

(unit 70 kg -> lbm)

Support for derivative SI units

unit 70 N

(unit 70 N)

unit 70 N -> Pa.m2

(unit 70 N -> Pa.m2)

unit 1 MV/kA -> cΩ

(unit 1 MV/kA -> cΩ)

Support for computer related units

unit 1 B -> bit

(unit 1 B -> bit)

Support for computer related prefix

unit 1 KiB -> kB

(unit 1 KiB -> kB)

unit 1 kB -> Kibit

(unit 1 kB -> Kibit)

Support for time related units

unit 1 min

(unit 1 min)

unit 1 h

(unit 1 h)

unit 1 h -> min

(unit 1 h -> min)

unit 1 d -> min

(unit 1 d -> min)

unit 1 y

(unit 1 y)

unit 1 y -> d

(unit 1 y -> d)

Support for time related units with prefix from weird to weirder

unit 60 y -> kd

(unit 60 y -> kd)

unit 60 y -> Kid

(unit 60 y -> Kid)

Support for conversion to not only units but also value

unit 8 m -> 30 cm

(unit 8 m -> 30 cm)

There is about 26.6... times 30 cm in 8 m.

Support for conversion to not homogenous units

This may seems weird, but it's in fact usefull.

unit 8 m2 -> 30 cm

(unit 8 m2 -> 30 cm)

Converting 8 m2 to 30 cm doesn't make any sense ? Well, in fact, if you want to convert 8 m2 to 30 cm, you'll need to take 26.66.. m long of your 30 cm large to make 8 m2.

It does make sense after all. In fact, it's function that is the most usefull in this plugin.

unit 0.2 cm -> in.min-1

(unit 0.2 cm -> in.min-1)

It will take 4.72 s with a speed of 1 in by minute to make 0.2 cm.

unit 0.2 cm -> 3.1 in.min-1

(unit 0.2 cm -> 3.1 in.min-1)

It will take 1.52 s with a speed of 3.1 in by minute to make 0.2 cm.

Real life computer/mobile speed example

You have a quota of 50 GB of data with your mobile phone contract this month. Your phone can download up to 60 Mibit/s.

How long will you be able to last by downloading full speed ?

unit 50 GB -> 60 Mibit/s

(unit 50 GB -> 60 Mibit/s)

6357.829 s ! Doesn't make any sense to me. Let's express that in hour !

unit 50 GB -> 60 Mibit/s : h

(unit 50 GB -> 60 Mibit/s : h)

The answer is 1.766 hour.

You'll expire you quota in less than 2 hours by downloading full speed.

Now let's take a slower speed of 2 Mibit/s. How long will you last in days ?

unit 50 GB -> 2 Mibit/s : d

(unit 50 GB -> 2 Mibit/s : d)

You'll last 2.2 days.

Real life car example (for non US)

How much is the distance 300 km if you convert it to the speed of 120 km/h ?

unit 300 km -> 120 km/h

(unit 300 km -> 120 km/h)

It's 9000s. How many hours is that ?

unit 300 km -> 120 km/h : h

(unit 300 km -> 120 km/h : h)

It's 2.5 hours.