OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
novas.h
Go to the documentation of this file.
1 /*
2  NOVAS-C Version 2.0 (1 Nov 98)
3  Header file for novas.c
4 
5  Naval Observatory Vector Astrometry Subroutines
6  C Version
7 
8  U. S. Naval Observatory
9  Astronomical Applications Dept.
10  3450 Massachusetts Ave., NW
11  Washington, DC 20392-5420
12 */
13 
14 #ifndef _NOVAS_
15  #define _NOVAS_
16 
17  #ifndef __STDIO__
18  #include <stdio.h>
19  #endif
20 
21  #ifndef __MATH__
22  #include <math.h>
23  #endif
24 
25  #ifndef __STRING__
26  #include <string.h>
27  #endif
28 
29  #ifndef __STDLIB__
30  #include <stdlib.h>
31  #endif
32 
33  #ifndef __CTYPE__
34  #include <ctype.h>
35  #endif
36 
37  #ifndef _JPLINT_
38  #include "jplint.h"
39  #endif
40 
41  #ifndef _CONSTS_
42  #include "novascon.h"
43  #endif
44 
45  #ifndef _SOLSYS_
46  #include "solarsystem.h"
47  #endif
48 
49 /*
50  Structures.
51 */
52 
53 /*
54  struct body: designates a celestial object.
55 
56  type = type of body
57  = 0 ... major planet, Sun, or Moon
58  = 1 ... minor planet
59  number = body number
60  For 'type' = 0: Mercury = 1, ..., Pluto = 9,
61  Sun = 10, Moon = 11
62  For 'type' = 1: minor planet number
63  name = name of the body (limited to 99 characters)
64 */
65 
66  typedef struct
67  {
68  short int type;
69  short int number;
70  char name[100];
71  } body;
72 
73 /*
74  struct site_info: data for the observer's location. The atmospheric
75  parameters are used only by the refraction
76  function called from function 'equ_to_hor'.
77  Additional parameters can be added to this
78  structure if a more sophisticated refraction model
79  is employed.
80 
81  latitude = geodetic latitude in degrees; north positive.
82  longitude = geodetic longitude in degrees; east positive.
83  height = height of the observer in meters.
84  temperature = temperature (degrees Celsius).
85  pressure = atmospheric pressure (millibars)
86 */
87 
88  typedef struct
89  {
90  double latitude;
91  double longitude;
92  double height;
93  double temperature;
94  double pressure;
95  } site_info;
96 
97 /*
98  struct cat_entry: the astrometric catalog data for a star; equator
99  and equinox and units will depend on the catalog.
100  While this structure can be used as a generic
101  container for catalog data, all high-level
102  NOVAS-C functions require J2000.0 catalog data
103  with FK5-type units (shown in square brackets
104  below).
105 
106  catalog[4] = 3-character catalog designator.
107  starname[51] = name of star.
108  starnumber = integer identifier assigned to star.
109  ra = mean right ascension [hours].
110  dec = mean declination [degrees].
111  promora = proper motion in RA [seconds of time per
112  century].
113  promodec = proper motion in declination [arcseconds per
114  century].
115  parallax = parallax [arcseconds].
116  radialvelocity = radial velocity [kilometers per second].
117 */
118 
119  typedef struct
120  {
121  char catalog[4];
122  char starname[51];
123  long int starnumber;
124  double ra;
125  double dec;
126  double promora;
127  double promodec;
128  double parallax;
130  } cat_entry;
131 
132 /*
133  Define "origin" constants.
134 */
135 
136  #define BARYC 0
137  #define HELIOC 1
138 
139 /*
140  Function prototypes
141 */
142 
143  short int app_star (double tjd, body *earth, cat_entry *star,
144 
145  double *ra, double *dec);
146 
147  short int app_planet (double tjd, body *ss_object, body *earth,
148 
149  double *ra, double *dec, double *dis);
150 
151  short int topo_star (double tjd, body *earth, double deltat,
152  cat_entry *star, site_info *location,
153 
154  double *ra, double *dec);
155 
156  short int topo_planet (double tjd, body *ss_object, body *earth,
157  double deltat, site_info *location,
158 
159  double *ra, double *dec, double *dis);
160 
161  short int virtual_star (double tjd, body *earth, cat_entry *star,
162 
163  double *ra, double *dec);
164 
165  short int virtual_planet (double tjd, body *ss_object, body *earth,
166 
167  double *ra, double *dec, double *dis);
168 
169  short int local_star (double tjd, body *earth, double deltat,
170  cat_entry *star, site_info *location,
171 
172  double *ra, double *dec);
173 
174  short int local_planet (double tjd, body *ss_object, body *earth,
175  double deltat, site_info *location,
176 
177  double *ra, double *dec, double *dis);
178 
179  short int astro_star (double tjd, body *earth, cat_entry *star,
180 
181  double *ra, double *dec);
182 
183  short int astro_planet (double tjd, body *ss_object, body *earth,
184 
185  double *ra, double *dec, double *dis);
186 
187  short int mean_star (double tjd, body *earth, double ra, double dec,
188 
189  double *mra, double *mdec);
190 
191  void sidereal_time (double julianhi, double julianlo, double ee,
192 
193  double *gst);
194 
195  void pnsw (double tjd, double gast, double x, double y,
196  double *vece,
197 
198  double *vecs);
199 
200  void spin (double st, double *pos1,
201 
202  double *pos2);
203 
204  void wobble (double x, double y, double *pos1,
205 
206  double *pos2);
207 
208  void terra (site_info *locale, double st,
209 
210  double *pos, double *vel);
211 
212  void earthtilt (double tjd,
213 
214  double *mobl, double *tobl, double *eqeq,
215  double *psi, double *eps);
216 
217  void cel_pole (double del_dpsi, double del_deps);
218 
219  short int get_earth (double tjd, body *earth,
220 
221  double *tdb, double *bary_earthp,
222  double *bary_earthv, double *helio_earthp,
223  double *helio_earthv);
224 
225  void proper_motion (double tjd1, double *pos1, double *vel1,
226  double tjd2,
227 
228  double *pos2);
229 
230  void bary_to_geo (double *pos, double *earthvector,
231 
232  double *pos2, double *lighttime);
233 
234  short int sun_field (double *pos, double *earthvector,
235 
236  double *pos2);
237 
238  short int aberration (double *pos, double *vel, double lighttime,
239 
240  double *pos2);
241 
242  void precession (double tjd1, double *pos, double tjd2,
243 
244  double *pos2);
245 
246  short int nutate (double tjd, short int fn1, double *pos,
247 
248  double *pos2);
249 
250  short int nutation_angles (double tdbtime,
251 
252  double *longnutation,
253  double *obliqnutation,
254  double args[5]);
255 
256  void fund_args (double t,
257 
258  double a[5]);
259 
260  short int vector2radec (double *pos,
261 
262  double *ra, double *dec);
263 
264  void radec2vector (double ra, double dec, double dist,
265 
266  double *vector);
267 
268  void starvectors (cat_entry *star,
269 
270  double *pos, double *vel);
271 
272  void tdb2tdt (double tdb,
273 
274  double *tdtjd, double *secdiff);
275 
276  short int set_body (short int type, short int number, char *name,
277 
278  body *cel_obj);
279 
280  short int ephemeris (double tjd, body *cel_obj, short int origin,
281 
282  double *pos, double *vel);
283 
284 
285  short int solarsystem (double tjd, short int body, short int origin,
286 
287  double *pos, double *vel);
288 
289  double *readeph (int mp, char *name, double jd,
290 
291  int *err);
292 
293  void make_cat_entry (char catalog[4], char star_name[51],
294  long int star_num, double ra, double dec,
295  double pm_ra, double pm_dec, double parallax,
296  double rad_vel,
297 
298  cat_entry *star);
299 
300  void transform_hip (cat_entry *hipparcos,
301 
302  cat_entry *fk5);
303 
304  void transform_cat (short int option, double date_incat,
305  cat_entry *incat, double date_newcat,
306  char newcat_id[4],
307 
308  cat_entry *newcat);
309 
310  void equ2hor (double tjd, double deltat, double x, double y,
311  site_info *location, double ra, double dec,
312  short int ref_option,
313 
314  double *zd, double *az, double *rar, double *decr);
315 
316  double refract (site_info *location, short int ref_option,
317  double zd_obs);
318 
319  double julian_date (short int year, short int month, short int day,
320  double hour);
321 
322  void cal_date (double tjd,
323 
324  short int *year, short int *month, short int *day,
325  double *hour);
326 
327 #endif
void proper_motion(double tjd1, double *pos1, double *vel1, double tjd2, double *pos2)
short int virtual_planet(double tjd, body *ss_object, body *earth, double *ra, double *dec, double *dis)
data_t t[NROOTS+1]
Definition: decode_rs.h:77
double pressure
Definition: novas.h:94
void terra(site_info *locale, double st, double *pos, double *vel)
short int topo_star(double tjd, body *earth, double deltat, cat_entry *star, site_info *location, double *ra, double *dec)
short int astro_planet(double tjd, body *ss_object, body *earth, double *ra, double *dec, double *dis)
short int solarsystem(double tjd, short int body, short int origin, double *pos, double *vel)
float * vector(long nl, long nh)
Definition: nrutil.c:15
int32_t day
short int ephemeris(double tjd, body *cel_obj, short int origin, double *pos, double *vel)
double julian_date(short int year, short int month, short int day, double hour)
short int number
Definition: novas.h:69
short int mean_star(double tjd, body *earth, double ra, double dec, double *mra, double *mdec)
void spin(double st, double *pos1, double *pos2)
short int vector2radec(double *pos, double *ra, double *dec)
void wobble(double x, double y, double *pos1, double *pos2)
subroutine earth(pos, vel, widphse1, widphfl1, widphse2,
Definition: earth.f:2
short int topo_planet(double tjd, body *ss_object, body *earth, double deltat, site_info *location, double *ra, double *dec, double *dis)
float32 * pos
Definition: l1_czcs_hdf.c:35
long int starnumber
Definition: novas.h:123
void radec2vector(double ra, double dec, double dist, double *vector)
void starvectors(cat_entry *star, double *pos, double *vel)
Definition: novas.h:66
short int sun_field(double *pos, double *earthvector, double *pos2)
double ra
Definition: novas.h:124
void pnsw(double tjd, double gast, double x, double y, double *vece, double *vecs)
void fund_args(double t, double a[5])
short int local_planet(double tjd, body *ss_object, body *earth, double deltat, site_info *location, double *ra, double *dec, double *dis)
short int app_star(double tjd, body *earth, cat_entry *star, double *ra, double *dec)
double refract(site_info *location, short int ref_option, double zd_obs)
void cal_date(double tjd, short int *year, short int *month, short int *day, double *hour)
void transform_cat(short int option, double date_incat, cat_entry *incat, double date_newcat, char newcat_id[4], cat_entry *newcat)
void earthtilt(double tjd, double *mobl, double *tobl, double *eqeq, double *psi, double *eps)
short int nutation_angles(double tdbtime, double *longnutation, double *obliqnutation, double args[5])
double radialvelocity
Definition: novas.h:129
short int astro_star(double tjd, body *earth, cat_entry *star, double *ra, double *dec)
void cel_pole(double del_dpsi, double del_deps)
Definition: jd.py:1
void equ2hor(double tjd, double deltat, double x, double y, site_info *location, double ra, double dec, short int ref_option, double *zd, double *az, double *rar, double *decr)
void make_cat_entry(char catalog[4], char star_name[51], long int star_num, double ra, double dec, double pm_ra, double pm_dec, double parallax, double rad_vel, cat_entry *star)
double temperature
Definition: novas.h:93
short int get_earth(double tjd, body *earth, double *tdb, double *bary_earthp, double *bary_earthv, double *helio_earthp, double *helio_earthv)
double promodec
Definition: novas.h:127
short int nutate(double tjd, short int fn1, double *pos, double *pos2)
double * readeph(int mp, char *name, double jd, int *err)
void origin(double A)
Definition: proj_report.c:190
void bary_to_geo(double *pos, double *earthvector, double *pos2, double *lighttime)
short int set_body(short int type, short int number, char *name, body *cel_obj)
short int aberration(double *pos, double *vel, double lighttime, double *pos2)
double promora
Definition: novas.h:126
short int local_star(double tjd, body *earth, double deltat, cat_entry *star, site_info *location, double *ra, double *dec)
void sidereal_time(double julianhi, double julianlo, double ee, double *gst)
Definition: novas.h:119
double latitude
Definition: novas.h:90
short int type
Definition: novas.h:68
double longitude
Definition: novas.h:91
void tdb2tdt(double tdb, double *tdtjd, double *secdiff)
double height
Definition: novas.h:92
short int app_planet(double tjd, body *ss_object, body *earth, double *ra, double *dec, double *dis)
PGE01 indicating that PGE02 PGE01 V6 for and PGE01 V2 for MOD03 were used to produce the granule By convention adopted in all MODIS Terra PGE02 code versions are The fourth digit of the PGE02 version denotes the LUT version used to produce the granule The source of the metadata environment variable ProcessingCenter was changed from a QA LUT value to the Process Configuration A sign used in error in the second order term was changed to a
Definition: HISTORY.txt:424
void precession(double tjd1, double *pos, double tjd2, double *pos2)
double parallax
Definition: novas.h:128
short int virtual_star(double tjd, body *earth, cat_entry *star, double *ra, double *dec)
double dec
Definition: novas.h:125
void transform_hip(cat_entry *hipparcos, cat_entry *fk5)