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_psSphereOps.c

    r5446 r5450  
    66*  @author d-Rob, MHPCC
    77*
    8 *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
    9 *  @date $Date: 2005-10-26 01:20:15 $
     8*  @version $Revision: 1.11 $ $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
     
    7171    double q3 = cos(a3)*cos(DELTA_P/2);
    7272
    73     if (FLT_EPSILON < fabs(q0 - myST->q0)) {
     73    if (DBL_EPSILON < fabs(q0 - myST->q0)) {
    7474        psError(PS_ERR_UNKNOWN,true,"myST->q0 is %lf, should be %lf\n", myST->q0, q0);
    7575        return 2;
    7676    }
    77     if (FLT_EPSILON < fabs(q1 - myST->q1)) {
     77    if (DBL_EPSILON < fabs(q1 - myST->q1)) {
    7878        psError(PS_ERR_UNKNOWN,true,"myST->q1 is %f, should be %f\n", myST->q1, q1);
    7979        return 3;
    8080    }
    81     if (FLT_EPSILON < fabs(q2 - myST->q2)) {
     81    if (DBL_EPSILON < fabs(q2 - myST->q2)) {
    8282        psError(PS_ERR_UNKNOWN,true,"myST->q2 is %f, should be %f\n", myST->q2, q2);
    8383        return 4;
    8484    }
    85     if (FLT_EPSILON < fabs(q3 - myST->q3)) {
     85    if (DBL_EPSILON < fabs(q3 - myST->q3)) {
    8686        psError(PS_ERR_UNKNOWN,true,"myST->q0 is %f, should be %f\n", myST->q3, q3);
    8787        return 5;
     
    239239
    240240        // check ecliptic transforms for correctness
    241         if (abs(RAD_TO_DEG(ecliptic->r) - lambda[x]) > TOLERANCE ||
    242                 abs(RAD_TO_DEG(ecliptic->d) - beta[x]) > TOLERANCE) {
     241        if (fabs(RAD_TO_DEG(ecliptic->r) - lambda[x]) > TOLERANCE ||
     242                fabs(RAD_TO_DEG(ecliptic->d) - beta[x]) > TOLERANCE) {
    243243            psError(PS_ERR_UNKNOWN, false,
    244244                    "Ecliptic tranformation incorrect.  Result is (%g,%g), expected (%g,%g)",
     
    247247            return 1;
    248248        }
    249         if (abs(RAD_TO_DEG(icrsFromEcliptic->r) - alpha[x]) > TOLERANCE ||
    250                 abs(RAD_TO_DEG(icrsFromEcliptic->d) - delta[x]) > TOLERANCE) {
     249        if (fabs(RAD_TO_DEG(icrsFromEcliptic->r) - alpha[x]) > TOLERANCE ||
     250                fabs(RAD_TO_DEG(icrsFromEcliptic->d) - delta[x]) > TOLERANCE) {
    251251            psError(PS_ERR_UNKNOWN, false,
    252252                    "ICRS for Ecliptic tranformation incorrect.  Result is (%g,%g), expected (%g,%g)",
     
    269269
    270270        // check ecliptic transforms for correctness
    271         if (abs(RAD_TO_DEG(galactic->r) - l[x]) > TOLERANCE ||
    272                 abs(RAD_TO_DEG(galactic->d) - b[x]) > TOLERANCE) {
     271        if (fabs(RAD_TO_DEG(galactic->r) - l[x]) > TOLERANCE ||
     272                fabs(RAD_TO_DEG(galactic->d) - b[x]) > TOLERANCE) {
    273273            psError(PS_ERR_UNKNOWN, false,
    274274                    "Galactic tranformation incorrect.  Result is (%g,%g), expected (%g,%g)",
     
    280280            return 3;
    281281        }
    282         if (abs(RAD_TO_DEG(icrsFromGalactic->r) - alpha[x]) > TOLERANCE ||
    283                 abs(RAD_TO_DEG(icrsFromGalactic->d) - delta[x]) > TOLERANCE) {
     282        if (fabs(RAD_TO_DEG(icrsFromGalactic->r) - alpha[x]) > TOLERANCE ||
     283                fabs(RAD_TO_DEG(icrsFromGalactic->d) - delta[x]) > TOLERANCE) {
    284284            psError(PS_ERR_UNKNOWN, false,
    285285                    "ICRS for Galactic tranformation incorrect.  Result is (%g,%g), expected (%g,%g)",
     
    498498    output->d *= -1.0;
    499499    empty = psSphereGetOffset(origin, output, PS_LINEAR, PS_RADIAN);
    500     if ( fabs(offset->r - empty->r) > 0.0001 || fabs(offset->d - empty->r) > 0.0001 ) {
     500    if ( fabs(offset->r - empty->r) > 0.0001 || abs(offset->d - empty->r) > 0.0001 ) {
    501501        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
    502502                "psSphereGetOffset failed to return correct linear offset values.\n");
Note: See TracChangeset for help on using the changeset viewer.