IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 14, 2005, 6:03:36 PM (21 years ago)
Author:
drobbin
Message:

edited VectorsReadFromFile per bug 577 and added Precession Model to EOC testing but fails to init correct tables

File:
1 edited

Legend:

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

    r5507 r5515  
    55*  @author d-Rob, MHPCC
    66*
    7 *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
    8 *  @date $Date: 2005-11-12 03:37:34 $
     7*  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
     8*  @date $Date: 2005-11-15 04:03:36 $
    99*
    1010*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    1515
    1616//static psS32 testEOCParallax(void);
     17static psS32 testEOCInit_Final(void);
    1718static psS32 testAberration(void);
    1819static psS32 testGravityDeflect(void);
     
    2526
    2627testDescription tests[] = {
     28                              {testEOCInit_Final, 665, "psEOCInit_Final", 0, false},
    2729                              {testAberration, 666, "psAberration()", 0, false},
    2830                              {testGravityDeflect, 667, "psGravityDeflect()", 0, false},
     
    5658}
    5759
     60psS32 testEOCInit_Final(void)
     61{
     62    return 0;
     63}
     64
    5865psS32 testAberration(void)
    5966{
     
    145152    time->leapsecond = false;
    146153
     154    //Tests for Precession Model //
     155    psEarthPole *pmodel = NULL;
     156    //Return NULL for NULL time input
     157    pmodel = psEOC_PrecessionModel(empty);
     158    if (pmodel != NULL) {
     159        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
     160                "psEOC_PrecessionModel failed to return NULL for NULL time input.\n");
     161        return 1;
     162    }
     163    //Return NULL for UT1 time input
     164    psTime *UT1time = psTimeAlloc(PS_TIME_UT1);
     165    pmodel = psEOC_PrecessionModel(UT1time);
     166    if (pmodel != NULL) {
     167        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
     168                "psEOC_PrecessionModel failed to return NULL for UT1 input time.\n");
     169        return 2;
     170    }
     171    psFree(UT1time);
     172    //Check return values from valid precession input
     173    pmodel = psEOC_PrecessionModel(time);
     174    if ( pmodel == NULL ) {
     175        psError(PS_ERR_BAD_PARAMETER_NULL, false,
     176                "psEOC_PrecessionModel returned NULL for valid input.\n");
     177        return 3;
     178    } else {
     179        printf("Precession Model output = x,y,s = %.8g, %.8g, %.8g\n",
     180               pmodel->x, pmodel->y, pmodel->s);
     181    }
     182    psFree(pmodel);
     183
    147184
    148185    //Tests for Precession Correction function//
Note: See TracChangeset for help on using the changeset viewer.