home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / astrnomy / ephem421.zip / CIRCUM.H < prev    next >
C/C++ Source or Header  |  1990-09-13  |  3KB  |  69 lines

  1. #define    SPD    (24.0*3600.0)    /* seconds per day */
  2.  
  3. #define    EOD    (-9786)        /* special epoch flag: use epoch of date */
  4. #define    RTC    (-1324)        /* special tminc flag: use rt clock */
  5. #define    NOMJD    (-58631.)    /* an unlikely mjd for initing static mjd's */
  6. #define    NOHELIO    (-2314)        /* special s_hlong flag: means it and s_hlat are
  7.                  * undefined
  8.                  */
  9.  
  10. #define    STDHZN        0    /* rise/set times based on nominal conditions */
  11. #define    ADPHZN        1    /* rise/set times based on exact current " */
  12. #define    TWILIGHT    2    /* rise/set times for sun 18 degs below hor */
  13.  
  14. /* info about our local observing circumstances */
  15. typedef struct {
  16.     double n_mjd;    /* modified Julian date, ie, days since
  17.              * Jan 0.5 1900 (== 12 noon, Dec 30, 1899), utc.
  18.              * enough precision to get well better than 1 second.
  19.              * N.B. if not first member, must move NOMJD inits.
  20.              */
  21.     double n_lat;    /* latitude, >0 north, rads */
  22.     double n_lng;    /* longitude, >0 east, rads */
  23.     double n_tz;    /* time zone, hrs behind UTC */
  24.     double n_temp;    /* atmospheric temp, degrees C */
  25.     double n_pressure; /* atmospheric pressure, mBar */
  26.     double n_height;    /* height above sea level, earth radii */
  27.     double n_epoch;    /* desired precession display epoch as an mjd, or EOD */
  28.     char n_tznm[4];    /* time zone name; 3 chars or less, always 0 at end */
  29. } Now;
  30. extern double    mjd_day(), mjd_hr();
  31.  
  32. /* info about where and how we see something in the sky */
  33. typedef struct {
  34.     double s_ra;    /* ra, rads (precessed to n_epoch) */
  35.     double s_dec;    /* dec, rads (precessed to n_epoch) */
  36.     double s_az;    /* azimuth, >0 e of n, rads */
  37.     double s_alt;    /* altitude above topocentric horizon, rads */
  38.     double s_sdist;    /* dist from object to sun, au */
  39.     double s_edist;    /* dist from object to earth, au */
  40.     double s_elong;    /* angular sep between object and sun, >0 if east */
  41.     double s_hlong;    /* heliocentric longitude, rads */
  42.     double s_hlat;    /* heliocentric latitude, rads */
  43.     double s_size;    /* angular size, arc secs */
  44.     double s_phase;    /* phase, % */
  45.     double s_mag;    /* visual magnitude */
  46. } Sky;
  47.  
  48. /* flags for riset_cir() status */
  49. #define    RS_NORISE    0x001    /* object does not rise as such today */
  50. #define    RS_2RISES    0x002    /* object rises more than once today */
  51. #define    RS_NOSET    0x004    /* object does not set as such today */
  52. #define    RS_2SETS    0x008    /* object sets more than once today */
  53. #define    RS_CIRCUMPOLAR    0x010    /* object stays up all day today */
  54. #define    RS_2TRANS    0x020    /* transits twice in one day */
  55. #define    RS_NEVERUP    0x040    /* object never rises today */
  56. #define    RS_NOTRANS    0x080    /* doesn't transit today */
  57. #define    RS_ERROR    0x100    /* can't figure out times... */
  58.  
  59. /* shorthands for fields a Now pointer, np */
  60. #define mjd    np->n_mjd
  61. #define lat    np->n_lat
  62. #define lng    np->n_lng
  63. #define tz    np->n_tz
  64. #define temp    np->n_temp
  65. #define pressure np->n_pressure
  66. #define height    np->n_height
  67. #define epoch    np->n_epoch
  68. #define tznm    np->n_tznm
  69.