IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 27, 2005, 4:25:22 PM (21 years ago)
Author:
drobbin
Message:

Implemented and tested psAberration, but results have not been verified.

File:
1 edited

Legend:

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

    r5447 r5450  
    66*  @author d-Rob, MHPCC
    77*
    8 *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
    9 *  @date $Date: 2005-10-27 20:38:19 $
     8*  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
     9*  @date $Date: 2005-10-28 02:25:22 $
    1010*
    1111*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    2424
    2525testDescription tests[] = {
    26                               {testEOCParallax, 666, "psEOCParallax()", 0, false},
    27                               {testAberration, 667, "psAberration()", 0, false},
    28                               {testGravityDeflect, 668, "psGravityDeflect()", 0, false},
     26                              {testAberration, 666, "psAberration()", 0, false},
     27                              {testGravityDeflect, 667, "psGravityDeflect()", 0, false},
     28                              {testEOCParallax, 668, "psEOCParallax()", 0, false},
    2929                              {testEOCPrecession, 669, "psEOCPrecession()", 0, false},
    3030                              {testEOCPolar, 670, "psEOCPolar()", 0, false},
     
    4141}
    4242
    43 psS32 testEOCParallax(void)
    44 {
    45 
    46     return 0;
    47 }
    48 
    4943psS32 testAberration(void)
    5044{
     45    psSphere *actual = NULL;
     46    psSphere *apparent = psSphereAlloc();
     47    psSphere *direction = psSphereAlloc();
     48    psSphere *empty = NULL;
     49
     50    apparent->r = 0.2;
     51    apparent->d = 0.2;
     52    direction->r = 0.2035;
     53    direction->d = 0.2035;
     54
     55    empty = psAberration(empty, actual, direction, 0.1);
     56    if (empty != NULL) {
     57        psError(PS_ERR_BAD_PARAMETER_NULL, false,
     58                "psAberration failed to return NULL for NULL apparent input.\n");
     59        return 1;
     60    }
     61    empty = psAberration(empty, apparent, actual, 0.1);
     62    if (empty != NULL) {
     63        psError(PS_ERR_BAD_PARAMETER_NULL, false,
     64                "psAberration failed to return NULL for NULL direction input.\n");
     65        return 2;
     66    }
     67
     68    actual = psAberration(actual, apparent, direction, 0.4);
     69    printf("\nactual = r,d  = %.8g, %.8g\n", actual->r, actual->d);
     70
     71    psFree(actual);
     72    psFree(apparent);
     73    psFree(direction);
    5174
    5275    return 0;
     
    79102    }
    80103
    81 
    82104    actual = psGravityDeflection(actual, apparent, sun);
    83105    psSphere *result = psSphereSetOffset(apparent, actual, PS_SPHERICAL, PS_RADIAN);
     
    88110    psFree(apparent);
    89111    psFree(sun);
     112
     113    return 0;
     114}
     115
     116psS32 testEOCParallax(void)
     117{
    90118
    91119    return 0;
Note: See TracChangeset for help on using the changeset viewer.