hitran2refr  Richard J. Mathar, J. Opt. A: Pure Appl. Opt. 9 (2007) 470
units.h
Go to the documentation of this file.
1 #ifndef UNITS_H
2 #define UNITS_H
3 
4 #include "prconst.h"
5 
6 /* first the group of macors that deal with constants, then the group
7  that uses the first group */
8 
10 #define ARCSEC2DEG(a) ((a)/3600.)
11 
13 #define MAS2DEG(m) ((m)/1.e6/3600.)
14 
16 #define DEG2ARCSEC(d) (3600.*(d))
17 
19 #define ARCMIN2DEG(a) ((a)/60.)
20 
22 #define DEG2RAD(d) (M_PI*(d)/180.)
23 
25 #define RAD2DEG(r) (180.*(r)/M_PI)
26 
30 #define MICRON2WN(m) (1.e4/(m))
31 
35 #define WN2MICRON(w) (1.e4/(w))
36 
42 #define K2KAYSER(k) ((k)/(2.*M_PI*100.))
43 #define KAYSER2K(k) (2.*M_PI*100.*(k))
44 
46 #define K2MICRON(k) (2.*M_PI*1.e6/(k))
47 
49 #define MICRON2K(m) (2.*M_PI*1.e6/(m))
50 
52 #define WN2HZ(w) (100.*VACUUMC*(w))
53 
55 #define HZ2WN(h) ((h)/(100.*VACUUMC))
56 
58 #define KELVIN2CELS(k) ((k)-273.15)
59 
60 #define CELS2KELVIN(c) ((c)+273.15)
61 
63 #define RAD2ARCSEC(r) (DEG2ARCSEC(RAD2DEG(r)))
64 
66 #define ARCSEC2RAD(a) (DEG2RAD(ARCSEC2DEG(a)))
67 
69 #define ARCMIN2RAD(a) (DEG2RAD(ARCMIN2DEG(a)))
70 
72 #define D2AREA(d) (M_PI_4*(d)*(d))
73 
74 #endif /* UNITS_H */
75 
76 /*
77 $Log:$
78 */