/* unitconv.h * Emilio, 10/1/99 * Added nDaysPerMonth array. * * Define a set of unit conversion constants, to be used in EMU and CASA code */ /* TIME CONVERSIONS */ #define YEAR2MONTH 12 #define YEAR2DAY 365.2425 #define MONTH2DAY (YEAR2DAY / YEAR2MONTH) /* 30.436875 */ #define MONTH2HOUR (MONTH2DAY * DAY2HOUR) /* 730.485 */ #define MONTH2SEC (MONTH2DAY * DAY2SEC) #define DAY2HOUR 24.0 #define DAY2SEC (DAY2HOUR * HOUR2SEC) /* 86400 */ #define HOUR2MIN 60.0 #define HOUR2SEC 3600.0 #define MIN2SEC 60.0 /* an array of 12 ints, one for each month, describing the number of days per month */ static int nDaysPerMonth[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; /* LENGTH, AREA, AND VOLUME CONVERSIONS */ #define DEG2KM 111.0 /* Degrees to Kilometers * * (at the equator) */ #define L2M3 1.0E-3 /* Liters to m^3 */ #define KM2M 1.0E+3 /* Kilometers to Meters */ #define MM2M 1.0E-3 /* Millimeters to Meters */ /* MASS CONVERSIONS */ #define MG2KG 1.0E-6 /* Milligrams To Kilograms */ /* OTHER CONVERSIONS */ /* is PI already defined in the standard math library, math.h ??? */ #define PI 3.141592653589793 #define RAD2DEG (180.0/PI) /* Radians to Degrees */ #define DEG2RAD (PI/180.0) /* Degrees to Radians */