#include <stdio.h>#include <stdlib.h>#include "AstroUtil/novas.h"Go to the source code of this file.
Defines | |
| #define | N_STARS 3 |
| #define | N_TIMES 4 |
Functions | |
| int | main (void) |
|
|
Definition at line 5 of file checkout-st.c. |
|
|
Definition at line 6 of file checkout-st.c. |
|
|
Definition at line 8 of file checkout-st.c. 00009 {
00010 /*
00011 Main function to check out many parts of NOVAS-C by calling
00012 function 'topo_star' with version 3 of function 'solarsystem'.
00013
00014 For use with NOVAS-C 2.0
00015 */
00016
00017 short int error = 0;
00018 short int i, j;
00019
00020 /*
00021 'deltat' is the difference in time scales, TT - UT1.
00022
00023 The array 'tjd' contains four selected Julian dates at which the
00024 star positions will be evaluated.
00025 */
00026
00027 double deltat = 60.0;
00028 double tjd[N_TIMES] = {2450203.5, 2450203.5, 2450417.5, 2450300.5};
00029 double ra, dec;
00030
00031 /*
00032 FK5 catalog data for three selected stars.
00033 */
00034
00035 cat_entry stars[N_STARS] = {
00036 {"FK5", "POLARIS", 0, 2.5301955556, 89.2640888889,
00037 19.8770, -1.520, 0.0070, -17.0},
00038 {"FK5", "Delta ORI", 1, 5.5334438889, -0.2991333333,
00039 0.0100, -0.220, 0.0140, 16.0},
00040 {"FK5", "Theta CAR", 2,10.7159355556,-64.3944666667,
00041 -0.3480, 1.000, 0.0000, 24.0}};
00042
00043 /*
00044 The observer's terrestrial coordinates (latitude, longitude, height).
00045 */
00046
00047 site_info geo_loc = {45.0, -75.0, 0.0, 10.0, 1010.0};
00048
00049 /*
00050 A structure containing the body designation for Earth.
00051 */
00052
00053 body earth;
00054
00055 /*
00056 Set up the structure containing the body designation for Earth.
00057 */
00058 /* added extra set of ()'s S.K. */
00059 if ((error = set_body (0,3,"Earth", &earth)))
00060 {
00061 printf ("Error %d from set_body.\n", error);
00062 exit (1);
00063 }
00064
00065 /*
00066 Compute the topocentric places of the three stars at the four
00067 selected Julian dates.
00068 */
00069
00070 for (i = 0; i < N_TIMES; i++)
00071 {
00072 for (j = 0; j < N_STARS; j++)
00073 {
00074 /* added extra set of ()'s S.K. */
00075 if ((error = topo_star (tjd[i],&earth,deltat,&stars[j],&geo_loc,
00076 &ra,&dec)))
00077 printf ("Error %d from topo_star. Star %d Time %d\n",
00078 error, j, i);
00079 else
00080 {
00081 printf ("JD = %f Star = %s\n", tjd[i], stars[j].starname);
00082 printf ("RA = %12.9f Dec = %12.8f\n", ra, dec);
00083 printf ("\n");
00084 }
00085 }
00086 printf ("\n");
00087 }
00088
00089 return (0);
00090 }
|
1.3.9.1