IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 16, 2005, 5:59:05 PM (21 years ago)
Author:
drobbin
Message:

Implemented function NutationCorr and test. Has yet to be verified.

Location:
trunk/psLib/test/astro
Files:
3 edited

Legend:

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

    r5524 r5533  
    55*  @author d-Rob, MHPCC
    66*
    7 *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
    8 *  @date $Date: 2005-11-16 20:52:23 $
     7*  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
     8*  @date $Date: 2005-11-17 03:59:05 $
    99*
    1010*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    1414#include "pslib_strict.h"
    1515
    16 //static psS32 testEOCParallax(void);
    17 static psS32 testEOCInit_Final(void);
    1816static psS32 testAberration(void);
    1917static psS32 testGravityDeflect(void);
     
    2624
    2725testDescription tests[] = {
    28                               {testEOCInit_Final, 665, "psEOCInit_Final", 0, false},
    2926                              {testAberration, 666, "psAberration()", 0, false},
    3027                              {testGravityDeflect, 667, "psGravityDeflect()", 0, false},
    31                               //                              {testEOCParallax, 668, "psEOCParallax()", 0, false},
    3228                              {testEOCPrecession, 669, "psEOCPrecession()", 0, false},
    3329                              {testEOCPolar, 670, "psEOCPolar()", 0, false},
     
    5652
    5753    //    return ( ! runTestSuite( stderr, "psEarthOrientation", tests, argc, argv ) );
    58 }
    59 
    60 psS32 testEOCInit_Final(void)
    61 {
    62     return 0;
    6354}
    6455
     
    171162    psFree(UT1time);
    172163    //Check return values from valid precession input
    173 
    174164    pmodel = psEOC_PrecessionModel(time);
    175165    if ( pmodel == NULL ) {
     
    288278psS32 testEOCNutation(void)
    289279{
     280    psTime *in = psTimeAlloc(PS_TIME_TAI);
     281    in->sec = 1131579114;
     282    in->nsec = 498489000;
     283    in->leapsecond = false;
     284    psTime *empty = NULL;
     285    psEarthPole *nute = NULL;
     286
     287    //Return NULL for NULL input time.
     288    nute = psEOC_NutationCorr(empty);
     289    if (nute != NULL) {
     290        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
     291                "psEOC_NutationCorr failed to return NULL for NULL input time.\n");
     292        return 1;
     293    }
     294    //Return NULL for UT1 time input
     295    psTime *UT1time = psTimeAlloc(PS_TIME_UT1);
     296    nute = psEOC_NutationCorr(UT1time);
     297    if (nute != NULL) {
     298        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
     299                "psEOC_NutationCorr failed to return NULL for UT1 input time.\n");
     300        return 2;
     301    }
     302    psFree(UT1time);
     303    //Check return values from valid nutation time input
     304    nute = psEOC_PrecessionModel(in);
     305    if ( nute == NULL ) {
     306        psError(PS_ERR_BAD_PARAMETER_NULL, false,
     307                "psEOC_NutationCorr returned NULL for valid input.\n");
     308        return 3;
     309    } else {
     310        printf("Nutation Correction output = x,y,s = %.8g, %.8g, %.8g\n\n",
     311               nute->x, nute->y, nute->s);
     312    }
     313    psFree(nute);
     314    psFree(in);
     315
     316    if (!p_psEOCFinalize() ) {
     317        psError(PS_ERR_BAD_PARAMETER_VALUE, false, "EOC failed finalization!\n");
     318        return 12;
     319    }
    290320
    291321    return 0;
  • trunk/psLib/test/astro/verified/tst_psEarthOrientation.stderr

    r5522 r5533  
    1 /***************************** TESTPOINT ******************************************\
    2 *             TestFile: tst_psEarthOrientation.c                                   *
    3 *            TestPoint: psEarthOrientation{psEOCInit_Final}                        *
    4 *             TestType: Positive                                                   *
    5 \**********************************************************************************/
    6 
    7 
    8 ---> TESTPOINT PASSED (psEarthOrientation{psEOCInit_Final} | tst_psEarthOrientation.c)
    9 
    101/***************************** TESTPOINT ******************************************\
    112*             TestFile: tst_psEarthOrientation.c                                   *
     
    7061\**********************************************************************************/
    7162
     63<DATE><TIME>|<HOST>|E|psEOC_NutationCorr (FILE:LINENO)
     64    Unallowable operation: time is NULL.
     65<DATE><TIME>|<HOST>|E|psEOC_NutationCorr (FILE:LINENO)
     66    Invalid time input.  Time cannot be of type UT1.
    7267
    7368---> TESTPOINT PASSED (psEarthOrientation{psEOCNutation()} | tst_psEarthOrientation.c)
  • trunk/psLib/test/astro/verified/tst_psEarthOrientation.stdout

    r5524 r5533  
    1010 -- Eop = x=-0.00045805944, y=0.00013368871, s=-2.986086e-05
    1111 -- PolarMotion = x=0.25980922, y=0.26040097, s=-2.986086e-05
     12Nutation Correction output = x,y,s = 1.1557751e+08, 8865375.4, -5.1231901e+14
     13
    1214
    1315The Value of T is = 1128530000.931
Note: See TracChangeset for help on using the changeset viewer.