IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 5824


Ignore:
Timestamp:
Dec 20, 2005, 8:15:58 PM (21 years ago)
Author:
drobbin
Message:

Updated tests in EOC to test great circle distance for precession (corr) values. added IERS file parser

Location:
trunk/psLib
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/astro/tst_psEarthOrientation.c

    r5814 r5824  
    55*  @author d-Rob, MHPCC
    66*
    7 *  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
    8 *  @date $Date: 2005-12-20 05:05:37 $
     7*  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
     8*  @date $Date: 2005-12-21 06:15:58 $
    99*
    1010*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    363363    }
    364364
     365    pcorr->x = 2.857175590089105e-4;
     366    pcorr->y = 2.3968739377734732e-5;
     367    pcorr->s = -1.3970066457904322e-8;
     368    //    pcorr->x += 3.05224300720406e-7;
     369    //    pcorr->y += -1.39441339235822e-7;
     370    double q0, q1, q2;
     371    q0 = -1.1984522406756289e-5;
     372    q1 = 1.4285893358610674e-4;
     373    q2 = 1.2191193518914336e-10;
     374    psSphereRot *pni = psSphereRot_CEOtoGCRS(pcorr);
     375    if (fabs(pni->q0-q0) > FLT_EPSILON || fabs(pni->q1-q1) > FLT_EPSILON ||
     376            fabs(pni->q2-q2) > FLT_EPSILON ) {
     377        printf("\n Error at CEOtoGCRS, output psSphereRot doesn't match expected.\n");
     378    }
     379    printf("\n  Output sphere rotation   = %.13g,%.13g,%.13g,%.13g\n",
     380           pni->q0, pni->q1, pni->q2, pni->q3);
     381    printf("  Expected sphere rotation = %.13g,%.13g,%.13g\n", q0,q1,q2);
     382    psCube *objC = psCubeAlloc();
     383    //    objC->x = -3.5963388069046304;
     384    //    objC->y = 0.5555192509816625;
     385    //    objC->z = 0.7497078321908413;
     386    objSetup();
     387    psSphereRot *pn = psSphereRotConjugate(NULL, pni);
     388    //    psSphere *sphere = psCubeToSphere(objC);
     389    psSphere *sphere = psSphereAlloc();
     390    *sphere = *obj;
     391    psFree(obj);
     392    psSphere *result = psSphereRotApply(NULL, pn, sphere);
     393    objC->x = -0.3598480726985338;
     394    objC->y = 0.5555012823608123;
     395    objC->z = 0.7496183628158023;
     396    psFree(sphere);
     397    sphere = psCubeToSphere(objC);
     398    psFree(objC);
     399    printf("\n Spheres:  out = %.13g, %.13g,    expect = %.13g, %.13g\n",
     400           result->r, result->d, sphere->r, sphere->d);
     401    double xx = acos(cos(result->r)*cos(sphere->r)*cos(result->d - sphere->d) + sin(result->r)*sin(sphere->r));
     402    printf("GREAT CIRCLE DIFFERENCE = %.13g \n\n", xx);
     403
     404    psFree(sphere);
     405    psFree(result);
     406    psFree(pn);
     407    //    psFree(obj);
     408    psFree(pni);
     409
    365410    psFree(pcorr);
    366411
Note: See TracChangeset for help on using the changeset viewer.