Changeset 5642 for trunk/psLib/src/astro/psEarthOrientation.c
- Timestamp:
- Nov 30, 2005, 1:50:40 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/astro/psEarthOrientation.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/astro/psEarthOrientation.c
r5626 r5642 8 8 * @author Robert Daniel DeSonia, MHPCC 9 9 * 10 * @version $Revision: 1. 19$ $Name: not supported by cvs2svn $11 * @date $Date: 2005-11-30 02:17:17$10 * @version $Revision: 1.20 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2005-11-30 23:50:40 $ 12 12 * 13 13 * Copyright 2005 Maui High Performance Computing Center, University of Hawaii … … 727 727 } 728 728 double T = (double)(in->sec) + (double)(in->nsec / 1e9); 729 printf("\nThe Value of T is = %.1 3g\n", T);729 printf("\nThe Value of T is = %.19g\n", T); 730 730 T += -2451545.0; 731 printf("\nThe Value of T is = %.13g\n", T);732 731 double theta = 2.0 * M_PI * (0.7790572732640 + 1.00273781191135448 * T); 732 printf("\nThe Value of theta is = %.13g\n", theta); 733 // psSphereRot *out = psSphereRotInvert(theta, 0.0, 0.0); 733 734 psSphereRot *out = psSphereRotInvert(theta, 0.0, 0.0); 734 735 … … 745 746 psSphere *in = NULL; 746 747 double s; 748 psTime *time2 = psTimeAlloc(time->type); 749 time2->sec = time->sec; 750 time2->nsec = time->nsec; 751 time2->leapsecond = time->leapsecond; 752 //XXX: Time must be converted to TAI before use? 753 if (time->type == PS_TIME_UT1) { 754 psError(PS_ERR_BAD_PARAMETER_VALUE, true, "psTime cannot be of type UT1 here.\n"); 755 return NULL; 756 } else if (time->type != PS_TIME_TAI) { 757 time2 = psTimeConvert(time2, PS_TIME_TAI); 758 } 747 759 748 760 //XXX: This may be the wrong idea... ADD says to use 3rd-order polys to interpolate 749 761 //polar motion coordinates. 750 in = p_psTimeGetPoleCoords(time );762 in = p_psTimeGetPoleCoords(time2); 751 763 if (in == NULL) { 752 764 psError(PS_ERR_BAD_PARAMETER_NULL, true, … … 757 769 out->y = in->d; 758 770 759 s = psTimeGetUT1Delta(time , bulletin);771 s = psTimeGetUT1Delta(time2, bulletin); 760 772 out->s = s; 761 773 762 774 //XXX: Apply polar tide correction here??? 763 psEarthPole *correction = psEOC_PolarTideCorr(time );775 psEarthPole *correction = psEOC_PolarTideCorr(time2); 764 776 out->x += correction->x; 765 777 out->y += correction->y; 766 778 out->s += correction->s; 767 779 768 780 psFree(time2); 769 781 psFree(in); 770 782 psFree(correction);
Note:
See TracChangeset
for help on using the changeset viewer.
