IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 27, 2005, 10:38:19 AM (21 years ago)
Author:
drobbin
Message:

Updated EarthOrientation - Gravity Deflection and tests

File:
1 edited

Legend:

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

    r5446 r5447  
    66*  @author d-Rob, MHPCC
    77*
    8 *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
    9 *  @date $Date: 2005-10-26 01:20:15 $
     8*  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
     9*  @date $Date: 2005-10-27 20:38:19 $
    1010*
    1111*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    5959    psSphere *apparent = psSphereAlloc();
    6060    psSphere *sun = psSphereAlloc();
     61    psSphere *empty = NULL;
    6162
    6263    sun->r = 0.2;
     
    6566    apparent->d = 0.2035;
    6667
    67     actual = psGravityDeflection(apparent, actual, sun);
     68    empty = psGravityDeflection(empty, actual, sun);
     69    if (empty != NULL) {
     70        psError(PS_ERR_BAD_PARAMETER_NULL, true,
     71                "psGravityDeflection Failed to return NULL for NULL apparent input sphere.\n");
     72        return 1;
     73    }
     74    empty = psGravityDeflection(empty, apparent, actual);
     75    if (empty != NULL) {
     76        psError(PS_ERR_BAD_PARAMETER_NULL, true,
     77                "psGravityDeflection Failed to return NULL for NULL sun input sphere.\n");
     78        return 2;
     79    }
     80
     81
     82    actual = psGravityDeflection(actual, apparent, sun);
    6883    psSphere *result = psSphereSetOffset(apparent, actual, PS_SPHERICAL, PS_RADIAN);
    6984    printf("\nApparent r,d = %.13g,%.13g    Actual r,d = %.13g, %.13g \n",
Note: See TracChangeset for help on using the changeset viewer.