00001 /* 00002 * soi_ephem.h 00003 * 00004 * Defines and declarations for ephemeris functions in libastro. 00005 * 00006 * Responsible: Rick Bogart RBogart@solar.Stanford.EDU 00007 * 00008 * Revision history is at the end of the file. 00009 */ 00010 00011 #ifndef SOI_EPHEM_INCL 00012 00013 #ifndef SOI_VERSION_INCL 00014 #include <soi_version.h> 00015 #endif 00016 00017 #include <timeio.h> 00018 00019 /****************************************************************************/ 00020 /**************************** DEFINE STATEMENTS ***************************/ 00021 /****************************************************************************/ 00022 00023 #define SOI_EPHEM_VERSION_NUM (2.9) 00024 #define SOI_EPHEM_INCL 1 00025 00026 #define EPHEM_OFFSET (-11865398400.0) /* (sscan_time ("1601.01.01_00:00:00")) */ 00027 00028 #define EPHEM_SIZE 35 /* size of array to declare for solephem etc. */ 00029 00030 #define EPHEM_T 1 /* time used for calculations */ 00031 #define EPHEM_TCENT 2 /* time in centuries since 1900.0 */ 00032 #define EPHEM_JD 3 /* time as Julian date */ 00033 #define EPHEM_ST 4 /* sidereal time */ 00034 #define EPHEM_RA 5 /* right ascention (geometric) */ 00035 #define EPHEM_DEC 6 /* declination (geometric) */ 00036 #define EPHEM_CLONG 7 /* geometric longitude */ 00037 #define EPHEM_L0 8 /* carrington degrees of central point of disk */ 00038 #define EPHEM_B0 9 /* latitude of central point of disk */ 00039 #define EPHEM_P 10 /* position angle of northern extremity of rotation */ 00040 /* axis. + to east from north (in sky) */ 00041 #define EPHEM_DIST 11 /* true distance to sun (AU) */ 00042 #define EPHEM_RSUN 12 /* true semi-diameter of sun (arc-sec) */ 00043 #define EPHEM_VEARTH 13 /* angular velocity of earth (m/s) */ 00044 #define EPHEM_EOT 14 /* equation of time */ 00045 #define EPHEM_B0V 15 /* b0 wobble (m per s) */ 00046 #define EPHEM_PHI 16 /* phi = aux angle for deltav */ 00047 #define EPHEM_SINP 17 /* sin(p) */ 00048 #define EPHEM_COSP 18 /* cos(p) */ 00049 #define EPHEM_PAROT 19 /* pa of rotation axis wrt ecliptic */ 00050 /* the following defined in delta_v */ 00051 #define EPHEM_RHO 20 /* rho */ 00052 #define EPHEM_L 21 /* Longitude on disk */ 00053 #define EPHEM_B 22 /* heliographic latitude */ 00054 #define EPHEM_R 23 /* r/Rsun */ 00055 #define EPHEM_SECZ 24 /* 1/cos(zentih angle) */ 00056 #define EPHEM_SINL 25 /* sin(L) */ 00057 #define EPHEM_SINB 26 /* sin(B) */ 00058 /* the following defined in deltaI */ 00059 #define EPHEM_IA 27 /* I/I_zenith */ 00060 #define EPHEM_LD 28 /* I/I_center - limb darkening 5250 */ 00061 #define EPHEM_AIRM 29 /* airmass */ 00062 #define EPHEM_DV 30 /* deltav */ 00063 /* the following defined in sun_ephemeris */ 00064 #define EPHEM_OBS_LON 31 /* Observer longitude */ 00065 #define EPHEM_OBS_LAT 32 /* Observer latitude */ 00066 /* following used in mdi_point() */ 00067 #define MDIPT_TIME_BEFORE_START (-1) 00068 #define MDIPT_TIME_BEYOND_END (1) 00069 #define MDIPT_CANT_INTERPOLATE (2) 00070 #define MDIPT_CANT_READ_TABLE (-2) 00071 #define MDIPT_FROM_QUICKLOOK (3) 00072 00073 #define MDIPT_USE_BEST (0) 00074 #define MDIPT_USE_QUICKLOOK (1) /* ftp data from EOF */ 00075 #define MDIPT_USE_DISTRIB (2) /* cdrom data */ 00076 #define MDIPT_USE_DEFINITIVE (2) /* GSFC name for cdrom data */ 00077 #define MDIPT_USE_SMOOTH (3) /* smoothed data */ 00078 #define MDIPT_USE_DEFAULT (4) /* default value 511.5 */ 00079 00080 #define MDIROLL_TIME_BEFORE_START (-1) 00081 #define MDIROLL_TIME_BEYOND_END (1) 00082 #define MDIROLL_CANT_INTERPOLATE (2) 00083 #define MDIROLL_CANT_READ_TABLE (-2) 00084 #define MDIROLL_BAD_TABLE (-3) 00085 00086 #define MDIROLL_USE_DEFAULT (0) /* rollangle = 0.0 */ 00087 #define MDIROLL_USE_CONSTANT (1) /* rollangle = constant */ 00088 #define MDIROLL_USE_SMOOTH (2) /* "smoothed" table */ 00089 #define MDIROLL_USE_RAW (3) /* raw roll table from CDHF */ 00090 #define MDIROLL_USE_TABLE (4) /* user-specified roll table */ 00091 00092 /* 00093 * List of observatories and platforms with known location information. 00094 * The values here are longitude west and latitude in degrees. 00095 */ 00096 00097 #define OBS_LOC_WSO 122.167,36.967 /* Wilcox Solar Obs, Stanford */ 00098 /* values picked so numbers in solephem will be unchanged */ 00099 #define OBS_LOC_MWO 118.060,34.217 /* Mt Wilson Observatory */ 00100 #define OBS_LOC_BBSO 000.000,00.000 /* Big Bear Solar Observatory */ 00101 #define OBS_LOC_NSO 110.948,32.233 /* NSO office in Tucson */ 00102 #define OBS_LOC_KPNO 111.595,31.958 /* NSO at Kitt Peak */ 00103 #define OBS_LOC_SPO 75.357,39.905 /* NSO at Sac Peak */ 00104 #define OBS_LOC_SPOLE 000.000,-90.00 /* South Pole */ 00105 #define OBS_LOC_CRAO 000.000,00.000 /* Crimean Astrophys Obs */ 00106 00107 /****************************************************************************/ 00108 /******************************* TYPEDEFS *********************************/ 00109 /****************************************************************************/ 00110 00111 00112 /****************************************************************************/ 00113 /*************************** FUNCTION PROTOTYPES **************************/ 00114 /****************************************************************************/ 00115 00116 /* libastro */ 00117 /* mdi_roll.c */ 00118 extern int mdi_roll (char *rolltbl, TIME tobs, double *roll, TIME *tmod); 00119 /* mdi_pointing.c */ 00120 extern int mdi_point (TIME obs_time, double *xc, double *yc, TIME *mod_time, 00121 int source); 00122 extern int mdi_pointing (TIME obs_time, double *xc, double *yc, TIME *mod_time); 00123 /* sun_ephemeris.c */ 00124 extern int soho_ephemeris (TIME obs_time, double *r, double *lat, double *lon, 00125 double *vr, double *vn, double *vw, TIME *mod_time); 00126 extern double soho_obs_dist (TIME t); 00127 extern double soho_latitude (TIME t); 00128 extern double soho_longitude (TIME t); 00129 extern void sun_ephemeris (TIME time, double *ephem, double longi, double lat); 00130 extern double sun_delta_v (TIME time, double *ephem, double x, double y); 00131 extern double carrington_rots (TIME time); 00132 extern TIME SOHO_meridian_crossing (double lon, int car_rot); 00133 extern TIME earth_meridian_crossing (double lon, int car_rot); 00134 extern TIME meridian_crossing (double lon, int car_rot); 00135 00136 /* old functions, should be reserved for WSO programs */ 00137 00138 extern void solephem (double time, double *ephem); 00139 extern double delta_v (double time, double *ephem, double x, double y); 00140 00141 00142 #endif 00143 /* 00144 * Revision History 00145 * 96.08.08 Rick Bogart added prototypes for mdi_pointing() 00146 and soho_ephemeris(); repaired declarations for sun_ephemeris() 00147 and sun_delta_v(); 00148 * 96.09.11 R Bogart added table mod time argument to 00149 mdi_pointing() and soho_ephemeris() 00150 * 97.01.03 R Bogart added declaration for carrington_rots() 00151 * 97.04.21 R Bogart add declaration for meridian_crossing() 00152 * 98.02.24 R Bogart new prototype of mdi_pointing and defs 00153 * to support multiple data sources 00154 * 98.03.13 Kay Leibrand added defines for MDIPT_USE_DISTRIB and 00155 MDIPT_USE_SMOOTH, making MDIPT_USE_DISTRIB equivalent to 00156 MDIPT_USE_DEFINITIVE 00157 * 98.11.23 Kecheng Chu added MDIROLL_* 00158 * 01.02.28 R Bogart added helper functions for aspects of 00159 soho_ephemeris 00160 * 01.05.07 K Chu added MDIPT_USE_DEFAULT 00161 * 04.01.29 R Bogart added one more define for solephem 00162 * 06.08.10 R Bogart added declarations for additional meridian 00163 * crossing functions; changed soi_time.h to timeio.h 00164 */ 00165 00166 /* 00167 $Id: soi_ephem.h,v 1.1 2013/07/11 15:13:59 yliu Exp $ 00168 $Source: /home/cvsuser/cvsroot/JSOC/proj/mag/synop/apps/soi_ephem.h,v $ 00169 $Author: yliu $ 00170 * $Log: soi_ephem.h,v $ 00171 * Revision 1.1 2013/07/11 15:13:59 yliu 00172 * new module for producing synoptic charts for MDI line-of-sight mags 00173 * 00174 * Revision 1.16 2007/05/04 21:18:23 rick 00175 * see above 00176 * 00177 * Revision 1.15 2004/01/30 01:15:45 rick 00178 * see above 00179 * 00180 * Revision 1.14 2001/05/07 22:07:07 kehcheng 00181 * added MDIPT_USE_DEFAULT 00182 * 00183 * Revision 1.13 2001/02/28 22:35:34 rick 00184 * added helper functions for aspects of soho_ephemeris 00185 * 00186 * Revision 1.12 1998/11/23 18:41:20 kehcheng 00187 * added MDIROLL_* 00188 * 00189 * Revision 1.11 1998/03/13 23:05:21 kay 00190 * added defines for MDIPT_USE_DISTRIB and MDIPT_USE_SMOOTH 00191 * making MDIPT_USE_DISTRIB equivalent to MDIPT_USE_DEFINITIVE 00192 * 00193 * Revision 1.10 1998/02/25 19:31:49 rick 00194 * see above 00195 * 00196 * Revision 1.9 1997/05/01 22:43:50 rick 00197 * see above 00198 * 00199 * Revision 1.8 1997/04/16 21:51:36 kehcheng 00200 * added #include <soi_version.h> 00201 * 00202 * Revision 1.7 1997/01/13 18:43:06 rick 00203 * see above 00204 * 00205 * Revision 1.6 1996/09/12 09:48:40 rick 00206 * see above 00207 * 00208 * Revision 1.5 1996/08/15 15:41:14 CM 00209 * change stdtime.h to soi_time.h 00210 * 00211 * Revision 1.4 1996/08/15 00:18:43 CM 00212 * added include <stdtime.h> 00213 * 00214 * Revision 1.3 1996/08/14 20:55:55 rick 00215 * see above 00216 * 00217 * Revision 1.2 1995/07/13 22:31:04 phil 00218 * *** empty log message *** 00219 * */