Changeset 5657 for trunk/psLib/src/astro/psEarthOrientation.c
- Timestamp:
- Dec 1, 2005, 6:40:00 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/astro/psEarthOrientation.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/astro/psEarthOrientation.c
r5642 r5657 8 8 * @author Robert Daniel DeSonia, MHPCC 9 9 * 10 * @version $Revision: 1.2 0$ $Name: not supported by cvs2svn $11 * @date $Date: 2005-1 1-30 23:50:40 $10 * @version $Revision: 1.21 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2005-12-02 04:40:00 $ 12 12 * 13 13 * Copyright 2005 Maui High Performance Computing Center, University of Hawaii … … 302 302 // calculating the apparent angle from the actual angle and the sun position 303 303 304 // first, calculate the angle between the sun vector and the actual vector305 306 // Moving to cartesian first: XXX -- is this required?307 304 psCube* sunVector = psSphereToCube(sun); 308 305 psCube* actualVector = psSphereToCube(actual); 309 printf("\n Actual sphere = %.13g, %.13g", actual->r, actual->d); 310 printf("\n Actual cube = %.13g, %.13g, %.13g \n", actualVector->x, actualVector->y, actualVector->z); 311 printf("\n SUN sphere = %.13g, %.13g", sun->r, sun->d); 312 printf("\n SUN cube = %.13g, %.13g, %.13g \n", sunVector->x, sunVector->y, sunVector->z); 313 psSphere *new = psCubeToSphere(actualVector); 314 printf(" New sphere = %.13g, %.13g", new->r, new->d); 315 psFree(new); 306 316 307 // use dot product to calculate the angle of separation 317 308 // N.B., assuming the psSphereToCube function returns a unit vector. … … 320 311 sunVector->y*actualVector->y + 321 312 sunVector->z*actualVector->z); 322 printf("\n Theta = %.13g ", theta);323 313 double r0 = PS_AU * tan(theta); 324 printf(" r0 = %.13g", r0);325 314 double deflection = 4.0*PS_G*PS_M/(PS_C0*PS_C0*r0); 326 printf(" deflection = %.13g \n", deflection); 315 327 316 // make sure the deflection is not greater than 1.75 arcsec 328 317 double limit = SEC_TO_RAD(1.75); … … 352 341 deflection = SEC_TO_RAD(deflection); 353 342 theta = atan(r0/PS_AU) * tan(deflection); 354 printf(" deflection = %.13g Theta=%.13g ", deflection, theta);355 343 // phi = sqrt( deflection*deflection - theta*theta ); 356 344 phi = deflection * cos(asin(theta/deflection)); 357 printf(" Phi = %.13g \n", phi);358 345 apparent->r = theta; 359 346 apparent->d = phi; … … 726 713 in = psTimeConvert(in, PS_TIME_UT1); 727 714 } 728 double T = (double)(in->sec) + (double)(in->nsec / 1e9);729 printf("\nThe Value of T is = %.19g\n", T);715 // double T = (double)(in->sec) + (double)(in->nsec / 1e9); 716 double T = psTimeToJD(in); 730 717 T += -2451545.0; 731 718 double theta = 2.0 * M_PI * (0.7790572732640 + 1.00273781191135448 * T); 732 p rintf("\nThe Value of theta is = %.13g\n", theta);719 psSphereRot *out = psSphereRotAlloc(theta, 0.0, 0.0); 733 720 // psSphereRot *out = psSphereRotInvert(theta, 0.0, 0.0); 734 psSphereRot *out = psSphereRotInvert(theta, 0.0, 0.0);735 721 736 722 psFree(in);
Note:
See TracChangeset
for help on using the changeset viewer.
