/* sol.c * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Test pb0r.c * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Andrew L. Stanger HAO/NCAR 25 March 1999 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include main (argc, argv) int argc ; char *argv [] ; { static char progname [24] ; int ierr ; int iyear = 1582 ; int imonth = 10 ; int iday = 15 ; int ihour = 12 ; int iminute = 0 ; int isecond = 0; double pangle ; double bangle ; double rsun ; if (argc == 7) { sscanf (argv [0], "%s", progname) ; sscanf (argv [1], "%d", &iyear) ; sscanf (argv [2], "%d", &imonth) ; sscanf (argv [3], "%d", &iday) ; sscanf (argv [4], "%d", &ihour) ; sscanf (argv [5], "%d", &iminute) ; sscanf (argv [6], "%d", &isecond) ; } fprintf (stdout, "iyear : %4d\n", iyear) ; fprintf (stdout, "imonth : %4d\n", imonth) ; fprintf (stdout, "iday : %4d\n", iday) ; fprintf (stdout, "ihour : %4d\n", ihour) ; fprintf (stdout, "iminute : %4d\n", iminute) ; fprintf (stdout, "isecond : %4d\n", isecond) ; ierr = pb0r (iyear, imonth, iday, ihour, iminute, isecond, &pangle, &bangle, &rsun) ; fprintf (stdout, "ierr: %d\n", ierr) ; fprintf (stdout, "pangle: %8.3f\n", pangle) ; fprintf (stdout, "bangle: %8.3f\n", bangle) ; fprintf (stdout, "Rsun : %8.3f\n", rsun) ; }