Function: factor
Purpose: Factor returns the conversion factor between two different
units (i.e. M en KM)
Category: PHYSICAL COORDINATES
File: factor.c
Author: K.G. Begeman
Use: INTEGER FACTOR( CUNIT1 , Input CHARACTER*(*)
CUNIT2 , Input CHARACTER*(*)
CFACT ) Output DOUBLE PRECISION
CUNIT1 Type of unit to convert from.
The units can be abbreviated, i.e enough
characters must be given to find a unique
match in a list of known units.
CUNIT2 Type of unit to convert to.
CFACT Factor to convert from CUNIT1 to CUNIT2.
FACTOR Returns:
0: successful conversion
51: unknown units to convert from
52: unknown units to convert to
53: both units are unknown
54: incompatible units
55: ambiguous units to convert from
56: ambiguous units to convert to
Notes: The following type of units are implemented:
DEGREE ARCSEC ARCMIN RADIAN
CIRCLE DMSSEC DMSMIN DMSDEG
HMSSEC HMSMIN HMSHOUR
METER ANGSTROM NM MICRON
MM CM INCH FOOT
YARD M KM MILE
PC KPC MPC
AU LYR
TICK SECOND MINUTE HOUR
DAY YEAR YR
HZ KHZ MHZ GHZ
M/S MM/S CM/S KM/S
K MK
W/M2/HZ JY MJY
TAU
JOULE J EV ERG RY
Updates: Dec 23, 1989: KGB, document created.
May 9, 1995: VOG, minimal match.
DMSSEC/MIN/DEG,
HMSSEC/MIN/HOUR
Mar 25, 2009: JPT, improved minimal match
Mar 29, 2009: VOG, units for energy added
(WCSLIB) and updated value for pc.
Also added au and lyr