IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 5466


Ignore:
Timestamp:
Nov 2, 2005, 6:31:22 PM (21 years ago)
Author:
drobbin
Message:

Updated EOC files(fxns) and tests, specifically TEOtoCEO sphere rotations

Location:
trunk/psLib
Files:
4 edited

Legend:

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

    r5455 r5466  
    99*  @author Robert Daniel DeSonia, MHPCC
    1010*
    11 *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
    12 *  @date $Date: 2005-11-02 01:07:25 $
     11*  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
     12*  @date $Date: 2005-11-03 04:31:22 $
    1313*
    1414*  Copyright 2005 Maui High Performance Computing Center, University of Hawaii
     
    288288}
    289289
    290 
     290/*
    291291double psEOC_ParallaxFactor(const psSphere *coords,
    292292                            const psTime *time)
    293293{
    294 
    295 
     294 
     295 
    296296    return NAN;
    297297}
     298*/
    298299
    299300psEarthPole *psEOC_PrecessionModel(const psTime *time)
     
    455456psSphereRot* psSphereRot_TEOtoCEO(const psTime *time)
    456457{
    457     return NULL;
     458    PS_ASSERT_PTR_NON_NULL(time,NULL);
     459    psTime *in = psTimeAlloc(time->type);
     460    *in = *time;
     461    if (in->type != PS_TIME_UT1) {
     462        in = psTimeConvert(in, PS_TIME_UT1);
     463    }
     464    double T = (double)(in->sec) + (double)(in->nsec / 1e9);
     465    printf("\nThe Value of T is = %.13g\n", T);
     466    T += -2451545.0;
     467    printf("\nThe Value of T is = %.13g\n", T);
     468    double theta = 2.0 * M_PI * (0.7790572732640 + 1.00273781191135448 * T);
     469    psSphereRot *out = psSphereRotInvert(theta, 0.0, 0.0);
     470
     471    psFree(in);
     472    return out;
    458473}
    459474
  • trunk/psLib/src/astro/psEarthOrientation.h

    r5455 r5466  
    99*  @author Robert Daniel DeSonia, MHPCC
    1010*
    11 *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
    12 *  @date $Date: 2005-11-02 01:07:25 $
     11*  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
     12*  @date $Date: 2005-11-03 04:31:22 $
    1313*
    1414*  Copyright 2005 Maui High Performance Computing Center, University of Hawaii
     
    7777);
    7878
    79 /** Calculate the parallax factor for the given position and time.
     79
     80/* Calculate the parallax factor for the given position and time.
    8081 *
    8182 *  @return double:     the calculated parallax factor.
    8283 */
     84/*
    8385double psEOC_ParallaxFactor(
    8486    const psSphere *coords,            ///< specified position
    8587    const psTime *time                 ///< specified time
    8688);
     89*/
    8790
    8891/** Calculates the components of the rotation between the CEO and GCRS frames, X, Y,
  • trunk/psLib/src/astro/psTime.h

    r5087 r5466  
    1111 *  @author Ross Harman, MHPCC
    1212 *
    13  *  @version $Revision: 1.41 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2005-09-21 21:37:20 $
     13 *  @version $Revision: 1.42 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2005-11-03 04:31:22 $
    1515 *
    1616 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    139139);
    140140
    141 /** Convert psTime to UTC or TAI time.
    142  *
    143  *  Converts psTime to UTC or TAI time based on the psTimeType argument.
     141/** Convert psTime to UTC, TAI, UT1, or TT time.
     142 *
     143 *  Converts psTime to UTC, TAI, UT1, or TT time based on the psTimeType argument.
    144144 *
    145145 *  @return  psTime*: Pointer to psTime.
  • trunk/psLib/test/astro/tst_psEarthOrientation.c

    r5455 r5466  
    55*  @author d-Rob, MHPCC
    66*
    7 *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
    8 *  @date $Date: 2005-11-02 01:07:25 $
     7*  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
     8*  @date $Date: 2005-11-03 04:31:22 $
    99*
    1010*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    1414#include "pslib_strict.h"
    1515
    16 static psS32 testEOCParallax(void);
     16//static psS32 testEOCParallax(void);
    1717static psS32 testAberration(void);
    1818static psS32 testGravityDeflect(void);
     
    2020static psS32 testEOCPolar(void);
    2121static psS32 testEOCNutation(void);
    22 static psS32 testSphereRotTransforms(void);
     22static psS32 testSphereRot_TEOtoCEO(void);
     23static psS32 testSphereRot_CEOtoGCRS(void);
     24static psS32 testSphereRot_ITRStoTEO(void);
    2325
    2426testDescription tests[] = {
    2527                              {testAberration, 666, "psAberration()", 0, false},
    2628                              {testGravityDeflect, 667, "psGravityDeflect()", 0, false},
    27                               {testEOCParallax, 668, "psEOCParallax()", 0, false},
     29                              //                              {testEOCParallax, 668, "psEOCParallax()", 0, false},
    2830                              {testEOCPrecession, 669, "psEOCPrecession()", 0, false},
    2931                              {testEOCPolar, 670, "psEOCPolar()", 0, false},
    3032                              {testEOCNutation, 671, "psEOCNutation()", 0, false},
    31                               {testSphereRotTransforms, 672, "psSphereRotTransforms()", 0, false},
     33                              {testSphereRot_TEOtoCEO, 672, "psSphereRot_TEOtoCEO()", 0, false},
     34                              {testSphereRot_CEOtoGCRS, 673, "psSphereRot_CEOtoGCRS()", 0, false},
     35                              {testSphereRot_ITRStoTEO, 674, "psSphereRRot_ITRStoTEO()", 0, false},
    3236                              {NULL}
    3337                          };
     
    3741    psLogSetLevel( PS_LOG_INFO );
    3842
    39     return ( ! runTestSuite( stderr, "psEarthOrientation", tests, argc, argv ) );
     43    // Initialize library internal structures
     44    psLibInit("pslib.config");
     45
     46    if( !runTestSuite(stderr,"psEarthOrientation",tests,argc,argv)) {
     47        return 1;
     48    }
     49
     50    // Cleanup library
     51    psLibFinalize();
     52
     53    return 0;
     54
     55    //    return ( ! runTestSuite( stderr, "psEarthOrientation", tests, argc, argv ) );
    4056}
    4157
     
    113129}
    114130
    115 psS32 testEOCParallax(void)
    116 {
    117 
    118     return 0;
    119 }
    120 
    121131psS32 testEOCPrecession(void)
    122132{
     
    137147}
    138148
    139 psS32 testSphereRotTransforms(void)
     149psS32 testSphereRot_TEOtoCEO(void)
    140150{
     151    psTime *now = psTimeAlloc(PS_TIME_UT1);
     152    now->sec = 1128530000;
     153    now->nsec = 931154510;
     154    psSphereRot *teoceo = psSphereRot_TEOtoCEO(now);
     155    printf("Output sphere rotation = %lf,%lf,%lf,%lf\n",
     156           teoceo->q0, teoceo->q1, teoceo->q2, teoceo->q3);
    141157
     158    psFree(now);
     159    psFree(teoceo);
    142160    return 0;
    143161}
    144162
     163psS32 testSphereRot_CEOtoGCRS(void)
     164{
     165    return 0;
     166}
     167
     168psS32 testSphereRot_ITRStoTEO(void)
     169{
     170    return 0;
     171}
     172
Note: See TracChangeset for help on using the changeset viewer.