IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 30, 2005, 1:50:40 PM (21 years ago)
Author:
drobbin
Message:

Revised/Updated tests to use provided test values. NONE of the values match. fabulous.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/astro/psEarthOrientation.c

    r5626 r5642  
    88 *  @author Robert Daniel DeSonia, MHPCC
    99 *
    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 $
    1212 *
    1313 *  Copyright 2005 Maui High Performance Computing Center, University of Hawaii
     
    727727    }
    728728    double T = (double)(in->sec) + (double)(in->nsec / 1e9);
    729     printf("\nThe Value of T is = %.13g\n", T);
     729    printf("\nThe Value of T is = %.19g\n", T);
    730730    T += -2451545.0;
    731     printf("\nThe Value of T is = %.13g\n", T);
    732731    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);
    733734    psSphereRot *out = psSphereRotInvert(theta, 0.0, 0.0);
    734735
     
    745746    psSphere *in = NULL;
    746747    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    }
    747759
    748760    //XXX: This may be the wrong idea... ADD says to use 3rd-order polys to interpolate
    749761    //polar motion coordinates.
    750     in = p_psTimeGetPoleCoords(time);
     762    in = p_psTimeGetPoleCoords(time2);
    751763    if (in == NULL) {
    752764        psError(PS_ERR_BAD_PARAMETER_NULL, true,
     
    757769    out->y = in->d;
    758770
    759     s = psTimeGetUT1Delta(time, bulletin);
     771    s = psTimeGetUT1Delta(time2, bulletin);
    760772    out->s = s;
    761773
    762774    //XXX: Apply polar tide correction here???
    763     psEarthPole *correction = psEOC_PolarTideCorr(time);
     775    psEarthPole *correction = psEOC_PolarTideCorr(time2);
    764776    out->x += correction->x;
    765777    out->y += correction->y;
    766778    out->s += correction->s;
    767779
    768 
     780    psFree(time2);
    769781    psFree(in);
    770782    psFree(correction);
Note: See TracChangeset for help on using the changeset viewer.