cnvt is a function of Lagmite that converts a unit to a different unit. It uses the [expr] type card. The task cards that could work with this function are:
{<unit>} , which specifies which unit the function is going to convert to. See table below for supported units and their categories.{<number>}, which forces the end result to be displayed in n decimal places.{sci} or {eng}, which returns a number in either scientific or engineering form, respectively.For example, to express 600 meters into kilometers, we can use the syntax:
disp [text] (cnvt [expr] 600 <m> {<km>})
//Expected result: 0.6 km
The supported units are in the table below:
| No. | Unit Category | Unit |
|---|---|---|
| 1. | Length (nmi = nautical miles = 1852 m) | SI units: <km>, <hm>, <dam>, <m>, <dm>, <cm>, <mm>, <µm> or <um>, <nm>, <pm>, <fm> , <ang> Imperial units: <in>, <ft>, <yd>, <mi> Astronomical: <au>, <ly>, <pc> Other units: <nmi> |
| 2. | Time (1 month = 30 days, 1 year = 365 days, 1 decade = 10 years, 1 millenium = 100 decades = 1000 years) | SI units: <ks>, <hs>, <das>, <s>, <ms>, <µs> or <us>, <ns>, <ps>, <fs> Other units: <min>, <hr>, <d>, <wk>, <mo>, <yr>, <dc>, <mil> |
| 3. | Temperature | SI units: <kK>, <hK>, <daK>, <K>, <dK>, <cK>, <mK>, <µK> or <uK> Other units: <C>, <Re>, <F> |
| 4. | Mass (ton = metric ton = 1000 kg) | SI units: <kg>, <hg>, <dag>, <g>, <dg>, <cg>, <mg>, <µg> or <ug>, <ng>, <pg>, <fg> , <ton> Imperial units: <oz>, <lb> |
| 5. | Speed (1 Mach = 343 m/s) | SI units: <m/s>, <km/s>, <km/h>, Other units: <kn>, <mach>, ****<mi/h> |
| 6. | Force | SI units: <MN>, <kN>, <hN>, <daN>, <N>, <dN>, <cN>, <mN>, <µN> or <uN> Other units: <dyn> , <kp>, <lbF> |
| 7. | Acceleration | SI units: <m/s^2>, <km/s^2> Other units: <mi/s^2> |
| 8. | Angles | <deg>, <rad>, <grad> |
| 9. | Number Systems | <BIN>, <OCT>, <DEC>, <HEX> |
| 10. | Area (1 acre = 4840 yd² = 43560 ft²) | SI units: <km^2>, <hm^2>, <dam^2>, <m^2>, <dm^2>, <cm^2>, <mm^2>, <µm^2> or <um^2> Imperial units: <in^2>, <ft^2>, <yd^2>, <mi^2> Other units: <are>, <ha>, <ac> |
| 11. | Pressure | SI units: <MPa>, <kPa>, <hPa>, <daPa>, <Pa>, <dPa>, <cPa>, <mPa> **Other units: <**psi>, <bar>, <mbar>, <mmHg>, <inHg>, <atm>, <dyn/cm^2> |
| 12. | Volume (1 gallon = 4546.09 L) | SI units: <km^3>, <hm^3>, <dam^3>, <m^3>, <dm^3>, <cm^3>, <mm^3>, Imperial units: <in^3>, <ft^3>, <yd^3>, <mi^3> Other units: <hL>, <daL>, <L>, <dL>, <cL>, <mL> , <floz>, <gal> , <tsp>, <tbsp> |
| 13. |