man units-filter (Commandes) - Units-filter is a parser for physical and chemical quantities

NAME

Units-filter is a parser for physical and chemical quantities

SYNOPSIS

units-filter

DESCRIPTION

Units-filter is a basic standalone parser written in C language, flex and bison. It inputs strings like "1.5e3 -bµN.m.s^-1" (it could-A be the time growth ratio of a torque) and outputs the value in standard SI unit, followed by the physical dimension of this value.

EXAMPLES

Establishing the SI value and units exponents of a quantity in the mksa system:
~$ echo 1.5e3 -bµN.m.s^-1 | units-filter-A

0.0015 2 1 -3 0 0 0 0

which means : 0.0015 (SI unit) m .kg.s

Comparing to different physical quantities:
~$ e1=$(echo "1.2e-3 V" | units-filter)

~$ e2=$(echo "1200 µWb/s"| units-filter)

~$ if [ "$e1" = "$e2" ]; then echo ok; else echo ko; fi

ok

... which emphasizes that webers by unit time are the same than volts.

AUTHORS



Georges Khaznadar, 
  <georgesk@boltz.univ-littoral.fr>

KNOWN BUGS

Few units out of the mksa system are sucessfuly parsed.