Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

novas.h

Go to the documentation of this file.
00001 /*
00002    NOVAS-C Version 2.0 (1 Nov 98)
00003    Header file for novas.c
00004 
00005    Naval Observatory Vector Astrometry Subroutines
00006    C Version
00007 
00008    U. S. Naval Observatory
00009    Astronomical Applications Dept.
00010    3450 Massachusetts Ave., NW
00011    Washington, DC  20392-5420
00012 */
00013 
00014 #ifndef _NOVAS_
00015    #define _NOVAS_
00016 
00017 #ifdef __cplusplus
00018 extern "C" {
00019 #endif /* __cplusplus */
00020 
00021    #ifndef __STDIO__
00022       #include <stdio.h>
00023    #endif
00024 
00025    #ifndef __MATH__
00026       #include <math.h>
00027    #endif
00028 
00029    #ifndef __STRING__
00030       #include <string.h>
00031    #endif
00032 
00033    #ifndef __STDLIB__
00034       #include <stdlib.h>
00035    #endif
00036 
00037    #ifndef __CTYPE__
00038       #include <ctype.h>
00039    #endif
00040 
00041    #ifndef _CONSTS_
00042       #include "novascon.h"
00043    #endif
00044 
00045    #ifndef _SOLSYS_
00046       #include "solarsystem.h"
00047    #endif
00048 
00049 /*
00050    Structures.
00051 */
00052 
00053 /*
00054    struct body: designates a celestial object.
00055 
00056    type              = type of body
00057                      = 0 ... major planet, Sun, or Moon
00058                      = 1 ... minor planet
00059    number            = body number
00060                        For 'type' = 0: Mercury = 1, ..., Pluto = 9,
00061                                        Sun = 10, Moon = 11
00062                        For 'type' = 1: minor planet number
00063    name              = name of the body (limited to 99 characters)
00064 */
00065 
00066    typedef struct
00067    {
00068       short int type;
00069       short int number;
00070       char name[100];
00071    } body;
00072 
00073 /*
00074    struct site_info: data for the observer's location.  The atmospheric 
00075                      parameters are used only by the refraction 
00076                      function called from function 'equ_to_hor'.
00077                      Additional parameters can be added to this 
00078                      structure if a more sophisticated refraction model 
00079                      is employed.
00080                      
00081    latitude           = geodetic latitude in degrees; north positive.
00082    longitude          = geodetic longitude in degrees; east positive.
00083    height             = height of the observer in meters.
00084    temperature        = temperature (degrees Celsius).
00085    pressure           = atmospheric pressure (millibars)
00086 */
00087 
00088    typedef struct
00089    {
00090       double latitude;
00091       double longitude;
00092       double height;
00093       double temperature;
00094       double pressure;
00095    } site_info;
00096 
00097 /*
00098    struct cat_entry: the astrometric catalog data for a star; equator 
00099                      and equinox and units will depend on the catalog.
00100                      While this structure can be used as a generic
00101                      container for catalog data, all high-level 
00102                      NOVAS-C functions require J2000.0 catalog data 
00103                      with FK5-type units (shown in square brackets
00104                      below).
00105                      
00106    catalog[4]         = 3-character catalog designator.
00107    starname[51]       = name of star.
00108    starnumber         = integer identifier assigned to star.
00109    ra                 = mean right ascension [hours].
00110    dec                = mean declination [degrees].
00111    promora            = proper motion in RA [seconds of time per 
00112                         century].
00113    promodec           = proper motion in declination [arcseconds per 
00114                         century].
00115    parallax           = parallax [arcseconds].
00116    radialvelocity     = radial velocity [kilometers per second].
00117 */
00118 
00119    typedef struct
00120    {
00121       char catalog[4];
00122       char starname[51];
00123       long int starnumber;
00124       double ra;
00125       double dec;
00126       double promora;
00127       double promodec;
00128       double parallax;
00129       double radialvelocity;
00130    } cat_entry;
00131 
00132 /*
00133    Define "origin" constants.
00134 */
00135 
00136    #define BARYC  0
00137    #define HELIOC 1
00138 
00139 /*
00140    Function prototypes
00141 */
00142 
00143    short int app_star (double tjd, body *earth, cat_entry *star,
00144 
00145                        double *ra, double *dec);
00146 
00147    short int app_planet (double tjd, body *ss_object, body *earth, 
00148 
00149                          double *ra, double *dec, double *dis);
00150 
00151    short int topo_star (double tjd, body *earth, double deltat,
00152                         cat_entry *star, site_info *location, 
00153 
00154                         double *ra, double *dec);
00155 
00156    short int topo_planet (double tjd, body *ss_object, body *earth,
00157                           double deltat, site_info *location, 
00158 
00159                           double *ra, double *dec, double *dis);
00160 
00161    short int virtual_star (double tjd, body *earth, cat_entry *star,
00162 
00163                            double *ra, double *dec);
00164 
00165    short int virtual_planet (double tjd, body *ss_object, body *earth,
00166 
00167                              double *ra, double *dec, double *dis);
00168 
00169    short int local_star (double tjd, body *earth, double deltat,
00170                          cat_entry *star, site_info *location,
00171 
00172                          double *ra, double *dec);
00173 
00174    short int local_planet (double tjd, body *ss_object, body *earth,
00175                            double deltat, site_info *location,
00176 
00177                            double *ra, double *dec, double *dis);
00178 
00179    short int astro_star (double tjd, body *earth, cat_entry *star,
00180 
00181                          double *ra, double *dec);
00182 
00183    short int astro_planet (double tjd, body *ss_object, body *earth,
00184 
00185                            double *ra, double *dec, double *dis);
00186 
00187    short int mean_star (double tjd, body *earth, double ra, double dec,
00188 
00189                         double *mra, double *mdec);
00190 
00191    void sidereal_time (double julianhi, double julianlo, double ee,
00192 
00193                        double *gst);
00194 
00195    void pnsw (double tjd, double gast, double x, double y, 
00196               double *vece,
00197 
00198               double *vecs);
00199 
00200    void spin (double st, double *pos1,
00201 
00202               double *pos2);
00203 
00204    void wobble (double x, double y, double *pos1,
00205 
00206                double *pos2);
00207 
00208    void terra (site_info *locale, double st,
00209 
00210                double *pos, double *vel);
00211 
00212    void earthtilt (double tjd,
00213 
00214                    double *mobl, double *tobl, double *eqeq,
00215                    double *psi, double *eps);
00216 
00217    void cel_pole (double del_dpsi, double del_deps);
00218 
00219    short int get_earth (double tjd, body *earth,
00220 
00221                         double *tdb, double *bary_earthp,
00222                         double *bary_earthv, double *helio_earthp,
00223                         double *helio_earthv);
00224 
00225    void proper_motion (double tjd1, double *pos1, double *vel1,
00226                        double tjd2,
00227 
00228                        double *pos2);
00229 
00230    void bary_to_geo (double *pos, double *earthvector,
00231 
00232                      double *pos2, double *lighttime);
00233 
00234    short int sun_field (double *pos, double *earthvector,
00235 
00236                         double *pos2);
00237 
00238    short int aberration (double *pos, double *vel, double lighttime,
00239 
00240                          double *pos2);
00241 
00242    void precession (double tjd1, double *pos, double tjd2,
00243 
00244                     double *pos2);
00245 
00246    short int nutate (double tjd, short int fn1, double *pos,
00247 
00248                      double *pos2);
00249 
00250    short int nutation_angles (double tdbtime,
00251 
00252                               double *longnutation,
00253                               double *obliqnutation);
00254 
00255    void fund_args (double t,
00256 
00257                    double a[5]);
00258 
00259    short int vector2radec (double *pos,
00260 
00261                            double *ra, double *dec);
00262 
00263    void radec2vector (double ra, double dec, double dist,
00264 
00265                       double *vector);
00266 
00267    void starvectors (cat_entry *star,
00268 
00269                      double *pos, double *vel);
00270 
00271    void tdb2tdt (double tdb,
00272 
00273                  double *tdtjd, double *secdiff);
00274 
00275    short int set_body (short int type, short int number,const char *name,
00276 
00277                        body *cel_obj);
00278 
00279    short int ephemeris (double tjd, body *cel_obj, short int origin,
00280 
00281                         double *pos, double *vel);
00282 
00283 
00284    short int solarsystem (double tjd, short int body, short int origin, 
00285 
00286                           double *pos, double *vel);
00287 
00288    double *readeph (int mp, char *name, double jd,
00289 
00290                     int *err);
00291 
00292    void make_cat_entry (char catalog[4], char star_name[51],
00293                         long int star_num, double ra, double dec,
00294                         double pm_ra, double pm_dec, double parallax,
00295                         double rad_vel,
00296 
00297                         cat_entry *star);
00298 
00299    void transform_hip (cat_entry *hipparcos,
00300 
00301                        cat_entry *fk5);
00302 
00303    void transform_cat (short int option, double date_incat, 
00304                         cat_entry *incat, double date_newcat,
00305                         const char* newcat_id,
00306 
00307                         cat_entry *newcat);
00308 
00309    void equ2hor (double tjd, double deltat, double x, double y, 
00310                  site_info *location, double ra, double dec, 
00311                  short int ref_option,
00312 
00313                  double *zd, double *az, double *rar, double *decr);
00314 
00315    double refract (site_info *location, short int ref_option, 
00316                    double zd_obs);
00317 
00318    double julian_date (short int year, short int month, short int day,
00319                        double hour);
00320 
00321    void cal_date (double tjd,
00322 
00323                   short int *year, short int *month, short int *day,
00324                   double *hour);
00325 
00326 #ifdef __cplusplus 
00327 }
00328 #endif /* __cplusplus */
00329 
00330 #endif

Generated on Mon Feb 15 11:07:05 2010 for loon by  doxygen 1.3.9.1