65 static void viv(
int ival,
int ivalok,
const char *func,
const char *test,
90 printf(
"%s failed: %s want %d got %d\n",
91 func, test, ivalok, ival);
93 printf(
"%s passed: %s want %d got %d\n",
94 func, test, ivalok, ival);
99 static void vvd(
double val,
double valok,
double dval,
100 const char *func,
const char *test,
int *status)
127 if (fabs(a) > dval) {
130 printf(
"%s failed: %s want %.20g got %.20g (1/%.3g)\n",
131 func, test, valok, val, f);
133 printf(
"%s passed: %s want %.20g got %.20g\n",
134 func, test, valok, val);
140 static void vcs(
const char * val,
const char * valok,
141 const char * func,
const char * test,
144 if (strcmp(val, valok) != 0) {
146 printf(
"%s failed: %s want %s got %s\n",
147 func, test, valok, val );
149 printf(
"%s passed: %s want %s got %s\n",
150 func, test, valok, val );
158 vrmat(
double rmat[3][3],
double expected[3][3],
const char * func,
159 double dval,
int * status ) {
162 for( i = 0; i < 3; i++ ) {
164 for( j = 0; j < 3; j++ ) {
166 vvd( rmat[i][j], expected[i][j], dval, func, buf, status );
173 vvec(
int len,
double *vec,
double *expected,
const char *func,
177 for( i = 0; i < len; i++ ) {
179 vvd( vec[i], expected[i], 1e-12, func, buf, status );
196 vvd ( r1 - rm, 2.983864874295250e-6, 1e-12,
"palAddet",
198 vvd ( d1 - dm, 2.379650804185118e-7, 1e-12,
"palAddet",
202 vvd ( r2 - rm, 0, 1e-12,
"palSubet",
"R", status );
203 vvd ( d2 - dm, 0, 1e-12,
"palSubet",
"D", status );
212 const char * s =
"12 34 56.7 |";
213 const char * s2 =
"45 00 00.000 ";
216 viv ( i, 12,
"palDafin",
"I", status );
217 vvd ( d, 0.2196045986911432, 1e-12,
"palDafin",
"A",
219 viv ( j, 0,
"palDafin",
"J", status );
223 viv ( i, 14,
"palDafin",
"I", status );
226 viv ( j, 0,
"palDafin",
"J", status );
232 double az, azd, azdd, el, eld, eldd, pa, pad, padd;
234 &az, &azd, &azdd, &el, &eld, &eldd, &pa, &pad, &padd );
236 vvd ( az, 4.400560746660174, 1e-12,
"palAltaz",
238 vvd ( azd, -0.2015438937145421, 1e-13,
"palAltaz",
240 vvd ( azdd, -0.4381266949668748, 1e-13,
"palAltaz",
242 vvd ( el, 1.026646506651396, 1e-12,
"palAltaz",
244 vvd ( eld, -0.7576920683826450, 1e-13,
"palAltaz",
246 vvd ( eldd, 0.04922465406857453, 1e-14,
"palAltaz",
248 vvd ( pa, 1.707639969653937, 1e-12,
"palAltaz",
250 vvd ( pad, 0.4717832355365627, 1e-13,
"palAltaz",
252 vvd ( padd, -0.2957914128185515, 1e-13,
"palAltaz",
260 1e-12,
"palAirmas",
" ", status );
270 palAmp ( 2.345, -1.234, 50100, 1990, &rm, &dm );
271 vvd ( rm, 2.344472180027961, 1e-6,
"palAmp",
"R",
273 vvd ( dm, -1.233573099847705, 1e-7,
"palAmp",
"D",
277 palAmp( 1.234, -0.567, 55927.0, 2010.0, &rm, &dm );
278 vvd( rm, 1.2335120411026936349, 1.0E-12,
"palAmp",
"rm", status );
279 vvd( dm, -0.56702908706930343907, 1.0E-12,
"palAmp",
"dm", status );
288 double rap, dap, date, dut, elongm, phim, hm, xp, yp,
289 tdk, pmb, rh, wl, tlr, aob, zob, hob, dob, rob, aoprms[14];
304 for (i=1; i<=3; i++) {
309 }
else if ( i == 2 ) {
315 palAop ( rap, dap, date, dut, elongm, phim, hm, xp, yp,
316 tdk, pmb, rh, wl, tlr, &aob, &zob, &hob, &dob, &rob );
319 vvd( aob, 1.812817787123283034, 1e-10,
"palAop",
321 vvd( zob, 1.393860816635714034, 1e-8,
"palAop",
323 vvd( hob, -1.297808009092456683, 1e-8,
"palAop",
325 vvd( dob, -0.122967060534561, 1e-8,
"palAop",
327 vvd( rob, 2.699270287872084, 1e-8,
"palAop",
329 }
else if ( i == 2 ) {
330 vvd( aob, 2.019928026670621442, 1e-10,
"palAop",
332 vvd( zob, 1.101316172427482466, 1e-10,
"palAop",
334 vvd( hob, -0.9432923558497740862, 1e-10,
"palAop",
336 vvd( dob, -0.1232144708194224, 1e-10,
"palAop",
338 vvd( rob, 2.344754634629428, 1e-10,
"palAop",
341 vvd( aob, 2.019928026670621442, 1e-10,
"palAop",
343 vvd( zob, 1.101267532198003760, 1e-10,
"palAop",
345 vvd( hob, -0.9432533138143315937, 1e-10,
"palAop",
347 vvd( dob, -0.1231850665614878, 1e-10,
"palAop",
349 vvd( rob, 2.344715592593984, 1e-10,
"palAop",
357 palAoppa ( date, dut, elongm, phim, hm, xp, yp, tdk,
358 pmb, rh, wl, tlr, aoprms );
359 vvd( aoprms[0], 0.4999993892136306, 1e-13,
"palAoppa",
361 vvd( aoprms[1], 0.4794250025886467, 1e-13,
"palAoppa",
363 vvd( aoprms[2], 0.8775828547167932, 1e-13,
"palAoppa",
365 vvd( aoprms[3], 1.363180872136126e-6, 1e-13,
"palAoppa",
367 vvd( aoprms[4], 3000.0, 1e-10,
"palAoppa",
"4",
369 vvd( aoprms[5], 280.0, 1e-11,
"palAoppa",
"5",
371 vvd( aoprms[6], 550.0, 1e-11,
"palAoppa",
"6",
373 vvd( aoprms[7], 0.6, 1e-13,
"palAoppa",
"7",
375 vvd( aoprms[8], 0.45, 1e-13,
"palAoppa",
"8",
377 vvd( aoprms[9], 0.006, 1e-15,
"palAoppa",
"9",
379 vvd( aoprms[10], 0.0001562803328459898, 1e-13,
380 "palAoppa",
"10", status );
381 vvd( aoprms[11], -1.792293660141e-7, 1e-13,
382 "palAoppa",
"11", status );
383 vvd( aoprms[12], 2.101874231495843, 1e-13,
384 "palAoppa",
"12", status );
385 vvd( aoprms[13], 7.601916802079765, 1e-8,
386 "palAoppa",
"13", status );
388 palOap (
"r", 1.6, -1.01, date, dut, elongm, phim,
389 hm, xp, yp, tdk, pmb, rh, wl, tlr, &rap, &dap );
390 vvd( rap, 1.601197569844787, 1e-10,
"palOap",
392 vvd( dap, -1.012528566544262, 1e-10,
"palOap",
394 palOap (
"h", -1.234, 2.34, date, dut, elongm, phim,
395 hm, xp, yp, tdk, pmb, rh, wl, tlr, &rap, &dap );
396 vvd( rap, 5.693087688154886463, 1e-10,
"palOap",
398 vvd( dap, 0.8010281167405444, 1e-10,
"palOap",
400 palOap (
"a", 6.1, 1.1, date, dut, elongm, phim,
401 hm, xp, yp, tdk, pmb, rh, wl, tlr, &rap, &dap );
402 vvd( rap, 5.894305175192448940, 1e-10,
"palOap",
404 vvd( dap, 1.406150707974922, 1e-10,
"palOap",
407 palOapqk (
"r", 2.1, -0.345, aoprms, &rap, &dap );
408 vvd( rap, 2.10023962776202, 1e-10,
"palOapqk",
410 vvd( dap, -0.3452428692888919, 1e-10,
"palOapqk",
412 palOapqk (
"h", -0.01, 1.03, aoprms, &rap, &dap );
413 vvd( rap, 1.328731933634564995, 1e-10,
"palOapqk",
415 vvd( dap, 1.030091538647746, 1e-10,
"palOapqk",
417 palOapqk (
"a", 4.321, 0.987, aoprms, &rap, &dap );
418 vvd( rap, 0.4375507112075065923, 1e-10,
"palOapqk",
420 vvd( dap, -0.01520898480744436, 1e-10,
"palOapqk",
424 vvd( aoprms[13], 7.602374979243502, 1e-8,
"palAoppat",
439 vvd (
palDbear ( a1, b1, a2, b2 ), 0.7045970341781791,
440 1e-12,
"palDbear",
" ", status );
445 1e-12,
"palDpav",
" ", status );
455 palCaldj ( 1999, 12, 31, &djm, &j );
456 vvd ( djm, 51543, 0,
"palCaldj",
" ", status );
457 viv ( j, 0,
"palCaldj",
"J", status );
467 vvd ( dr, 1.342313819975276, 1e-12,
"palDaf2r",
469 viv ( j, 0,
"palDaf2r",
"j", status );
475 double dv[3] = { 100., -50., 25. };
479 vvd ( da, -0.4636476090008061, 1e-12,
"palDcc2s",
481 vvd ( db, 0.2199879773954594, 1e-12,
"palDcc2s",
491 palDd2tf ( 4, -0.987654321, &s, ihmsf );
492 viv ( s,
'-',
"palDd2tf",
"S", status );
493 viv ( ihmsf[0], 23,
"palDd2tf",
"(1)", status );
494 viv ( ihmsf[1], 42,
"palDd2tf",
"(2)", status );
495 viv ( ihmsf[2], 13,
"palDd2tf",
"(3)", status );
496 viv ( ihmsf[3], 3333,
"palDd2tf",
"(4)", status );
505 palCldj ( 1899, 12, 31, &d, &j );
506 vvd ( d, 15019, 0,
"palCldj",
"D", status );
507 viv ( j, 0,
"palCldj",
"J", status );
516 viv ( s,
'+',
"palDr2af",
"S", status );
517 viv ( idmsf[0], 134,
"palDr2af",
"(1)", status );
518 viv ( idmsf[1], 21,
"palDr2af",
"(2)", status );
519 viv ( idmsf[2], 30,
"palDr2af",
"(3)", status );
520 viv ( idmsf[3], 9706,
"palDr2af",
"(4)", status );
528 palDr2tf ( 4, -3.01234, &s, ihmsf );
529 viv ( s,
'-',
"palDr2tf",
"S", status );
530 viv ( ihmsf[0], 11,
"palDr2tf",
"(1)", status );
531 viv ( ihmsf[1], 30,
"palDr2tf",
"(2)", status );
532 viv ( ihmsf[2], 22,
"palDr2tf",
"(3)", status );
533 viv ( ihmsf[3], 6484,
"palDr2tf",
"(4)", status );
543 vvd ( dd, 0.99790625, 1e-12,
"palDtf2d",
"D", status );
544 viv ( j, 0,
"palDtf2d",
"J", status );
554 vvd ( dr, 6.270029887942679, 1e-12,
"palDtf2r",
556 viv ( j, 0,
"palDtf2r",
"J", status );
562 vvd (
palDtt ( 40404 ), 39.709746, 1e-12,
"palDtt",
564 vvd (
palDt ( 500 ), 4686.7, 1e-10,
"palDt",
566 vvd (
palDt ( 1400 ), 408, 1e-11,
"palDt",
568 vvd (
palDt ( 1950 ), 27.99145626, 1e-12,
"palDt",
575 const double djm = 50123.9999;
582 viv ( iydmf[0], 1996,
"palDjcal",
"Y", status );
583 viv ( iydmf[1], 2,
"palDjcal",
"M", status );
584 viv ( iydmf[2], 10,
"palDjcal",
"D", status );
585 viv ( iydmf[3], 9999,
"palDjcal",
"F", status );
586 viv ( j, 0,
"palDjcal",
"J", status );
588 palDjcl ( djm, &iy, &im, &
id, &f, &j );
589 viv ( iy, 1996,
"palDjcl",
"Y", status );
590 viv ( im, 2,
"palDjcl",
"M", status );
591 viv (
id, 10,
"palDjcl",
"D", status );
592 vvd ( f, 0.9999, 1e-7,
"palDjcl",
"F", status );
593 viv ( j, 0,
"palDjcl",
"J", status );
604 2.22, 1.6578, 1.380522,
605 1.6578, 1.380522, 1.22548578,
606 1.380522, 1.22548578, 1.1356276122
609 2.28625, 1.7128825, 1.429432225
612 palDmat( 3, da, dv, &dd, &j, iw );
613 vvd ( da[0], 18.02550629769198,
614 1e-10,
"palDmat",
"a[0]", status );
615 vvd ( da[1], -52.16386644917280607,
616 1e-10,
"palDmat",
"a[1]", status );
617 vvd ( da[2], 34.37875949717850495,
618 1e-10,
"palDmat",
"a[2]", status );
619 vvd ( da[3], -52.16386644917280607,
620 1e-10,
"palDmat",
"a[3]", status );
621 vvd ( da[4], 168.1778099099805627,
622 1e-10,
"palDmat",
"a[4]", status );
623 vvd ( da[5], -118.0722869694232670,
624 1e-10,
"palDmat",
"a[5]", status );
625 vvd ( da[6], 34.37875949717850495,
626 1e-10,
"palDmat",
"a[6]", status );
627 vvd ( da[7], -118.0722869694232670,
628 1e-10,
"palDmat",
"a[7]", status );
629 vvd ( da[8], 86.50307003740151262,
630 1e-10,
"palDmat",
"a[8]", status );
631 vvd ( dv[0], 1.002346480763383,
632 1e-12,
"palDmat",
"v[0]", status );
633 vvd ( dv[1], 0.03285594016974583489,
634 1e-12,
"palDmat",
"v[1]", status );
635 vvd ( dv[2], 0.004760688414885247309,
636 1e-12,
"palDmat",
"v[2]", status );
637 vvd ( dd, 0.003658344147359863,
638 1e-12,
"palDmat",
"D", status );
639 viv ( j, 0,
"palDmat",
"J", status );
646 double dh, dd, dp, da, de;
652 palDe2h( dh, dd, dp, &da, &de );
653 vvd( da, 2.820087515852369, 1e-12,
"palDe2h",
655 vvd( de, 1.132711866443304, 1e-12,
"palDe2h",
658 palDh2e( da, de, dp, &dh, &dd );
659 vvd( dh, -0.3, 1e-12,
"palDh2e",
"HA", status);
660 vvd( dd, -1.1, 1e-12,
"palDh2e",
"DEC", status );
667 vvd (
palEpb( 45123 ), 1982.419793168669, 1e-8,
668 "palEpb",
" ", status );
673 "palEpb2d",
" ", status );
677 vvd (
palEpco (
'B',
'J', 2000 ), 2000.001277513665,
678 1e-7,
"palEpco",
"BJ", status );
679 vvd (
palEpco (
'J',
'B', 1950 ), 1949.999790442300,
680 1e-7,
"palEpco",
"JB", status );
682 1e-7,
"palEpco",
"JJ", status );
686 vvd (
palEpj( 42999 ), 1976.603696098563,
687 1e-7,
"palEpj",
" ", status );
692 1e-6,
"palEpj2d",
" ", status );
699 vvd (
palEqeqx( 53736. ), -0.8834195072043790156e-5,
700 1e-15,
"palEqeqx",
" ", status );
710 vvd ( ev[0], -1.621617102537041e-6, 1e-18,
"palEtrms",
712 vvd ( ev[1], -3.310070088507914e-7, 1e-18,
"palEtrms",
714 vvd ( ev[2], -1.435296627515719e-7, 1e-18,
"palEtrms",
725 vvd ( dl, 5.612270780904526, 1e-12,
"palEqgal",
727 vvd ( db, -0.6800521449061520, 1e-12,
"palEqgal",
738 vvd ( dr, 0.04729270418071426, 1e-12,
"palGaleq",
740 vvd ( dd, -0.7834003666745548, 1e-12,
"palGaleq",
750 vvd ( dsl, 4.567933268859171, 1e-12,
"palGalsup",
752 vvd ( dsb, -0.01862369899731829, 1e-12,
"palGalsup",
765 const double alt = 4120.0;
770 vvd( r, 4.01502667039618e-05, 1e-10,
"palGeoc",
"R", status );
771 vvd( z, 1.43762411970295e-05, 1e-10,
"palGeoc",
"Z", status );
779 palGe50( 6.1, -1.55, &dr, &dd );
780 vvd ( dr, 0.1966825219934508, 1e-12,
"palGe50",
782 vvd ( dd, -0.4924752701678960, 1e-12,
"palGe50",
794 vvd (
palGmst( 53736. ), 1.754174971870091203,
795 1e-12,
"palGmst",
" ", status );
797 vvd (
palGmsta( 53736., 0.0 ), 1.754174971870091203,
798 1e-12,
"palGmsta",
" ", status );
804 double r5, d5, dr5, dd5, rh, dh;
806 palFk5hz ( 1.234, -0.987, 1980, &rh, &dh );
807 vvd ( rh, 1.234000136713611301, 1e-13,
"palFk5hz",
809 vvd ( dh, -0.9869999702020807601, 1e-13,
"palFk5hz",
811 palHfk5z ( rh, dh, 1980, &r5, &d5, &dr5, &dd5 );
812 vvd ( r5, 1.234, 1e-13,
"palHfk5z",
"R", status );
813 vvd ( d5, -0.987, 1e-13,
"palHfk5z",
"D", status );
814 vvd ( dr5, 0.000000006822074, 1e-13,
"palHfk5z",
816 vvd ( dd5, -0.000000002334012, 1e-13,
"palHfk5z",
822 const char s[] =
" -12345, , -0 2000 + ";
829 viv ( i, 10,
"palIntin",
"I1", status );
830 viv ( n, -12345,
"palIntin",
"V1", status );
831 viv ( j, -1,
"palIntin",
"J1", status );
834 viv ( i, 12,
"palIntin",
"I2", status );
835 viv ( n, -12345,
"palIntin",
"V2", status );
836 viv ( j, 1,
"palIntin",
"J2", status );
839 viv ( i, 17,
"palIntin",
"I3", status );
840 viv ( n, 0,
"palIntin",
"V3", status );
841 viv ( j, -1,
"palIntin",
"J3", status );
844 viv ( i, 23,
"palIntin",
"I4", status );
845 viv ( n, 2000,
"palIntin",
"V4", status );
846 viv ( j, 0,
"palIntin",
"J4", status );
849 viv ( i, 29,
"palIntin",
"I5", status );
850 viv ( n, 2000,
"palIntin",
"V5", status );
851 viv ( j, 1,
"palIntin",
"J5", status );
861 double expected1[] = {
863 0.000973912029208393,
864 0.000669931538978146,
865 -3.44709700068209e-09,
866 5.44477533462392e-09,
873 vvec( 6, pv, expected1,
"palDmoon", status );
879 double dpsi, deps, eps0;
881 double expected[3][3] = {
882 { 9.999999969492166e-1, 7.166577986249302e-5, 3.107382973077677e-5 },
883 { -7.166503970900504e-5, 9.999999971483732e-1, -2.381965032461830e-5 },
884 { -3.107553669598237e-5, 2.381742334472628e-5, 9.999999992335206818e-1 }
890 palNut( 46012.32, rmatn );
891 vrmat( rmatn, expected,
"palNut", 1.0e-3, status );
894 palNutc( 54388.0, &dpsi, &deps, &eps0 );
895 vvd( eps0, 0.4090749229387258204, 1e-14,
896 "palNutc",
"eps0", status);
898 palNutc( 53736.0, &dpsi, &deps, &eps0 );
899 vvd(dpsi, -0.9630912025820308797e-5, 1e-13,
900 "palNutc",
"dpsi", status);
901 vvd(deps, 0.4063238496887249798e-4, 1e-13,
902 "palNutc",
"deps", status);
909 double prebn_expected[3][3] = {
910 { 9.999257613786738e-1, -1.117444640880939e-2, -4.858341150654265e-3 },
911 { 1.117444639746558e-2, 9.999375635561940e-1, -2.714797892626396e-5 },
912 { 4.858341176745641e-3, -2.714330927085065e-5, 9.999881978224798e-1 },
916 vrmat( rmatp, prebn_expected,
"palPrebn", 1.0e-12, status );
923 1e-12,
"palDrange",
" ", status );
928 1e-12,
"palDranrm",
"2", status );
934 double d1[3] = { 1.0, 0.1, 0.2 };
935 double d2[3] = { -3.0, 1e-3, 0.2 };
936 double ad1, bd1, ad2, bd2;
942 2.8603919190246608, 1e-7,
"palDsep",
" ", status );
944 2.8603919190246608, 1e-7,
"palDsepv",
" ", status );
955 vvd ( dl, 3.798775860769474, 1e-12,
"palSupgal",
957 vvd ( db, -0.1397070490669407, 1e-12,
"palSupgal",
963 static void t_tp(
int *status ) {
966 double dr0, dd0, dr1, dd1, dx, dy, dr2, dd2, dr01,
973 palDs2tp( dr1, dd1, dr0, dd0, &dx, &dy, &j );
974 vvd( dx, 0.1086112301590404, 1e-12,
"palDs2tp",
976 vvd( dy, -0.1095506200711452, 1e-12,
"palDs2tp",
978 viv( j, 0,
"palDs2tp",
"j", status );
980 palDtp2s( dx, dy, dr0, dd0, &dr2, &dd2 );
981 vvd( dr2 - dr1, 0., 1e-12,
"palDtp2s",
"r", status );
982 vvd( dd2 - dd1, 0., 1e-12,
"palDtp2s",
"d", status );
984 palDtps2c( dx, dy, dr2, dd2, &dr01, &dd01, &dr02, &dd02, &j );
985 vvd( dr01, 3.1, 1e-12,
"palDtps2c",
"r1", status);
986 vvd( dd01, -0.9, 1e-12,
"palDtps2c",
"d1", status);
987 vvd( dr02, 0.3584073464102072, 1e-12,
"palDtps2c",
989 vvd( dd02, -2.023361658234722, 1e-12,
"palDtps2c",
991 viv( j, 1,
"palDtps2c",
"n", status );
1002 double dav[3] = { -0.123, 0.0987, 0.0654 };
1003 double dav2m_expected[3][3] = {
1004 { 0.9930075842721269, 0.05902743090199868, -0.1022335560329612 },
1005 { -0.07113807138648245, 0.9903204657727545, -0.1191836812279541 },
1006 { 0.09420887631983825, 0.1256229973879967, 0.9875948309655174 },
1011 double deuler_expected[3][3] = {
1012 { -0.1681574770810878, 0.1981362273264315, 0.9656423242187410 },
1013 { -0.2285369373983370, 0.9450659587140423, -0.2337117924378156 },
1014 { -0.9589024617479674, -0.2599853247796050, -0.1136384607117296 } };
1018 double dmxm_expected[3][3] = {
1019 { -0.09010460088585805, 0.3075993402463796, 0.9472400998581048 },
1020 { -0.3161868071070688, 0.8930686362478707, -0.3200848543149236 },
1021 { -0.9444083141897035, -0.3283459407855694, 0.01678926022795169 },
1036 vrmat( drm1, dav2m_expected,
"palDav2m", 1.0e-12, status );
1039 palDeuler(
"YZY", 2.345, -0.333, 2.222, drm2 );
1040 vrmat( drm2, deuler_expected,
"palDeuler", 1.0e-12, status );
1044 vrmat( drm, dmxm_expected,
"palDmxm", 1.0e-12, status );
1048 vvd ( dv1[0], -0.5366267667260525, 1e-12,
1049 "palDcs2c",
"x", status );
1050 vvd ( dv1[1], 0.06977111097651444, 1e-12,
1051 "palDcs2c",
"y", status );
1052 vvd ( dv1[2], -0.8409302618566215, 1e-12,
1053 "palDcs2c",
"z", status );
1058 vvd ( dv3[0], -0.7267487768696160, 1e-12,
1059 "palDmxv",
"x", status );
1060 vvd ( dv3[1], 0.5011537352639822, 1e-12,
1061 "palDmxv",
"y", status );
1062 vvd ( dv3[2], 0.4697671220397141, 1e-12,
1063 "palDmxv",
"z", status );
1067 vvd ( dv4[0], -0.5366267667260526, 1e-12,
1068 "palDimxv",
"X", status );
1069 vvd ( dv4[1], 0.06977111097651445, 1e-12,
1070 "palDimxv",
"Y", status );
1071 vvd ( dv4[2], -0.8409302618566215, 1e-12,
1072 "palDimxv",
"Z", status );
1076 vvd ( dv5[0], 0.006889040510209034, 1e-12,
1077 "palDm2av",
"X", status );
1078 vvd ( dv5[1], -1.577473205461961, 1e-12,
1079 "palDm2av",
"Y", status );
1080 vvd ( dv5[2], 0.5201843672856759, 1e-12,
1081 "palDm2av",
"Z", status );
1083 for (i=0; i<3; i++) {
1088 palDvn( dv5, dv6, &dvm );
1089 vvd ( dv6[0], 0.004147420704640065, 1e-12,
1090 "palDvn",
"X", status );
1091 vvd ( dv6[1], -0.9496888606842218, 1e-12,
1092 "palDvn",
"Y", status );
1093 vvd ( dv6[2], 0.3131674740355448, 1e-12,
1094 "palDvn",
"Z", status );
1095 vvd ( dvm, 1661.042127339937, 1e-9,
"palDvn",
1098 vvd (
palDvdv ( dv6, dv1 ), -0.3318384698006295,
1099 1e-12,
"palDvn",
" ", status );
1103 vvd ( dv7[0], 0.7767720597123304, 1e-12,
1104 "palDvxv",
"X", status );
1105 vvd ( dv7[1], -0.1645663574562769, 1e-12,
1106 "palDvxv",
"Y", status );
1107 vvd ( dv7[2], -0.5093390925544726, 1e-12,
1108 "palDvxv",
"Z", status );
1115 palEcleq( 1.234, -0.123, 43210.0, &dr, &dd );
1116 vvd( dr, 1.229910118208851, 1e-5,
"palEcleq",
1118 vvd( dd, 0.2638461400411088, 1e-5,
"palEcleq",
1124 double expected[3][3] = {
1126 { 0.0, 0.91749307789883549624, 0.3977517467060596168 },
1127 { 0.0, -0.3977517467060596168, 0.91749307789883549624 } };
1130 vrmat( rmat, expected,
"palEcmat", 1.0e-12, status );
1135 palEqecl ( 0.789, -0.123, 46555, &dl, &db );
1138 vvd ( dl, 0.7036566430349022, 1e-6,
"palEqecl",
1140 vvd ( db, -0.4036047164116848, 1e-6,
"palEqecl",
1146 double expected[3][3] = {
1147 { 0.9999856154510, -0.0049192906204, -0.0021376320580 },
1148 { 0.0049192906805, 0.9999879002027, -5.2297405698747e-06 },
1149 { 0.0021376319197, -5.2859681191735e-06, 0.9999977152483 } };
1151 palPrec( 1990.0, 2012.0, rmat );
1152 vrmat( rmat, expected,
"palPrec", 1.0e-12, status );
1160 palPreces (
"FK4", 1925, 1950, &ra, &dc );
1161 vvd ( ra, 0.002403604864728447, 1e-12,
"palPreces",
1163 vvd ( dc, -1.120570643322045, 1e-12,
"palPreces",
1170 palPreces (
"FK5", 2050, 1990, &ra, &dc );
1171 vvd ( ra, 6.282003602708382, 1e-6,
"palPreces",
1173 vvd ( dc, 1.092870326188383, 1e-6,
"palPreces",
1179 double dvb[3],dpb[3],dvh[3],dph[3];
1180 double vbex[3] = { 1.6957348127008098514e-07,
1181 -9.1093446116039685966e-08,
1182 -3.9528532243991863036e-08 };
1183 double pbex[3] = {-0.49771075259730546136,
1184 -0.80273812396332311359,
1185 -0.34851593942866060383 };
1186 double vhex[3] = { 1.6964379181455713805e-07,
1187 -9.1147224045727438391e-08,
1188 -3.9553158272334222497e-08 };
1189 double phex[3] = { -0.50169124421419830639,
1190 -0.80650980174901798492,
1191 -0.34997162028527262212 };
1194 -0.0109187426811683,
1195 -0.0124652546173285,
1199 -0.7714104440491060,
1200 +0.5598412061824225,
1204 -0.0109189182414732,
1205 -0.0124718726844084,
1209 -0.7757238809297653,
1210 +0.5598052241363390,
1214 palEvp( 2010.0, 2012.0, dvb, dpb, dvh, dph );
1216 vvec( 3, dvb, vbex,
"palEvp", status );
1217 vvec( 3, dpb, pbex,
"palEvp", status );
1218 vvec( 3, dvh, vhex,
"palEvp", status );
1219 vvec( 3, dph, phex,
"palEvp", status );
1221 palEpv ( 53411.52501161, dph, dvh, dpb, dvb );
1223 vvec( 3, dvb, vbex2,
"palEpv", status );
1224 vvec( 3, dpb, pbex2,
"palEpv", status );
1225 vvec( 3, dvh, vhex2,
"palEpv", status );
1226 vvec( 3, dph, phex2,
"palEpv", status );
1232 palMap ( 6.123, -0.999, 1.23e-5, -0.987e-5,
1233 0.123, 32.1, 1999, 43210.9, &ra, &da );
1238 vvd ( ra, 6.117130429775647, 1e-6,
"palMap",
1240 vvd ( da, -1.000880769038632, 1e-8,
"palMap",
1246 double expected[21] = {1.9986310746064646082,
1247 -0.1728200754134739392,
1248 0.88745394651412767839,
1249 0.38472374350184274094,
1250 -0.17245634725219796679,
1251 0.90374808622520386159,
1252 0.3917884696321610738,
1253 2.0075929387510784968e-08,
1254 -9.9464149073251757597e-05,
1255 -1.6125306981057062306e-05,
1256 -6.9897255793245634435e-06,
1257 0.99999999489900059935,
1258 0.99999983777998024959,
1259 -0.00052248206600935195865,
1260 -0.00022683144398381763045,
1261 0.00052248547063364874764,
1262 0.99999986339269864022,
1263 1.4950491424992534218e-05,
1264 0.00022682360163333854623,
1265 -1.5069005133483779417e-05,
1266 0.99999997416198904698};
1268 palMappa( 2010.0, 55927.0, amprms );
1269 vvec( 21, amprms, expected,
"palMappa", status );
1273 double amprms[21], ra, da;
1274 palMappa( 2010.0, 55927.0, amprms );
1275 palMapqkz( 1.234, -0.567, amprms, &ra, &da );
1276 vvd( ra, 1.2344879748414849807, 1.0E-12,
"palMapqkz",
"ra", status );
1277 vvd( da, -0.56697099554368701746, 1.0E-12,
"palMapqkz",
"da", status );
1280 palMapqk( 1.234, -0.567, 0., 0., 0., 0., amprms, &ra, &da );
1281 vvd( ra, 1.2344879748414849807, 1.0E-7,
"palMapqkz",
"ra", status );
1282 vvd( da, -0.56697099554368701746, 1.0E-7,
"palMapqkz",
"da", status );
1287 double amprms[21], rm, dm;
1288 palMappa( 2010.0, 55927.0, amprms );
1289 palAmpqk( 1.234, -0.567, amprms, &rm, &dm );
1290 vvd( rm, 1.2335120411026936349, 1.0E-12,
"palAmpqk",
"rm", status );
1291 vvd( dm, -0.56702908706930343907, 1.0E-12,
"palAmpqk",
"dm", status );
1295 double r2000, d2000;
1296 palFk45z( 1.2, -0.3, 1960.0, &r2000, &d2000 );
1297 vvd( r2000, 1.2097812228966762227, 1.0E-12,
"palFk45z",
"r2000", status );
1298 vvd( d2000, -0.29826111711331398935, 1.0E-12,
"palFk45z",
"d2000", status );
1302 double r1950, d1950, dr1950, dd1950;
1303 palFk54z( 1.2, -0.3, 1960.0, &r1950, &d1950, &dr1950, &dd1950 );
1304 vvd( r1950, 1.1902221805755279771, 1.0E-12,
"palFk54z",
"r1950", status );
1305 vvd( d1950, -0.30178317645793828472, 1.0E-12,
"palFk54z",
"d1950", status );
1306 vvd( dr1950, -1.7830874775952945507e-08, 1.0E-12,
"palFk54z",
"dr1950", status );
1307 vvd( dd1950, 7.196059425334821089e-09, 1.0E-12,
"palFk54z",
"dd1950", status );
1311 double r1950, d1950, dr1950, dd1950, p1950, v1950;
1312 palFk524(4.567, -1.23, -3e-5, 8e-6, 0.29,
1313 -35.0, &r1950, &d1950, &dr1950, &dd1950, &p1950, &v1950);
1314 vvd(r1950, 4.543778603272084, 1e-12,
"palFk524",
"r", status);
1315 vvd(d1950, -1.229642790187574, 1e-12,
"palFk524",
"d", status);
1316 vvd(dr1950, -2.957873121769244e-5, 1e-17,
"palFk524",
"dr", status);
1317 vvd(dd1950, 8.117725309659079e-6, 1e-17,
"palFk524",
"dd", status);
1318 vvd(p1950, 0.2898494999992917, 1e-12,
"palFk524",
"p", status);
1319 vvd(v1950, -35.026862824252680, 1e-11,
"palFk524",
"v", status);
1325 const char * s =
" 12.345, , -0 1E3-4 2000 E ";
1331 viv ( i, 10,
"palDfltin",
"I1", status );
1332 vvd ( dv, 12.345, 1e-12,
"palDfltin",
"V1", status );
1333 viv ( j, 0,
"palDfltin",
"J1", status );
1336 viv ( i, 12,
"palDfltin",
"I2", status );
1337 vvd ( dv, 12.345, 1e-12,
"palDfltin",
"V2", status );
1338 viv ( j, 1,
"palDfltin",
"J2", status );
1341 viv ( i, 16,
"palDfltin",
"I3", status );
1342 vvd ( dv, 0, 0,
"palDfltin",
"V3", status );
1343 viv ( j, -1,
"palDfltin",
"J3", status );
1346 viv ( i, 19,
"palDfltin",
"I4", status );
1347 vvd ( dv, 1000, 0,
"palDfltin",
"V4", status );
1348 viv ( j, 0,
"palDfltin",
"J4", status );
1351 viv ( i, 22,
"palDfltin",
"I5", status );
1352 vvd ( dv, -4, 0,
"palDfltin",
"V5", status );
1353 viv ( j, -1,
"palDfltin",
"J5", status );
1356 viv ( i, 28,
"palDfltin",
"I6", status );
1357 vvd ( dv, 2000, 0,
"palDfltin",
"V6", status );
1358 viv ( j, 0,
"palDfltin",
"J6", status );
1361 viv ( i, 34,
"palDfltin",
"I7", status );
1362 vvd ( dv, 2000, 0,
"palDfltin",
"V7", status );
1363 viv ( j, 1,
"palDfltin",
"J7", status );
1368 viv ( i, 8,
"palDfltin",
"I8", status );
1369 vvd ( dv, HUGE_VAL, 0,
"palDfltin",
"V8", status );
1370 viv ( j, 2,
"palDfltin",
"J8", status );
1381 lstat =
palObs( 0,
"MMT", shortname,
sizeof(shortname),
1382 longname,
sizeof(longname), &w, &p, &h );
1383 vcs ( shortname,
"MMT",
"palObs",
"1/C", status );
1384 vcs ( longname,
"MMT 6.5m, Mt Hopkins",
"palObs",
"1/NAME",
1386 vvd ( w, 1.935300584055477, 1e-8,
"palObs",
1388 vvd ( p, 0.5530735081550342238, 1e-10,
"palObs",
1390 vvd ( h, 2608, 1e-10,
"palObs",
1392 viv( lstat, 0,
"palObs",
"retval", status );
1394 lstat =
palObs ( 61, NULL, shortname,
sizeof(shortname),
1395 longname,
sizeof(longname), &w, &p, &h );
1396 vcs ( shortname,
"KECK1",
"palObs",
"2/C", status );
1397 vcs ( longname,
"Keck 10m Telescope #1",
"palObs",
1399 vvd ( w, 2.713545757918895, 1e-8,
"palObs",
1401 vvd ( p, 0.3460280563536619, 1e-8,
"palObs",
1403 vvd ( h, 4160, 1e-10,
"palObs",
1405 viv( lstat, 0,
"palObs",
"retval", status );
1407 lstat =
palObs ( 83, NULL, shortname,
sizeof(shortname),
1408 longname,
sizeof(longname), &w, &p, &h );
1409 vcs ( shortname,
"MAGELLAN2",
"palObs",
"3/C", status );
1410 vcs ( longname,
"Magellan 2, 6.5m, Las Campanas",
1411 "palObs",
"3/NAME", status );
1412 vvd ( w, 1.233819305534497, 1e-8,
"palObs",
1414 vvd ( p, -0.506389344359954, 1e-8,
"palObs",
1416 vvd ( h, 2408, 1e-10,
"palObs",
1418 viv( lstat, 0,
"palObs",
"retval", status );
1423 lstat =
palObs ( 86, NULL, shortname,
sizeof(shortname),
1424 longname,
sizeof(longname), &w, &p, &h );
1425 vcs ( longname,
"?",
"palObs",
"4/NAME", status );
1426 viv( lstat, -1,
"palObs",
"retval", status );
1428 lstat =
palObs ( 0,
"MISSING", shortname,
sizeof(shortname),
1429 longname,
sizeof(longname), &w, &p, &h );
1430 vcs ( longname,
"?",
"palObs",
"5/NAME", status );
1431 viv( lstat, -1,
"palObs",
"retval", status );
1433 lstat =
palObs( 0,
"mmt", shortname,
sizeof(shortname),
1434 longname,
sizeof(longname), &w, &p, &h );
1435 vcs ( shortname,
"MMT",
"palObs",
"6/C", status );
1436 vcs ( longname,
"MMT 6.5m, Mt Hopkins",
"palObs",
"6/NAME",
1438 vvd ( w, 1.935300584055477, 1e-8,
"palObs",
1440 vvd ( p, 0.5530735081550342238, 1e-10,
"palObs",
1442 vvd ( h, 2608, 1e-10,
"palObs",
1444 viv( lstat, 0,
"palObs",
"retval", status );
1449 vvd (
palPa ( -1.567, 1.5123, 0.987 ),
1450 -1.486288540423851, 1e-12,
"palPa",
" ", status );
1452 0, 0,
"palPa",
"zenith", status );
1461 palPcd ( disco, &x, &y );
1462 vvd ( x, 0.01284630845735895, 1e-14,
"palPcd",
"x", status );
1463 vvd ( y, -0.01030837922553926, 1e-14,
"palPcd",
"y", status );
1466 vvd ( x, 0.0123, 1e-14,
"palUnpcd",
"x", status );
1467 vvd ( y, -0.00987, 1e-14,
"palUnpcd",
"y,", status );
1473 palPcd ( disco, &x, &y );
1475 vvd ( x, 0.0123, 1e-14,
"palUnpcd",
"x", status );
1476 vvd ( y, -0.00987, 1e-14,
"palUnpcd",
"y,", status );
1483 double expected1[6] = { 0., 0., 0., 0., 0., 0. };
1484 double expectedue1[13] = {
1485 1.000878908362435284, -0.3336263027874777288, 50000.,
1486 2.840425801310305210, 0.1264380368035014224, -0.2287711835229143197,
1487 -0.01301062595106185195, 0.5657102158104651697, 0.2189745287281794885,
1488 2.852427310959998500, -0.01552349065435120900,
1491 double expectedue2[13] = {
1492 1.00006, -4.856142884511782, 50000., 0.3, -0.2,
1493 0.1, -0.4520378601821727, 0.4018114312730424,
1494 -.3515850023639121, 0.3741657386773941,
1495 -0.2511321445456515, 50000., 0.
1497 double expectedue3[13] = {
1499 -0.3329769417028020949,
1501 2.638884303608524597,
1502 1.070994304747824305,
1503 0.1544112080167568589,
1504 -0.2188240619161439344,
1505 0.5207557453451906385,
1506 0.2217782439275216936,
1507 2.852118859689216658,
1508 0.01452010174371893229,
1512 double expectedpv[6] = {
1513 0.07944764084631667011, -0.04118141077419014775,
1514 0.002915180702063625400, -0.6890132370721108608e-6,
1515 0.4326690733487621457e-6, -0.1763249096254134306e-6,
1517 double expectedpv2[6] = {
1518 1.947628959288897677,
1519 -1.013736058752235271,
1520 -0.3536409947732733647,
1521 2.742247411571786194e-8,
1522 1.170467244079075911e-7,
1523 3.709878268217564005e-8
1526 double ra,dec,diam, r;
1528 double epoch, orbinc, anode, perih, aorq, e, aorl,
1532 palEl2ue ( 50000, 1, 49000, 0.1, 2, 0.2,
1533 3, 0.05, 3, 0.003312, u, &j );
1534 vvec( 13, u, expectedue1,
"palEl2ue", status );
1535 viv ( j, 0,
"palEl2ue",
"J", status );
1539 0.2, 3, 4, 5, 0.02, 6,
1540 &epoch, &orbinc, &anode, &perih, &aorq, &e, &aorl, &j );
1541 vvd ( epoch, 43200., 1e-10,
"palPertel",
1543 vvd ( orbinc, 0.1995661466545422381, 1e-7,
"palPertel",
1545 vvd ( anode, 2.998052737821591215, 1e-7,
"palPertel",
1547 vvd ( perih, 4.009516448441143636, 1e-6,
"palPertel",
1549 vvd ( aorq, 5.014216294790922323, 1e-7,
"palPertel",
1551 vvd ( e, 0.02281386258309823607, 1e-7,
"palPertel",
1553 vvd ( aorl, 0.01735248648779583748, 1e-6,
"palPertel",
1555 viv ( j, 0,
"palPertel",
"J", status );
1559 vvec( 13, u, expectedue3,
"palPertue", status );
1560 viv ( j, 0,
"palPertue",
"J", status );
1564 2, 0.3, 4, 0, pv, &j );
1565 vvec( 6, pv, expectedpv2,
"palPlanel", status );
1566 viv ( j, 0,
"palPlanel",
"J", status );
1571 vvec( 6, pv, expected1,
"palPlanet 1", status );
1572 viv ( j, -1,
"palPlanet",
"J 1", status );
1575 viv ( j, -1,
"palPlanet",
"J 2", status );
1578 vvd ( pv[0], 0.9308038666827242603, 1e-11,
"palPlanet",
1579 "pv[0] 3", status );
1580 vvd ( pv[1], 0.3258319040252137618, 1e-11,
"palPlanet",
1581 "pv[1] 3", status );
1582 vvd ( pv[2], 0.1422794544477122021, 1e-11,
"palPlanet",
1583 "pv[2] 3", status );
1584 vvd ( pv[3], -7.441503423889371696e-8, 1e-17,
"palPlanet",
1585 "pv[3] 3", status );
1586 vvd ( pv[4], 1.699734557528650689e-7, 1e-17,
"palPlanet",
1587 "pv[4] 3", status );
1588 vvd ( pv[5], 7.415505123001430864e-8, 1e-17,
"palPlanet",
1589 "pv[5] 3", status );
1590 viv ( j, 1,
"palPlanet",
"J 3", status );
1593 vvd ( pv[0], 0.2945293959257422246, 1e-11,
"palPlanet",
1594 "pv[0] 4", status );
1595 vvd ( pv[1], -0.2452204176601052181, 1e-11,
"palPlanet",
1596 "pv[1] 4", status );
1597 vvd ( pv[2], -0.1615427700571978643, 1e-11,
"palPlanet",
1598 "pv[2] 4", status );
1599 vvd ( pv[3], 1.636421147459047057e-7, 1e-18,
"palPlanet",
1600 "pv[3] 4", status );
1601 vvd ( pv[4], 2.252949422574889753e-7, 1e-18,
"palPlanet",
1602 "pv[4] 4", status );
1603 vvd ( pv[5], 1.033542799062371839e-7, 1e-18,
"palPlanet",
1604 "pv[5] 4", status );
1605 viv ( j, 0,
"palPlanet",
"J 4", status );
1609 palPlante ( 50600., -1.23, 0.456, 2, 50500.,
1610 0.1, 3., 5., 2., 0.3, 4.,
1611 0., &ra, &dec, &r, &j );
1612 vvd ( ra, 6.222958101333794007, 1e-6,
"palPlante",
1614 vvd ( dec, 0.01142220305739771601, 1e-6,
"palPlante",
1616 vvd ( r, 2.288902494080167624, 1e-8,
"palPlante",
1618 viv ( j, 0,
"palPlante",
"J", status );
1636 palPlantu ( 55001., -1.23, 0.456, u, &ra, &dec, &r, &j );
1637 vvd ( ra, 0.3531814831241686647, 1e-6,
"palPlantu",
1639 vvd ( dec, 0.06940344580567131328, 1e-6,
"palPlantu",
1641 vvd ( r, 3.031687170873274464, 1e-8,
"palPlantu",
1643 viv ( j, 0,
"palPlantu",
"J", status );
1655 &jform, &epoch, &orbinc, &anode, &perih,
1656 &aorq, &e, &aorl, &dm, &j );
1657 viv ( jform, 1,
"palPv2el",
"JFORM", status );
1658 vvd ( epoch, 50000, 1e-10,
"palPv2el",
1660 vvd ( orbinc, 1.52099895268912, 1e-12,
"palPv2el",
1662 vvd ( anode, 2.720503180538650, 1e-12,
"palPv2el",
1664 vvd ( perih, 2.194081512031836, 1e-12,
"palPv2el",
1666 vvd ( aorq, 0.2059371035373771, 1e-12,
"palPv2el",
1668 vvd ( e, 0.9866822985810528, 1e-12,
"palPv2el",
1670 vvd ( aorl, 0.2012758344836794, 1e-12,
"palPv2el",
1672 vvd ( dm, 0.1840740507951820, 1e-12,
"palPv2el",
1674 viv ( j, 0,
"palPv2el",
"J", status );
1677 palPv2ue ( pv, 50000., 0.00006, u, &j );
1678 vvec( 13, u, expectedue2,
"palPv2ue", status );
1679 viv ( j, 0,
"palPv2ue",
"J", status );
1682 palRdplan ( 40999.9, 0, 0.1, -0.9, &ra, &dec, &diam );
1683 vvd ( ra, 5.772270359389275837, 1e-6,
"palRdplan",
1685 vvd ( dec, -0.2089207338795416192, 1e-7,
"palRdplan",
1687 vvd ( diam, 9.415338935229717875e-3, 1e-10,
"palRdplan",
1689 palRdplan ( 41999.9, 1, 1.1, -0.9, &ra, &dec, &diam );
1690 vvd ( ra, 3.866363420052936653, 1e-6,
"palRdplan",
1692 vvd ( dec, -0.2594430577550113130, 1e-7,
"palRdplan",
1694 vvd ( diam, 4.638468996795023071e-5, 1e-14,
"palRdplan",
1696 palRdplan ( 42999.9, 2, 2.1, 0.9, &ra, &dec, &diam );
1697 vvd ( ra, 2.695383203184077378, 1e-6,
"palRdplan",
1699 vvd ( dec, 0.2124044506294805126, 1e-7,
"palRdplan",
1701 vvd ( diam, 4.892222838681000389e-5, 1e-14,
"palRdplan",
1703 palRdplan ( 43999.9, 3, 3.1, 0.9, &ra, &dec, &diam );
1704 vvd ( ra, 2.908326678461540165, 1e-7,
"palRdplan",
1706 vvd ( dec, 0.08729783126905579385, 1e-7,
"palRdplan",
1708 vvd ( diam, 8.581305866034962476e-3, 1e-7,
"palRdplan",
1710 palRdplan ( 44999.9, 4, -0.1, 1.1, &ra, &dec, &diam );
1711 vvd ( ra, 3.429840787472851721, 1e-6,
"palRdplan",
1713 vvd ( dec, -0.06979851055261161013, 1e-7,
"palRdplan",
1715 vvd ( diam, 4.540536678439300199e-5, 1e-14,
"palRdplan",
1717 palRdplan ( 45999.9, 5, -1.1, 0.1, &ra, &dec, &diam );
1718 vvd ( ra, 4.864669466449422548, 1e-6,
"palRdplan",
1720 vvd ( dec, -0.4077714497908953354, 1e-7,
"palRdplan",
1722 vvd ( diam, 1.727945579027815576e-4, 1e-14,
"palRdplan",
1724 palRdplan ( 46999.9, 6, -2.1, -0.1, &ra, &dec, &diam );
1725 vvd ( ra, 4.432929829176388766, 1e-6,
"palRdplan",
1727 vvd ( dec, -0.3682820877854730530, 1e-7,
"palRdplan",
1729 vvd ( diam, 8.670829016099083311e-5, 1e-14,
"palRdplan",
1731 palRdplan ( 47999.9, 7, -3.1, -1.1, &ra, &dec, &diam );
1732 vvd ( ra, 4.894972492286818487, 1e-6,
"palRdplan",
1734 vvd ( dec, -0.4084068901053653125, 1e-7,
"palRdplan",
1736 vvd ( diam, 1.793916783975974163e-5, 1e-14,
"palRdplan",
1738 palRdplan ( 48999.9, 8, 0, 0, &ra, &dec, &diam );
1739 vvd ( ra, 5.066050284760144000, 1e-6,
"palRdplan",
1741 vvd ( dec, -0.3744690779683850609, 1e-7,
"palRdplan",
1743 vvd ( diam, 1.062210086082700563e-5, 1e-14,
"palRdplan",
1747 palUe2el ( u, 1, &jform, &epoch, &orbinc, &anode, &perih,
1748 &aorq, &e, &aorl, &dm, &j );
1749 viv ( jform, 1,
"palUe2el",
"JFORM", status );
1750 vvd ( epoch, 50000.00000000000, 1e-10,
"palUe2el",
1752 vvd ( orbinc, 1.520998952689120, 1e-12,
"palUe2el",
1754 vvd ( anode, 2.720503180538650, 1e-12,
"palUe2el",
1756 vvd ( perih, 2.194081512031836, 1e-12,
"palUe2el",
1758 vvd ( aorq, 0.2059371035373771, 1e-12,
"palUe2el",
1760 vvd ( e, 0.9866822985810528, 1e-12,
"palUe2el",
1762 vvd ( aorl, 0.2012758344836794, 1e-12,
"palUe2el",
1764 viv ( j, 0,
"palUe2el",
"J", status );
1770 expectedue2[11] = 50010.;
1771 expectedue2[12] = 0.7194308220038886856;
1773 vvec( 13, u, expectedue2,
"palUe2pv", status );
1774 vvec( 6, pv, expectedpv,
"palUe2pv", status );
1775 viv ( j, 0,
"palUe2pv",
"J", status );
1781 double ra1, dec1, pmr1, pmd1, px1, rv1;
1788 rv1 = 50.3*365.2422/365.25;
1790 palPm ( ra1, dec1, pmr1, pmd1, px1, rv1,
1793 vvd ( ra2, 5.429855087793875, 1e-10,
"palPm",
1795 vvd ( dec2, -0.8696617307805072, 1e-10,
"palPm",
1800 dec1 = -1.093989828;
1801 pmr1 = -1.78323516e-5;
1802 pmd1 = 2.336024047e-6;
1806 palPm(ra1, dec1, pmr1, pmd1, px1, rv1,
1809 vvd(ra2, 0.01668919069414242368, 1e-13,
1810 "palPm",
"ra", status);
1811 vvd(dec2, -1.093966454217127879, 1e-13,
1812 "palPm",
"dec", status);
1818 double elong, phi, daz;
1820 palPolmo( 0.7, -0.5, 1.0e-6, -2.0e-6, &elong, &phi, &daz );
1821 vvd(elong, 0.7000004837322044, 1.0e-12,
"palPolmo",
"elong", status );
1822 vvd(phi, -0.4999979467222241, 1.0e-12,
"palPolmo",
"phi", status );
1823 vvd(daz, 1.008982781275728e-6, 1.0e-12,
"palPolmo",
"daz", status );
1828 double expected[6] = { -4.7683600138836167813e-06,
1829 1.0419056712717953176e-05,
1830 4.099831053320363277e-05,
1831 -7.5976959740661272483e-10,
1832 -3.4771429582640930371e-10,
1835 vvec( 6, pv, expected,
"palPvobs", status );
1840 -0.1948098355075913, 1e-6,
1841 "palRverot",
" ", status );
1843 158.9630759840254, 1e-3,
"palRvgalc",
" ", status );
1845 -197.818762175363, 1e-3,
"palRvlg",
" ", status );
1847 -4.082811335150567, 1e-4,
"palRvlsrd",
" ", status );
1849 -5.925180579830265, 1e-4,
"palRvlsrk",
" ", status );
1855 vvd( rv, 213.98084425751144977, 1.0E-12,
"palRvgalc",
"rv", status );
1861 vvd( rv, 291.79205281252404802, 1.0E-12,
"palRvlg",
"rv", status );
1867 vvd( rv, 9.620674692097630043, 1.0E-12,
"palRvlsrd",
"rv", status );
1873 vvd( rv, 12.556356851411955233, 1.0E-12,
"palRvlsrk",
"rv", status );
1877 double phpa, tc, rh, wl, refa, refb;
1882 palRefcoq(tc, phpa, rh, wl, &refa, &refb);
1883 vvd(refa, 0.2264949956241415009e-3, 1e-15,
1884 "palRefcoq",
"refa", status);
1885 vvd(refb, -0.2598658261729343970e-6, 1e-18,
1886 "palRefcoq",
"refb", status);
1890 double ref, refa, refb, refa2, refb2, vu[3], vr[3], zr;
1892 palRefro( 1.4, 3456.7, 280, 678.9, 0.9, 0.55,
1893 -0.3, 0.006, 1e-9, &ref );
1894 vvd( ref, 0.00106715763018568, 1e-12,
"palRefro",
1897 palRefro( 1.4, 3456.7, 280, 678.9, 0.9, 1000,
1898 -0.3, 0.006, 1e-9, &ref );
1899 vvd( ref, 0.001296416185295403, 1e-12,
"palRefro",
1902 palRefcoq( 275.9, 709.3, 0.9, 101, &refa, &refb );
1903 vvd( refa, 2.324736903790639e-4, 1e-12,
"palRefcoq",
1905 vvd( refb, -2.442884551059e-7, 1e-15,
"palRefcoq",
1908 palRefco( 2111.1, 275.9, 709.3, 0.9, 101,
1909 -1.03, 0.0067, 1e-12, &refa, &refb );
1910 vvd( refa, 2.324673985217244e-4, 1e-12,
"palRefco",
1912 vvd( refb, -2.265040682496e-7, 1e-15,
"palRefco",
1915 palRefcoq( 275.9, 709.3, 0.9, 0.77, &refa, &refb );
1916 vvd( refa, 2.007406521596588e-4, 1e-12,
"palRefcoq",
1918 vvd( refb, -2.264210092590e-7, 1e-15,
"palRefcoq",
1921 palRefco( 2111.1, 275.9, 709.3, 0.9, 0.77,
1922 -1.03, 0.0067, 1e-12, &refa, &refb );
1923 vvd( refa, 2.007202720084551e-4, 1e-12,
"palRefco",
1925 vvd( refb, -2.223037748876e-7, 1e-15,
"palRefco",
1929 refa, refb, 0.5, &refa2, &refb2 );
1930 vvd ( refa2, 2.034523658888048e-4, 1e-12,
"palAtmdsp",
1932 vvd ( refb2, -2.250855362179e-7, 1e-15,
"palAtmdsp",
1936 palRefv ( vu, refa, refb, vr );
1937 vvd ( vr[0], 0.8447487047790478, 1e-12,
"palRefv",
1939 vvd ( vr[1], 0.3035794890562339, 1e-12,
"palRefv",
1941 vvd ( vr[2], 0.4407256738589851, 1e-12,
"palRefv",
1945 palRefv ( vu, refa, refb, vr );
1946 vvd ( vr[0], -0.8476187691681673, 1e-12,
"palRefv",
1948 vvd ( vr[1], -0.5295354802804889, 1e-12,
"palRefv",
1950 vvd ( vr[2], 0.0322914582168426, 1e-12,
"palRefv",
1953 palRefz ( 0.567, refa, refb, &zr );
1954 vvd ( zr, 0.566872285910534, 1e-12,
"palRefz",
1957 palRefz ( 1.55, refa, refb, &zr );
1958 vvd ( zr, 1.545697350690958, 1e-12,
"palRefz",
1968 int ver =
palVers( verstring,
sizeof(verstring));
1969 printf(
"PAL Version %s (%d)\n", verstring, ver);
static void t_ge50(int *status)
double palDrange(double angle)
double palDat(double dju)
static void t_ref(int *status)
void palDmat(int n, double *a, double *y, double *d, int *jf, int *iw)
void palUnpcd(double disco, double *x, double *y)
static void t_ampqk(int *status)
double palPa(double ha, double dec, double phi)
void palEvp(double date, double deqx, double dvb[3], double dpb[3], double dvh[3], double dph[3])
static const double PAL__DS2R
static void t_pm(int *status)
void palAtmdsp(double tdk, double pmb, double rh, double wl1, double a1, double b1, double wl2, double *a2, double *b2)
void palDe2h(double ha, double dec, double phi, double *az, double *el)
static void t_ctf2r(int *status)
double palEpb(double date)
void palDm2av(double rmat[3][3], double axvec[3])
static void t_dmat(int *status)
static void t_nut(int *status)
void palNut(double date, double rmatn[3][3])
void palPrec(double ep0, double ep1, double rmatp[3][3])
void palDmxv(double dm[3][3], double va[3], double vb[3])
void palRefro(double zobs, double hm, double tdk, double pmb, double rh, double wl, double phi, double tlr, double eps, double *ref)
void palPertel(int jform, double date0, double date1, double epoch0, double orbi0, double anode0, double perih0, double aorq0, double e0, double am0, double *epoch1, double *orbi1, double *anode1, double *perih1, double *aorq1, double *e1, double *am1, int *jstat)
void palDfltin(const char *string, int *nstrt, double *dreslt, int *jflag)
static void t_obs(int *status)
void palGalsup(double dl, double db, double *dsl, double *dsb)
static void t_afin(int *status)
static void t_djcal(int *status)
void palRefco(double hm, double tdk, double pmb, double rh, double wl, double phi, double tlr, double eps, double *refa, double *refb)
static void t_eqecl(int *status)
double palEpj(double date)
void palPv2ue(const double pv[6], double date, double pmass, double u[13], int *jstat)
static void t_prec(int *status)
double palRverot(double phi, double ra, double da, double st)
void palDvn(double v[3], double uv[3], double *vm)
static void t_rvgalc(int *status)
static void t_rv(int *status)
static void t_rvlg(int *status)
double palDbear(double a1, double b1, double a2, double b2)
static void t_aop(int *status)
void palAmp(double ra, double da, double date, double eq, double *rm, double *dm)
static void t_altaz(int *status)
double palDt(double epoch)
void palPm(double r0, double d0, double pr, double pd, double px, double rv, double ep0, double ep1, double *r1, double *d1)
void palDjcl(double djm, int *iy, int *im, int *id, double *fd, int *j)
void palPlante(double date, double elong, double phi, int jform, double epoch, double orbinc, double anode, double perih, double aorq, double e, double aorl, double dm, double *ra, double *dec, double *r, int *jstat)
void palDjcal(int ndp, double djm, int iymdf[4], int *j)
void palGaleq(double dl, double db, double *dr, double *dd)
void palPertue(double date, double u[13], int *jstat)
void palIntin(const char *string, int *nstrt, long *ireslt, int *jflag)
static void t_prebn(int *status)
void palPv2el(const double pv[6], double date, double pmass, int jformr, int *jform, double *epoch, double *orbinc, double *anode, double *perih, double *aorq, double *e, double *aorl, double *dm, int *jstat)
static void t_pa(int *status)
static void t_epj2d(int *status)
double palGmsta(double date, double ut1)
void palEqecl(double dr, double dd, double date, double *dl, double *db)
static void t_polmo(int *status)
void palDmxm(double a[3][3], double b[3][3], double c[3][3])
void palRefz(double zu, double refa, double refb, double *zr)
void palSupgal(double dsl, double dsb, double *dl, double *db)
double palRvlsrd(double r2000, double d2000)
void palEtrms(double ep, double ev[3])
void palDtps2c(double xi, double eta, double ra, double dec, double *raz1, double *decz1, double *raz2, double *decz2, int *n)
void palDr2af(int ndp, double angle, char *sign, int idmsf[4])
static void t_gmst(int *status)
static void t_bear(int *status)
static void t_pvobs(int *status)
void palPlanel(double date, int jform, double epoch, double orbinc, double anode, double perih, double aorq, double e, double aorl, double dm, double pv[6], int *jstat)
void palMap(double rm, double dm, double pr, double pd, double px, double rv, double eq, double date, double *ra, double *da)
void palAddet(double rm, double dm, double eq, double *rc, double *dc)
double palDsep(double a1, double b1, double a2, double b2)
static void t_caf2r(int *status)
static void t_etrms(int *status)
void palDcc2s(double v[3], double *a, double *b)
void palDd2tf(int ndp, double days, char *sign, int ihmsf[4])
double palDpav(double v1[3], double v2[3])
double palRvlg(double r2000, double d2000)
static void t_vers(int *status)
double palDvdv(double va[3], double vb[3])
static void t_tp(int *status)
void palPcd(double disco, double *x, double *y)
int palVers(char *verstring, size_t verlen)
static void t_refco(int *status)
static void t_mappa(int *status)
void palDmoon(double date, double pv[6])
static void t_supgal(int *status)
void palAmpqk(double ra, double da, double amprms[21], double *rm, double *dm)
static const double PAL__DPI
void palDvxv(double va[3], double vb[3], double vc[3])
void palPrebn(double bep0, double bep1, double rmatp[3][3])
void palHfk5z(double rh, double dh, double epoch, double *r5, double *d5, double *dr5, double *dd5)
void palAltaz(double ha, double dec, double phi, double *az, double *azd, double *azdd, double *el, double *eld, double *eldd, double *pa, double *pad, double *padd)
void palCldj(int iy, int im, int id, double *djm, int *j)
static void t_pcd(int *status)
double palDranrm(double angle)
double palDtt(double dju)
void palMappa(double eq, double date, double amprms[21])
void palNutc(double date, double *dpsi, double *deps, double *eps0)
void palUe2el(const double u[13], int jformr, int *jform, double *epoch, double *orbinc, double *anode, double *perih, double *aorq, double *e, double *aorl, double *dm, int *jstat)
static void t_addet(int *status)
static const double PAL__DD2R
static void t_map(int *status)
static void t_rvlsrd(int *status)
void palEpv(double date, double ph[3], double vh[3], double pb[3], double vb[3])
void palFk45z(double r1950, double d1950, double bepoch, double *r2000, double *d2000)
double palEpco(char k0, char k, double e)
static void t_epb(int *status)
void palFk54z(double r2000, double d2000, double bepoch, double *r1950, double *d1950, double *dr1950, double *dd1950)
void palMapqk(double rm, double dm, double pr, double pd, double px, double rv, double amprms[21], double *ra, double *da)
void palDcs2c(double a, double b, double v[3])
void palDaf2r(int ideg, int iamin, double asec, double *rad, int *j)
static void t_fk45z(int *status)
static void t_intin(int *status)
void palDeuler(const char *order, double phi, double theta, double psi, double rmat[3][3])
double palEqeqx(double date)
static void t_epj(int *status)
double palEpj2d(double epj)
static void vrmat(double rmat[3][3], double expected[3][3], const char *func, double dval, int *status)
void palDh2e(double az, double el, double phi, double *ha, double *dec)
void palDtf2d(int ihour, int imin, double sec, double *days, int *j)
static void t_rvlsrk(int *status)
void palDav2m(double axvec[3], double rmat[3][3])
void palDimxv(double dm[3][3], double va[3], double vb[3])
void palAoppat(double date, double aoprms[14])
static void viv(int ival, int ivalok, const char *func, const char *test, int *status)
static void t_e2h(int *status)
static void t_ctf2d(int *status)
static void t_galsup(int *status)
static void vvd(double val, double valok, double dval, const char *func, const char *test, int *status)
static void t_cc2s(int *status)
void palEl2ue(double date, int jform, double epoch, double orbinc, double anode, double perih, double aorq, double e, double aorl, double dm, double u[13], int *jstat)
static void t_planet(int *status)
static void t_airmas(int *status)
double palDsepv(double v1[3], double v2[3])
void palDr2tf(int ndp, double angle, char *sign, int ihmsf[4])
static void t_vecmat(int *status)
void palFk5hz(double r5, double d5, double epoch, double *rh, double *dh)
void palSubet(double rc, double dc, double eq, double *rm, double *dm)
static void vcs(const char *val, const char *valok, const char *func, const char *test, int *status)
static void t_evp(int *status)
void palDs2tp(double ra, double dec, double raz, double decz, double *xi, double *eta, int *j)
void palRefcoq(double tdk, double pmb, double rh, double wl, double *refa, double *refb)
void palEcmat(double date, double rmat[3][3])
static void t_caldj(int *status)
static void vvec(int len, double *vec, double *expected, const char *func, int *status)
double palAirmas(double zd)
static void t_cr2af(int *status)
void palPolmo(double elongm, double phim, double xp, double yp, double *elong, double *phi, double *daz)
void palRefv(double vu[3], double refa, double refb, double vr[3])
static void t_preces(int *status)
static void t_eqeqx(int *status)
static void t_dat(int *status)
void palPvobs(double p, double h, double stl, double pv[6])
void palFk524(double r2000, double d2000, double dr2000, double dd2000, double p2000, double v2000, double *r1950, double *d1950, double *dr1950, double *dd1950, double *p1950, double *v1950)
void palDtp2s(double xi, double eta, double raz, double decz, double *ra, double *dec)
static void t_ecleq(int *status)
static void t_fk524(int *status)
static void t_epco(int *status)
static void t_flotin(int *status)
static void t_sep(int *status)
void palRdplan(double date, int np, double elong, double phi, double *ra, double *dec, double *diam)
static void t_fk54z(int *status)
void palEcleq(double dl, double db, double date, double *dr, double *dd)
static void t_amp(int *status)
static void t_ranorm(int *status)
int palObs(size_t n, const char *c, char *ident, size_t identlen, char *name, size_t namelen, double *w, double *p, double *h)
static void t_ecmat(int *status)
void palPlanet(double date, int np, double pv[6], int *j)
void palDtf2r(int ihour, int imin, double sec, double *rad, int *j)
static void t_cd2tf(int *status)
void palOap(const char *type, double ob1, double ob2, double date, double dut, double elongm, double phim, double hm, double xp, double yp, double tdk, double pmb, double rh, double wl, double tlr, double *rap, double *dap)
static void t_range(int *status)
static void t_cr2tf(int *status)
void palCaldj(int iy, int im, int id, double *djm, int *j)
void palGeoc(double p, double h, double *r, double *z)
static void t_mapqkz(int *status)
double palGmst(double ut1)
static void t_eqgal(int *status)
void palAoppa(double date, double dut, double elongm, double phim, double hm, double xp, double yp, double tdk, double pmb, double rh, double wl, double tlr, double aoprms[14])
static void t_moon(int *status)
void palMapqkz(double rm, double dm, double amprms[21], double *ra, double *da)
void palEqgal(double dr, double dd, double *dl, double *db)
sprintf(name1,"NewService%d", i)
void palPlantu(double date, double elong, double phi, const double u[13], double *ra, double *dec, double *r, int *jstat)
static void t_epb2d(int *status)
static void t_galeq(int *status)
void palGe50(double dl, double db, double *dr, double *dd)
static void t_geoc(int *status)
void palPreces(const char sys[3], double ep0, double ep1, double *ra, double *dc)
void palAop(double rap, double dap, double date, double dut, double elongm, double phim, double hm, double xp, double yp, double tdk, double pmb, double rh, double wl, double tlr, double *aob, double *zob, double *hob, double *dob, double *rob)
void palOapqk(const char *type, double ob1, double ob2, const double aoprms[14], double *rap, double *dap)
void palDafin(const char *string, int *iptr, double *a, int *j)
static void t_fk52h(int *status)
double palRvgalc(double r2000, double d2000)
double palRvlsrk(double r2000, double d2000)
void palUe2pv(double date, double u[13], double pv[], int *jstat)
double palEpb2d(double epb)
static void t_cldj(int *status)