IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 29, 2005, 4:17:17 PM (21 years ago)
Author:
drobbin
Message:

Edited psCubeToSphere, tests. EOC - gravity still fails. Others still unchecked.

File:
1 edited

Legend:

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

    r5534 r5626  
    55*  @author d-Rob, MHPCC
    66*
    7 *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
    8 *  @date $Date: 2005-11-17 04:04:30 $
     7*  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
     8*  @date $Date: 2005-11-30 02:17:17 $
    99*
    1010*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    102102    psSphere *actual = psSphereAlloc();
    103103    psSphere *apparent = NULL;
    104     psSphere *sun = psSphereAlloc();
     104    //    psSphere *sun = psSphereAlloc();
    105105    psSphere *empty = NULL;
    106106
    107     sun->r = 0.2;
    108     sun->d = 0.2;
    109     actual->r = 0.61001;
    110     actual->d = 0.01999;
     107    //    sun->r = 0.2;
     108    //    sun->d = 0.2;
     109    //    actual->r = 0.61001;
     110    //    actual->d = 0.01999;
     111    actual->r = DEG_TO_RAD(122.9153182445501);
     112    actual->d = DEG_TO_RAD(48.562968978679194);
     113    psCube *sunCube = psCubeAlloc();
     114    sunCube->x = 1.467797790127511e11;
     115    sunCube->y = 2.5880956908748722e10;
     116    sunCube->z = 1.1220046291457653e10;
     117    //    double sum = sqrt(sunCube->x*sunCube->x + sunCube->y*sunCube->y + sunCube->z*sunCube->z);
     118    //    sunCube->x = sunCube->x/sum;
     119    //    sunCube->y = sunCube->y/sum;
     120    //    sunCube->z = sunCube->z/sum;
     121    //    printf("\n <<<<SUNvec = x,y,z = %.13g, %.13g %.13g", sunCube->x, sunCube->y, sunCube->z);
     122    psSphere *sun = psCubeToSphere(sunCube);
     123    printf("\n <<<<SUN = r,d = %.13g, %.13g\n", sun->r, sun->d);
    111124
    112125    empty = psGravityDeflection(apparent, empty, sun);
     
    123136    }
    124137
    125     apparent = psGravityDeflection(apparent, actual, sun);
     138    apparent = psGravityDeflection(NULL, actual, sun);
    126139    psSphere *result = psSphereSetOffset(actual, apparent, PS_SPHERICAL, PS_RADIAN);
    127140    printf("\nActual r,d = %.13g,%.13g    Apparent r,d = %.16g, %.16g \n",
    128141           actual->r, actual->d, result->r, result->d);
     142    psCube *outCube = psSphereToCube(result);
     143    printf(" -- outCube = x,y,z = %.13g, %.13g, %.13g  -- \n", outCube->x, outCube->y, outCube->z);
     144    psFree(outCube);
     145    psCube *outCube2 = psSphereToCube(apparent);
     146    printf(" -- outCube = x,y,z = %.13g, %.13g, %.13g  -- \n", outCube2->x, outCube2->y, outCube2->z);
     147    psFree(outCube2);
     148    psFree(sunCube);
     149
    129150    psFree(result);
    130151    psFree(actual);
Note: See TracChangeset for help on using the changeset viewer.