Changeset 7118
- Timestamp:
- May 15, 2006, 3:08:58 PM (20 years ago)
- Location:
- trunk/psLib
- Files:
-
- 4 edited
-
src/astro/psEarthOrientation.c (modified) (2 diffs)
-
test/astro/tst_psEarthOrientation.c (modified) (29 diffs)
-
test/astro/verified/tst_psEarthOrientation.stdout (modified) (1 diff)
-
test/math/tst_psPolyFit4D.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/astro/psEarthOrientation.c
r6425 r7118 8 8 * @author Robert Daniel DeSonia, MHPCC 9 9 * 10 * @version $Revision: 1.3 5$ $Name: not supported by cvs2svn $11 * @date $Date: 2006-0 2-14 00:09:26$10 * @version $Revision: 1.36 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2006-05-16 01:08:57 $ 12 12 * 13 13 * Copyright 2005 Maui High Performance Computing Center, University of Hawaii … … 1018 1018 // Convert psTime to MJD 1019 1019 double MJD = psTimeToMJD(time); 1020 printf("\nMJD check = %.13g\n", MJD);1020 // printf("\nMJD check = %.13g\n", MJD); 1021 1021 if (MJD == NAN) { 1022 1022 psError(PS_ERR_BAD_PARAMETER_VALUE, false, -
trunk/psLib/test/astro/tst_psEarthOrientation.c
r6987 r7118 5 5 * @author d-Rob, MHPCC 6 6 * 7 * @version $Revision: 1.3 1$ $Name: not supported by cvs2svn $8 * @date $Date: 2006-0 4-26 01:09:13$7 * @version $Revision: 1.32 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2006-05-16 01:08:58 $ 9 9 * 10 10 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 64 64 #define objR DEG_TO_RAD(122.9153182445501) 65 65 #define objD DEG_TO_RAD(48.562968978679194) 66 #define VERBOSE 0 66 67 static psSphere *obj = NULL; 67 68 static void objSetup(void); … … 149 150 apparent = psAberration(apparent, actual, direction, speed); 150 151 psCube *outCube = psSphereToCube(apparent); 151 printf("\n -- resultCube = x,y,z = %.13g, %.13g, %.13g -- \n", 152 outCube->x, outCube->y, outCube->z); 152 if (VERBOSE) { 153 printf("\n -- resultCube = x,y,z = %.13g, %.13g, %.13g -- \n", 154 outCube->x, outCube->y, outCube->z); 155 } 153 156 //expected cube values 154 157 double x, y, z; … … 157 160 z = 0.7497078321908413; 158 161 159 printf(" -- expectedCube = x,y,z = %.13g, %.13g, %.13g -- \n", x, y, z); 160 printf("Cube Difference = x,y,z = %.13g, %.13g, %.13g \n\n", 161 (x - outCube->x), (y - outCube->y), (z - outCube->z) ); 162 if (VERBOSE) { 163 printf(" -- expectedCube = x,y,z = %.13g, %.13g, %.13g -- \n", x, y, z); 164 printf("Cube Difference = x,y,z = %.13g, %.13g, %.13g \n\n", 165 (x - outCube->x), (y - outCube->y), (z - outCube->z) ); 166 } 162 167 psFree(actual); 163 168 actualCube->x = x; … … 166 171 actual = psCubeToSphere(actualCube); 167 172 double xxx = greatCircle(actual, apparent); 168 printf(" The great circle angular distance between expected & result = %.13g\n", 169 xxx); 170 173 if (VERBOSE) { 174 printf(" The great circle angular distance between expected & result = %.13g\n", 175 xxx); 176 } 171 177 if ( fabs(x - outCube->x) > FLT_EPSILON || fabs(y - outCube->y) > FLT_EPSILON || 172 178 fabs(z - outCube->z) > FLT_EPSILON ) { … … 184 190 actual = psCubeToSphere(actualCube); 185 191 x = greatCircle(actual, apparent); 186 printf(" The great circle angular distance between expected & result = %.13g\n", 187 x); 192 if (VERBOSE) { 193 printf(" The great circle angular distance between expected & result = %.13g\n", 194 x); 195 } 188 196 return 3; 189 197 } … … 216 224 sunCube->y /= sunLength; 217 225 sunCube->z /= sunLength; 218 printf("sunCube = x,y,z = %.13g, %.13g, %.13g\n", sunCube->x, sunCube->y, sunCube->z); 226 if (VERBOSE) { 227 printf("sunCube = x,y,z = %.13g, %.13g, %.13g\n", 228 sunCube->x, sunCube->y, sunCube->z); 229 } 219 230 psSphere *sun = psCubeToSphere(sunCube); 220 printf("sunSphere = r, d = %.13g, %.13g\n", sun->r, sun->d); 231 if (VERBOSE) { 232 printf("sunSphere = r, d = %.13g, %.13g\n", sun->r, sun->d); 233 } 221 234 psCube *outCube = psCubeAlloc(); 222 235 … … 241 254 // psSphere *result = psSphereSetOffset(actual, apparent, PS_SPHERICAL, PS_RADIAN); 242 255 // psSphere *result = psSphereGetOffset(apparent, actual, PS_SPHERICAL, PS_RADIAN); 243 printf(" -- actualCube = x,y,z = %.13g, %.13g, %.13g -- \n", 244 actualCube->x, actualCube->y, actualCube->z); 256 if (VERBOSE) { 257 printf(" -- actualCube = x,y,z = %.13g, %.13g, %.13g -- \n", 258 actualCube->x, actualCube->y, actualCube->z); 259 } 245 260 // psCube *outCube = psSphereToCube(result); 246 261 // printf(" -- resultCube = x,y,z = %.13g, %.13g, %.13g -- \n", 247 262 // outCube->x, outCube->y, outCube->z); 248 263 psCube *outCube2 = psSphereToCube(apparent); 249 printf(" -- resultCube2= x,y,z = %.13g, %.13g, %.13g -- \n", 250 outCube2->x, outCube2->y, outCube2->z); 264 if (VERBOSE) { 265 printf(" -- resultCube2= x,y,z = %.13g, %.13g, %.13g -- \n", 266 outCube2->x, outCube2->y, outCube2->z); 267 } 251 268 double x, y, z; 252 269 x = -0.35961949760293604; … … 254 271 z = 0.7496835020836093; 255 272 256 printf(" -- expectCube = x,y,z = %.13g, %.13g, %.13g -- \n\n", x, y, z); 257 258 // if ( fabs(x - outCube->x) > DBL_EPSILON || fabs(y - outCube->y) > DBL_EPSILON || 259 // fabs(z - outCube->z) > DBL_EPSILON ) { 260 // psError(PS_ERR_BAD_PARAMETER_VALUE, false, 261 // "psGravityDeflection returned incorrect values.\n"); 262 printf("expect-actual= x,y,z = %.13g, %.13g, %.13g \n", 263 (x - actualCube->x), (y - actualCube->y), (z - actualCube->z) ); 264 printf("expect-result= x,y,z = %.13g, %.13g, %.13g \n", 265 (x - outCube2->x), (y - outCube2->y), (z - outCube2->z) ); 266 printf("result-actual= x,y,z = %.13g, %.13g, %.13g \n", 267 (outCube2->x - actualCube->x), (outCube2->y - actualCube->y), 268 (outCube2->z - actualCube->z) ); 273 if (VERBOSE) { 274 printf(" -- expectCube = x,y,z = %.13g, %.13g, %.13g -- \n\n", x, y, z); 275 276 // if ( fabs(x - outCube->x) > DBL_EPSILON || fabs(y - outCube->y) > DBL_EPSILON || 277 // fabs(z - outCube->z) > DBL_EPSILON ) { 278 // psError(PS_ERR_BAD_PARAMETER_VALUE, false, 279 // "psGravityDeflection returned incorrect values.\n"); 280 printf("expect-actual= x,y,z = %.13g, %.13g, %.13g \n", 281 (x - actualCube->x), (y - actualCube->y), (z - actualCube->z) ); 282 printf("expect-result= x,y,z = %.13g, %.13g, %.13g \n", 283 (x - outCube2->x), (y - outCube2->y), (z - outCube2->z) ); 284 printf("result-actual= x,y,z = %.13g, %.13g, %.13g \n", 285 (outCube2->x - actualCube->x), (outCube2->y - actualCube->y), 286 (outCube2->z - actualCube->z) ); 287 } 269 288 // return 1; 270 289 // } … … 278 297 psFree(result2); 279 298 result2 = psSphereGetOffset(actual, apparent, PS_SPHERICAL, PS_RADIAN); 280 printf("The apparent output sphere = r,d = %.13g, %.13g\n", result2->r, result2->d); 281 printf("The expected output sphere = r,d = %.13g, %.13g\n\n", result->r, result->d); 299 if (VERBOSE) { 300 printf("The apparent output sphere = r,d = %.13g, %.13g\n", result2->r, result2->d); 301 printf("The expected output sphere = r,d = %.13g, %.13g\n\n", result->r, result->d); 302 } 282 303 psFree(result2); 283 304 … … 339 360 return 4; 340 361 } 341 printf("\n PrecessionModel output = x,y,s = %.13g, %.13g, %.13g\n", 342 pmodel->x, pmodel->y, pmodel->s); 343 printf(" Expected output = x,y,s = %.13g, %.13g, %.13g\n", x, y, s); 344 printf(" A difference of: %.13g, %.13g, %.13g\n", 345 (pmodel->x - x), (pmodel->y - y), (pmodel->s - s) ); 362 if (VERBOSE) { 363 printf("\n PrecessionModel output = x,y,s = %.13g, %.13g, %.13g\n", 364 pmodel->x, pmodel->y, pmodel->s); 365 printf(" Expected output = x,y,s = %.13g, %.13g, %.13g\n", x, y, s); 366 printf(" A difference of: %.13g, %.13g, %.13g\n", 367 (pmodel->x - x), (pmodel->y - y), (pmodel->s - s) ); 368 } 346 369 } 347 370 psFree(pmodel); … … 393 416 return 7; 394 417 } else { 395 printf("\nPrecessionCorr output (IERSA) = x,y,s = %.13g, %.13g, %.13g\n", 396 pcorr->x, pcorr->y, pcorr->s); 418 if (VERBOSE) { 419 printf("\nPrecessionCorr output (IERSA) = x,y,s = %.13g, %.13g, %.13g\n", 420 pcorr->x, pcorr->y, pcorr->s); 421 } 397 422 } 398 423 psFree(pcorr); … … 415 440 // psError(PS_ERR_BAD_PARAMETER_VALUE, false, 416 441 // " psEOC_PrecessionCorr return incorrect values.\n"); 417 printf("PrecessionCorr output (IERSB) = x,y,s = %.13g, %.13g, %.13g\n", 418 pcorr->x, pcorr->y, pcorr->s); 419 printf("Expected output = x,y,s = %.13g, %.13g, %.13g\n", xx, yy, ss); 420 printf(" A difference of: %.13g, %.13g, %.13g\n\n", 421 (pcorr->x - xx), (pcorr->y - yy), (pcorr->s - ss) ); 442 if (VERBOSE) { 443 printf("PrecessionCorr output (IERSB) = x,y,s = %.13g, %.13g, %.13g\n", 444 pcorr->x, pcorr->y, pcorr->s); 445 printf("Expected output = x,y,s = %.13g, %.13g, %.13g\n", xx, yy, ss); 446 printf(" A difference of: %.13g, %.13g, %.13g\n\n", 447 (pcorr->x - xx), (pcorr->y - yy), (pcorr->s - ss) ); 448 } 422 449 // return 10; 423 450 // } … … 449 476 // printf(" Output from CEOtoGCRS only = %.13g,%.13g,%.13g,%.13g\n", 450 477 // pni->q0, pni->q1, pni->q2, pni->q3); 451 printf(" Expected sphere rotation = %.13g, %.13g, %.13g\n", q0,q1,q2); 452 printf(" Result sphere rotation = %.13g, %.13g, %.13g\n", 453 precessNutInv->q0, precessNutInv->q1, precessNutInv->q2); 454 printf(" Difference = %.13g, %.13g, %.13g\n\n", 455 precessNutInv->q0-q0, precessNutInv->q1-q1, precessNutInv->q2-q2); 478 if (VERBOSE) { 479 printf(" Expected sphere rotation = %.13g, %.13g, %.13g\n", q0,q1,q2); 480 printf(" Result sphere rotation = %.13g, %.13g, %.13g\n", 481 precessNutInv->q0, precessNutInv->q1, precessNutInv->q2); 482 printf(" Difference = %.13g, %.13g, %.13g\n\n", 483 precessNutInv->q0-q0, precessNutInv->q1-q1, precessNutInv->q2-q2); 484 } 456 485 psCube *objC = psCubeAlloc(); 457 486 // objC->x = -3.5963388069046304; … … 479 508 y = 0.5555012823608123; 480 509 z = 0.7496183628158023; 481 printf("\n<<Expected out = x,y,z = %.13g, %.13g, %.13g\n", x, y, z); 510 if (VERBOSE) { 511 printf("\n<<Expected out = x,y,z = %.13g, %.13g, %.13g\n", x, y, z); 512 } 482 513 // psFree(objC); 483 514 // objC = psSphereToCube(expect); … … 490 521 psFree(objC); 491 522 objC = psSphereToCube(result); 492 printf("<<Resulting out = x,y,z = %.13g, %.13g, %.13g\n", objC->x, objC->y, objC->z);493 printf(" Difference = %.13g, %.13g, %.13g\n\n", objC->x-x, objC->y-y, objC->z-z);494 495 523 double xx = greatCircle(result, expect); 496 printf("GREAT CIRCLE DIFFERENCE = %.13g \n", xx); 524 if (VERBOSE) { 525 printf("<<Resulting out = x,y,z = %.13g, %.13g, %.13g\n", objC->x, objC->y, objC->z); 526 printf(" Difference = %.13g, %.13g, %.13g\n\n", 527 objC->x-x, objC->y-y, objC->z-z); 528 printf("GREAT CIRCLE DIFFERENCE = %.13g \n", xx); 529 } 530 497 531 psFree(precess); 498 532 psFree(precessNut); … … 556 590 // psError(PS_ERR_BAD_PARAMETER_VALUE, false, 557 591 // "psEOC_GetPolarMotion returned incorrect values.\n"); 558 printf(" <>PolarMotion output (IERSA) = x,y,s = %.13g, %.13g, %.13g\n", 559 polarMotion->x, polarMotion->y, polarMotion->s); 592 if (VERBOSE) { 593 printf(" <>PolarMotion output (IERSA) = x,y,s = %.13g, %.13g, %.13g\n", 594 polarMotion->x, polarMotion->y, polarMotion->s); 595 } 560 596 // printf(" <>PolarMotion expected (IERSA) = x,y,s = %.13g, %.13g, %.13g\n", 561 597 // x, y, s); … … 578 614 // psError(PS_ERR_BAD_PARAMETER_VALUE, false, 579 615 // "psEOC_GetPolarMotion returned incorrect values.\n"); 580 printf(" <>PolarMotion output (IERSB) = x,y,s = %.13g, %.13g, %.13g\n", 581 polarMotion->x, polarMotion->y, polarMotion->s); 616 if (VERBOSE) { 617 printf(" <>PolarMotion output (IERSB) = x,y,s = %.13g, %.13g, %.13g\n", 618 polarMotion->x, polarMotion->y, polarMotion->s); 619 } 582 620 // printf(" <>PolarMotion expected (IERSB) = x,y,s = %.13g, %.13g, %.13g\n", 583 621 // x, y, s); … … 603 641 // psError(PS_ERR_BAD_PARAMETER_VALUE, false, 604 642 // " psEOC_GetPolarMotion returned incorrect values.\n"); 605 printf("\n PolarMotion + NutationCorr out = x,y,s = %.13g, %.13g, %.13g\n", 606 polarMotion->x, polarMotion->y, polarMotion->s); 607 printf(" Expected output = x,y,s = %.13g, %.13g, %.13g\n", x, y, s); 608 printf(" Difference = x,y,s = %.13g, %.13g, %.13g\n", 609 polarMotion->x - x, polarMotion->y - y, polarMotion->s - s); 643 if (VERBOSE) { 644 printf("\n PolarMotion + NutationCorr out = x,y,s = %.13g, %.13g, %.13g\n", 645 polarMotion->x, polarMotion->y, polarMotion->s); 646 printf(" Expected output = x,y,s = %.13g, %.13g, %.13g\n", x, y, s); 647 printf(" Difference = x,y,s = %.13g, %.13g, %.13g\n", 648 polarMotion->x - x, polarMotion->y - y, polarMotion->s - s); 649 } 610 650 // } 611 651 … … 645 685 return 2; 646 686 } else { 647 printf("\nPolarTideCorr output = x,y,s = %.13g, %.13g, %.13g\n", 648 eop->x, eop->y, eop->s); 687 if (VERBOSE) { 688 printf("\nPolarTideCorr output = x,y,s = %.13g, %.13g, %.13g\n", 689 eop->x, eop->y, eop->s); 690 } 649 691 } 650 692 … … 689 731 return 3; 690 732 } else { 691 printf("Nutation Correction output = x,y,s = %.13g, %.13g, %.13g\n\n", 692 nute->x, nute->y, nute->s); 733 if (VERBOSE) { 734 printf("Nutation Correction output = x,y,s = %.13g, %.13g, %.13g\n\n", 735 nute->x, nute->y, nute->s); 736 } 693 737 } 694 738 psFree(nute); … … 734 778 psError(PS_ERR_BAD_PARAMETER_VALUE, false, 735 779 "psSphereRot_TEOtoCEO failed to return matching values for different time types.\n"); 736 printf("\n Output Rotation1 = q0,q1,q2,q3 = %.13g, %.13g, %.13g, %.13g\n", 780 if (VERBOSE) { 781 printf("\n Output Rotation1 = q0,q1,q2,q3 = %.13g, %.13g, %.13g, %.13g\n", 782 teoceo->q0, teoceo->q1, teoceo->q2, teoceo->q3 ); 783 printf("\n Output Rotation2 = q0,q1,q2,q3 = %.13g, %.13g, %.13g, %.13g\n", 784 rot->q0, rot->q1, rot->q2, rot->q3 ); 785 } 786 return 2; 787 } 788 if (VERBOSE) { 789 printf("\n Output Rotation = q0,q1,q2,q3 = %.13g, %.13g, %.13g, %.13g\n", 737 790 teoceo->q0, teoceo->q1, teoceo->q2, teoceo->q3 ); 738 printf("\n Output Rotation2 = q0,q1,q2,q3 = %.13g, %.13g, %.13g, %.13g\n", 739 rot->q0, rot->q1, rot->q2, rot->q3 ); 740 return 2; 741 } 742 printf("\n Output Rotation = q0,q1,q2,q3 = %.13g, %.13g, %.13g, %.13g\n", 743 teoceo->q0, teoceo->q1, teoceo->q2, teoceo->q3 ); 791 } 744 792 745 793 objSetup(); … … 757 805 psError(PS_ERR_BAD_PARAMETER_VALUE, false, 758 806 "psSphereRot_TEOtoCEO returned incorrect values.\n"); 759 printf("\nOutput cube = x,y,z = %.13g, %.13g, %.13g\n", 760 cube->x, cube->y, cube->z); 761 printf("Expected cube = x,y,z = %.13g, %.13g, %.13g\n", x, y, z); 762 printf("A difference of: %.13g, %.13g, %.13g\n\n", 763 (x-cube->x), (y-cube->y), (z-cube->z)); 807 if (VERBOSE) { 808 printf("\nOutput cube = x,y,z = %.13g, %.13g, %.13g\n", 809 cube->x, cube->y, cube->z); 810 printf("Expected cube = x,y,z = %.13g, %.13g, %.13g\n", x, y, z); 811 printf("A difference of: %.13g, %.13g, %.13g\n\n", 812 (x-cube->x), (y-cube->y), (z-cube->z)); 813 } 764 814 return 3; 765 815 } … … 808 858 } 809 859 810 printf("\n Output sphere rotation = %.13g, %.13g, %.13g, %.13g\n", 811 rot->q0, rot->q1, rot->q2, rot->q3); 812 printf(" Expected sphere rotation = %.13g, %.13g, %.13g, %.13g\n", q0,q1,q2,q3); 813 printf(" difference: %.13g, %.13g, %.13g \n", 814 (rot->q0-q0), (rot->q1-q1), (rot->q2-q2) ); 860 if (VERBOSE) { 861 printf("\n Output sphere rotation = %.13g, %.13g, %.13g, %.13g\n", 862 rot->q0, rot->q1, rot->q2, rot->q3); 863 printf(" Expected sphere rotation = %.13g, %.13g, %.13g, %.13g\n", q0,q1,q2,q3); 864 printf(" difference: %.13g, %.13g, %.13g \n", 865 (rot->q0-q0), (rot->q1-q1), (rot->q2-q2) ); 866 } 815 867 if (fabs(rot->q0-q0) > FLT_EPSILON || fabs(rot->q1-q1) > FLT_EPSILON || 816 868 fabs(rot->q2-q2) > FLT_EPSILON || fabs(rot->q3+q3) > FLT_EPSILON) { … … 832 884 y = 0.5555012823608123; 833 885 z = 0.7496183628158023; 834 printf("\n Output cube = x,y,z = %.13g, %.13g, %.13g\n", cube->x, cube->y, cube->z); 835 printf("Expected cube = x,y,z = %.13g, %.13g, %.13g\n", x, y, z); 836 printf(" A difference of: %.13g, %.13g, %.13g\n\n", 837 (x-cube->x), (y-cube->y), (z-cube->z)); 886 if (VERBOSE) { 887 printf("\n Output cube = x,y,z = %.13g, %.13g, %.13g\n", cube->x, cube->y, cube->z); 888 printf("Expected cube = x,y,z = %.13g, %.13g, %.13g\n", x, y, z); 889 printf(" A difference of: %.13g, %.13g, %.13g\n\n", 890 (x-cube->x), (y-cube->y), (z-cube->z)); 891 } 838 892 psCube *expect = psCubeAlloc(); 839 893 expect->x = x; … … 842 896 psSphere *expected = psCubeToSphere(expect); 843 897 double d = greatCircle(result, expected); 844 printf(" The great circle angular distance between expected & result = %.13g\n", d); 898 if (VERBOSE) { 899 printf(" The great circle angular distance between expected & result = %.13g\n", d); 900 } 845 901 846 902 psFree(expect); … … 895 951 psError(PS_ERR_BAD_PARAMETER_VALUE, false, 896 952 "psSphereRot_ITRStoTEO failed to return expected values.\n"); 953 if (VERBOSE) { 954 printf("\n Output sphere rotation = %.13g, %.13g, %.13g, %.13g\n", 955 rot->q0, rot->q1, rot->q2, rot->q3); 956 printf(" Expected sphere rotation = %.13g, %.13g, %.13g, %.13g\n", q0,q1,q2,q3); 957 printf(" a difference: %.13g, %.13g, %.13g, %.13g \n", (rot->q0-q0), (rot->q1-q1), 958 (rot->q2-q2), (rot->q3-q3) ); 959 } 960 printf("Error #3\n"); 961 // return 3; 962 } 963 if (VERBOSE) { 897 964 printf("\n Output sphere rotation = %.13g, %.13g, %.13g, %.13g\n", 898 965 rot->q0, rot->q1, rot->q2, rot->q3); 899 966 printf(" Expected sphere rotation = %.13g, %.13g, %.13g, %.13g\n", q0,q1,q2,q3); 900 printf(" a difference: %.13g, %.13g, %.13g, %.13g \n", (rot->q0-q0), (rot->q1-q1), 901 (rot->q2-q2), (rot->q3-q3) ); 902 // return 3; 903 } 904 printf("\n Output sphere rotation = %.13g, %.13g, %.13g, %.13g\n", 905 rot->q0, rot->q1, rot->q2, rot->q3); 906 printf(" Expected sphere rotation = %.13g, %.13g, %.13g, %.13g\n", q0,q1,q2,q3); 967 } 907 968 908 969 psCube *temp = psCubeAlloc(); … … 920 981 test = psSphereRotApply(NULL, newRot, obj); 921 982 temp = psSphereToCube(test); 922 printf("\n Cube -test- has x,y,z = %.13g, %.13g, %.13g \n", temp->x, temp->y, temp->z);923 983 double x, y, z; 924 984 x = 0.01698577185310146; 925 985 y = -0.6616538927902393; 926 986 z = 0.7496169753347885; 927 printf("\n Cube -expected- has x,y,z = %.13g, %.13g, %.13g \n", x, y, z ); 987 if (VERBOSE) { 988 printf("\n Cube -test- has x,y,z = %.13g, %.13g, %.13g \n", 989 temp->x, temp->y, temp->z); 990 printf("\n Cube -expected- has x,y,z = %.13g, %.13g, %.13g \n", x, y, z ); 991 } 928 992 temp->x = x; 929 993 temp->y = y; … … 931 995 psSphere *sphere = psCubeToSphere(temp); 932 996 double d = greatCircle(sphere, test); 933 printf("Great circle difference of: %.13g \n", d); 997 if (VERBOSE) { 998 printf("Great circle difference of: %.13g \n", d); 999 } 934 1000 935 1001 psFree(sphere); -
trunk/psLib/test/astro/verified/tst_psEarthOrientation.stdout
r6988 r7118 1 2 -- resultCube = x,y,z = -0.359633878262, 0.5555192580977, 0.7497078280829 --3 -- expectedCube = x,y,z = -0.3596338806905, 0.5555192509817, 0.7497078321908 --4 Cube Difference = x,y,z = -2.428477863248e-09, -7.116060296575e-09, 4.107927886743e-095 6 The great circle angular distance between expected & result = 07 sunCube = x,y,z = 0.9820293796219, 0.1731564131522, 0.07506766376848 sunSphere = r, d = 0.1745310859793, 0.07513834612939 1 Theta = 1.772849258423 10 2 r0 = -7.3028651010049865723e+11 11 3 Theta = -1.913704437867e-08 12 4 phi = 7.882970755914e-09 13 -- actualCube = x,y,z = -0.3596195125758, 0.5555613903456, 0.7496834983725 -- 14 -- resultCube2= x,y,z = -0.3596194987327, 0.5555613922666, 0.7496835035894 -- 15 -- expectCube = x,y,z = -0.3596194976029, 0.5555613950298, 0.7496835020836 -- 16 17 expect-actual= x,y,z = 1.497289375818e-08, 4.684221899254e-09, 3.711128404582e-09 18 expect-result= x,y,z = 1.129748239403e-09, 2.763238637904e-09, -1.505794267054e-09 19 result-actual= x,y,z = 1.384314551878e-08, 1.92098326135e-09, 5.216922671636e-09 20 The apparent output sphere = r,d = -1.91370443936e-08, 7.88297072063e-09 21 The expected output sphere = r,d = -2.283899158684e-08, 5.607657671547e-09 22 23 24 PrecessionModel output = x,y,s = 0.0002857180163421, 2.394794321783e-05, -1.397070873644e-08 25 Expected output = x,y,s = 0.0002857175590089, 2.396873937773e-05, -1.39700664579e-08 26 A difference of: 4.57333152468e-10, -2.079615990713e-08, -6.422785401238e-13 27 28 PrecessionCorr output (IERSA) = x,y,s = 1.947922616393e-10, 1.721410388291e-10, 0 29 PrecessionCorr output (IERSB) = x,y,s = 3.054127043514e-10, -1.396712376063e-10, 0 30 Expected output = x,y,s = 3.052243007204e-10, -1.394413392358e-10, 0 31 A difference of: 1.884036310428e-13, -2.298983704727e-13, 0 32 33 Expected sphere rotation = -1.198452240676e-05, 0.0001428589335861, 1.219119351891e-10 34 Result sphere rotation = -1.197390289426e-05, 0.0001428591622618, 6.98535429644e-09 35 Difference = 1.061951249492e-08, 2.286756638811e-10, 6.863442361251e-09 36 37 38 <<Expected out = x,y,z = -0.3598480726985, 0.5555012823608, 0.7496183628158 39 <<Resulting out = x,y,z = -0.3598480654143, 0.5555013032212, 0.7496183508541 40 Difference = 7.28427523855e-09, 2.086037931281e-08, -1.196173393669e-08 41 42 GREAT CIRCLE DIFFERENCE = 2.107342425545e-08 43 <>PolarMotion output (IERSA) = x,y,s = -6.454357026873e-07, 2.112611340557e-06, 0 44 <>PolarMotion output (IERSB) = x,y,s = -6.453778846156e-07, 2.112824593826e-06, 0 45 46 MJD check = 52730.06284722 47 48 PolarMotion + NutationCorr out = x,y,s = -6.453259754967e-07, 2.113939222748e-06, -7.396173345101e-12 49 Expected output = x,y,s = -6.43607313124e-07, 2.113514369736e-06, -7.396175813246e-12 50 Difference = x,y,s = -1.718662372636e-09, 4.248530125326e-10, 2.468145872205e-18 51 52 PolarTideCorr output = x,y,s = 5.576394041032e-11, 1.141315275255e-09, -2.661051633224e-05 53 54 MJD check = 52730.06284722 55 Nutation Correction output = x,y,s = -3.854821468189e-12, -2.668635296536e-11, -7.396173345101e-12 56 57 58 Output Rotation = q0,q1,q2,q3 = 0, 0, -0.9625401013456, 0.2711393614023 59 60 Output sphere rotation = -1.198437080989e-05, 0.0001428587808888, 6.985033157173e-09, 0.9999999897239 61 Expected sphere rotation = -1.198452240676e-05, 0.0001428589335861, 1.219119351891e-10, -0.9999999897238 62 difference: 1.515968626689e-10, -1.526973275742e-10, 6.863121221984e-09 63 64 Output cube = x,y,z = -0.3598480648445, 0.555501287526, 0.7496183627584 65 Expected cube = x,y,z = -0.3598480726985, 0.5555012823608, 0.7496183628158 66 A difference of: -7.854020045439e-09, -5.165185501532e-09, 5.738021169321e-11 67 68 The great circle angular distance between expected & result = 1.490116119385e-08 69 70 Output sphere rotation = -1.056757184868e-06, 3.218036565618e-07, -3.410955728293e-13, 0.9999999999994 71 Expected sphere rotation = -1.056757184866e-06, 3.218036562932e-07, -3.35801958072e-12, -0.9999999999994 72 73 Cube -test- has x,y,z = 0.01698577184911, -0.6616538927903, 0.7496169753348 74 75 Cube -expected- has x,y,z = 0.0169857718531, -0.6616538927902, 0.7496169753348 76 Great circle difference of: 0 5 Error #3 -
trunk/psLib/test/math/tst_psPolyFit4D.c
r7111 r7118 33 33 #define ERROR_TOLERANCE 0.10 34 34 #define YERR 10.0 35 #define VERBOSE 035 #define VERBOSE 1 36 36 #define NUM_ITERATIONS 5 37 37 #define CLIP_SIGMA 4.0
Note:
See TracChangeset
for help on using the changeset viewer.
